Description Usage Arguments Details Value See Also
View source: R/addPredictions.R
This function uses the data available in a FluMoDL object
to generate predictions (in the form of crosspred
objects) for a
summary.FluMoDL
object.
1 | addPredictions(s, m)
|
s |
An object of class |
m |
An object of class FluMoDL, which provides the original (untransformed) predictor data to create the predictions. |
Creating a cross-basis matrix (to use as covariate in a Distributed-Lag Nonlinear Model) transforms and scales the original predictor. Interpreting the model coefficients requires revisiting the cross-basis matrix and backtransforming to the original predictor, in order to generate predicted effect estimates for specific values of predictor and lag.
For this reason, summary.FluMoDL
objects created from a
multivariate meta-analysis, containing pooled or BLUP coefficients,
do not contain predictions (their $pred
element is NULL
)
because they have no reference to an original predictor.
This is what addPredictions()
does: it uses the cross-basis matrices from a
FluMoDL object m
to calculate predictions with the coefficients in
the summary.FluMoDL
object s
. It provides the necessary
"context" in which to interpret the model coefficients.
The function returns the summary.FluMoDL
object s
,
with predictions added (as element $pred
)
summary.FluMoDL
, fitFluMoDL
,
crosspred
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.