fit_model_default: Default ITS model

Description Usage Arguments Value Examples

View source: R/season_model_functions.R

Description

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

Usage

1
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

1
2
3
4
5
6
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 )

simITS documentation built on July 2, 2020, 4:10 a.m.