predict.sim_dlim {dlim}R Documentation

Simulated DLIM Predictions

Description

This function estimates cumulative and non-cumulative lag/modifier coefficients from a model in which the response is regressed on a cross-basis generated by the cross_basis() function.

Usage

## S3 method for class 'sim_dlim'
predict(object, newdata = NULL, type = c("DLF", "CE", "response"), ...)

Arguments

object

an object of class "dlim"

newdata

vector of modifiers for inference (class "numeric")

type

Type of prediction. "response" for predicted responses, "DLF" for the estimated distributed lag functions, "CE" for cumulative effects (class "character")

...

additional arguments affecting the predictions produced

Value

This function returns a list of 4 or 7 elements:

est_dlim

est_dlim element from predict.dlim (class "list")

cb

cross-bais from object (class "cross-basis")

fit

fit from object (class "lm", "glm", "gam")

true_betas

true_betas from object (class "matrix")

cb_dlm

cb_dlm from object (class "crosspred")

model_dlm

model_dlm from object (class "lm", "glm", "gam")

est_dlm

cumulative and/or point-wise estimates, standard errors, and confidence intervals for the DLM (class "list")

See Also

predict.dlim

Type vignette('dlimOverview') for a detailed description.


[Package dlim version 0.1.0 Index]