interpret.dlm: Interpret a DLM formula

Description Usage Arguments Details Value


Given an appropriate DL model formula and data-frame, prepares the data to be fit by interpreting the formula and extracting available smooth lag terms.


interpret.dlm(formula, data, .names.func = function(n) paste("pseudoGroups",
  n, sep = ""))



a symbolic description of the model to be fitted. See dlm for details.


a model-frame containing the data for each term in the model. Should already be appropriately subset, etc.


a function for creating names of dummy variables that act as placeholders for penalized spline terms in lme4's setup. There should not be a need to alter this in normal use cases


Users should not typically have to interact with interpret.dlm directly, but it may be useful for extensions.

Uses R's stats::model.matrix mechanisms to build and parse the random effects (or penalized) components of spline-lag terms in the model. The object returned is later passed to other dlmBE functions in order to fit the specified model.


an S3 object of class "parsed.dlm" with list elements:


the formula passed to interpret.dlm


a reconstructed formula that is then passed to the lme4 modular functions


a data.frame returned by call to stats::model.frame; a copy of the fixed effects data needed to fit the model


a matrix of the random or penalized lag basis vectors, where each vector is a row. Stored as an object that inherits from Matrix::dMatrix


a list of all the unique bases represented in the formula. This may be <= the number of separate spline-lag terms. All elements should inherit from SmoothLag

an integer vector returned by parse.names where each unique integer corresponds to a separate spline-lag term. For lag term i, == i indexes the rows of Bt that correspond to the set of random or penalized basis vectors for that term


for "basis index." Each set of lag terms indexed in has a matching basis decomposition in bases. bi keeps track of that matching

asw221/dlm documentation built on May 8, 2019, 5:59 p.m.