predict.robu: Prediction method for a robumeta object.

Description Usage Arguments Details Value

View source: R/predict.robu.R

Description

predict.robu produces the predicted mean and confidence interval of a fitted robumeta model object given a prediction vector.

Usage

1
2
## S3 method for class 'robu'
predict(object, pred.vector, level = 0.95, ...)

Arguments

object

A fitted robumeta model object.

pred.vector

A prediction vector containing the new covariate values.

level

Confidence level.

...

Additional arguments to predict.

Details

1
2
3
4
5
6
  robu_mod <- robu(LOR1 ~ study_design + duration + service_hrs, 
                   data = dropoutPrevention, 
                   studynum = studyID, 
                   var.eff.size = varLOR, 
                   modelweights = "HIER",
                   small = TRUE)

In this robumeta model, the first covariate is a categorical variable that contains three levels: "Matched" (33 percent, dummy code: 00), "Randomized"(24 percent, 01) and "non-match non-randomized"(43 percent, 10). The corresponding prediction vector begins with 1 (intercept), and followed by 0, 0, the dummy code for "Matched". The last two elements are 38 and 5, the values for duration and sevice_hrs.

1
2
                                          
  predict(object = robu_mod, pred.vector = c(1,0,0,38,5),level = 0.95)

If we do not know the value of duration, the prediction vector should be c(1,0,0,NA,5). predict.robu() will refit a new model without the covariate duration, and the prediction will be based on it.

1
  predict(object = robu_mod, pred.vector = c(1,0,0,NA,5),level = 0.95)

Value

prediction the predicted value based on the prediction vector.

se The standard error for the predicted mean.

t The t-statistic calculated based on the predicted mean.

df The small sample corrected degrees of freedom of the distribution of the t-statistic.

lower The lower bound of the confidence interval for the predicted mean.

upper The upper bound of the confidence interval for the predicted mean.


robumeta documentation built on May 1, 2019, 8:21 p.m.