Learn R Programming

REBayes (version 2.56)

predict.WGLVmix: Predict Method for WGLVmix

Description

Predict Method for Gaussian Location-scale Mixtures (Longitudinal Version)

Usage

# S3 method for WGLVmix
predict(object, newdata, Loss = 2, ...)

Value

A vector of predictions

Arguments

object

Fitted object of class "GLVmix"

newdata

data.frame with components(y,id,w) at which prediction is desired this data structure must be compatible with that of WGLVmix, if newdata$w is NULL then w is replaced by a vector of ones of length(y)

Loss

Loss function used to generate prediction: Currently supported values: 2 to get mean predictions, 1 to get median predictions, 0 to get modal predictions or any tau in (0,1) to get tau-th quantile predictions.

...

optional arguments to predict

Author

Roger Koenker

Details

The predict method for WGLmix objects will compute means, quantiles or modes of the posterior according to the Loss argument. Typically, newdata would be passed to predict. Note that these predictions are for the location parameter only.