fit_model_default {simITS}R Documentation

Default ITS model

Description

This fits the model 'outcomename ~ lag.outcome + month', with no covariates.

Usage

fit_model_default(dat, outcomename, lagless = FALSE, ...)

Arguments

dat

Dataframe of pre-policy data to fit model to. Needs a "month" column

outcomename

Outcome of interest

lagless

Boolean, include the lagged outcome, or not?

...

Extra arguments passed to the lm() call.

Value

A fit model (a 'lm' object from a 'lm()' call) from fitting a simple regression of outcome onto month and lagged month.

Examples

mecklenberg = add_lagged_covariates(mecklenberg, "pbail")
meck.pre = filter( mecklenberg, month <= 0 )
mod = fit_model_default( meck.pre, "pbail", lagless = TRUE )
summary( mod )
mod = fit_model_default( meck.pre, "pbail", lagless = FALSE )
summary( mod )

[Package simITS version 0.1.1 Index]