predict.LSBP_VB: Predict method for the LSBP

View source: R/prediction.R

predict.LSBP_VBR Documentation

Predict method for the LSBP

Description

Predict method for a LSBP model estimated using the LSBP_VB function.

Usage

## S3 method for class 'LSBP_VB'
predict(object, type = "mean", R = 5000, newdata = NULL, threshold = NULL, ...)

Arguments

object

An object of class LSBP_VB.

type

String indicating the type of prediction: type="mean",type="predictive", type="variance" or type="cdf". See "Details".

R

An integer indicating the number of replications for the returned sample.

newdata

A new data frame containing the same variables declared in Formula. If missing, the dataset provided for estimation is used.

threshold

Only needed if type="cdf" is selected. See "Details".

...

Further arguments passed to or from other methods.

Details

The method predict.LSBP_VB produces a sample of predicted values, obtained by evaluating the conditional mean of the LSBP model or the predictive distribution, using the observations contained in the newdata data frame.

If type="mean", then a sample from the (variational) posterior of the mean of a LSBP model is returned. If type="predictive" is selected, then a sample from the (variational) predictive distribution is returned. If type="variance", then a sample from the (variational) posterior distribution of the LSBP variance is returned. If type="cdf", then a sample from the (variational) posterior distribution of the LSBP cumulative distribution function is returned, evaluated at threshold.


tommasorigon/LSBP documentation built on Feb. 25, 2023, 2:47 a.m.