This function uses the data available in a FluMoDL object to generate predictions (in the form of crosspred objects) for a summary.FluMoDL object.
addPredictions(s, m)
Arguments
s: An object of class summary.FluMoDL (normally holding BLUP or pooled estimates, i.e. s$type will equal "blup" or "pooled") for which predictions will be generated.
m: An object of class FluMoDL , which provides the original (untransformed) predictor data to create the predictions.
Returns
The function returns the summary.FluMoDL object s, with predictions added (as element $pred)
Details
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.