predict.ICCier: Predict new ICC values.

Description Usage Arguments Details Value

View source: R/predict.R

Description

Predicts new ICC values.

Usage

1
2
3
4
## S3 method for class 'ICCier'
predict(object, newdata = NULL, draws = NULL,
  summary = TRUE, prob = 0.95, inc_group = TRUE, occasion = NULL,
  ...)

Arguments

object

ICCier object.

newdata

Data to predict from. If NULL, calls fitted.ICCier on fit data.

draws

Number of draws to use from posterior samples for prediction. Default: All of them.

summary

Logical. Whether to return summary (mean, intervals) of ICCs (TRUE), or posterior samples (FALSE)

prob

A number p (0 < p < 1) indicating the desired probability mass to include in the intervals.

inc_group

Logical. Whether to include the grouping variable with the estimates.

occasion

Default: NULL. Vector representing the occasion number. One value per row in newdata. For estimating composite score reliability. If unspecified, set to NULL (default), and raw score ICCs are estimated.

...

Not currently used.

Details

If the grouping variable column is not included in newdata, then predict only predicts from the fixed values. This is not recommended. If the grouping variable column is present in newdata, but a value is either NA or not previously fit, then predict marginalizes over the entire random effects distribution. Finally, if the grouping variable is present and known, then predict marginalizes over the uncertainty in that person's (standardized, orthogonalized) random effects.

We recommend including the grouping column, even if the grouping identifier for the predicted case is unknown. This ensures that uncertainty in the predicted ICC includes the uncertainty of that case's random effects.

Value

If summary=TRUE, then the mean and prob% intervals are returned for each observation in the model frame. If summary=FALSE, an S by N matrix containing the S posterior samples for N observations.


stephensrmmartin/ICCier documentation built on Aug. 22, 2019, 10 a.m.