dlm | R Documentation |
This estimates a distributed lag model (DLM) with a natrual spline basis. The model is estimated with the glm function form the stats package.
dlm(Y, X, Z, df, family = gaussian)
Y |
Vector of outcomes. |
X |
Matrix of exposures over an evenly spaced grid. There should be no missing exposures. |
Z |
Optional design matrix or data.frame of covariates. An intercept will be added |
df |
Degrees of freedom for the natrual spline basis |
family |
A description of the error distribution and link function to be used in the model. |
An object of class dlm. This is a list containing: “dlm“ the fitted distribued lag function; “cumulative“ estimates of the cumulative effect; and “modelfit“ which contains AIC and BIC for the fitted model; “basis“ is the natrual spline basis for the dlm; and “fit“ the fitted object returned from glm.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.