Description Usage Arguments Value Examples
View source: R/season_model_functions.R
This fits the model 'outcomename ~ lag.outcome + month', with no covariates.
1 | fit_model_default(dat, outcomename, lagless = FALSE, ...)
|
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. |
A fit model (a 'lm' object from a 'lm()' call) from fitting a simple regression of outcome onto month and lagged month.
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 )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.