Data frame for predictions. Required for objects that were estimated using the ‘"mundlak"’ and ‘"moments"’ strategies, since ‘dbreg’ does not retain any data for these estimations.
interval
Type of interval to compute: ‘"none"’ (default), ‘"confidence"’, or ‘"prediction"’. Note that ‘"confidence"’ intervals reflect uncertainty in the estimated mean, while ‘"prediction"’ intervals additionally account for residual variance. See predict.lm for details.
level
Confidence level for intervals. Default is 0.95.
…
Additional arguments (currently unused).
Predicting on "demean" strategy objects
Predicting on ‘dbreg’ objects should generally work as expected. However, predictions from ‘"demean"’ strategy models carry two important caveats:
Predictions require group means to transform back to the original scale. If ‘newdata’ contains the outcome variable, group means are computed from ‘newdata’ and used to return level predictions. If the outcome is absent, within-group predictions (deviations from group means) are returned instead, with a message.
Confidence/prediction intervals are not supported. A demeaned model cannot account for uncertainty in the fixed-effects (since these were absorbed at estimation time), which in turn would yield intervals that are too narrow. Requesting intervals for ‘"demean"’ strategy models will return point predictions with a message. Users should re-estimate with a different strategy if intervals are needed.
See Also
[dbreg()] for examples.
Examples
library("dbreg")mod =dbreg(Temp ~ Wind | Month, data = airquality)# coefficientscoef(mod)