Learn R Programming

RStanTVA (version 0.3.2)

predict,stantvafit-method: Predict parameter values

Description

Returns the predictions for latent model parameters.

Usage

# S4 method for stantvafit
predict(object, newdata, variables = names(object@stanmodel@code@df))

Value

The predictions.

Arguments

object

The StanTVA fit object.

newdata

The new data (leave empty to use fitted data).

variables

The names of the parameters to predict.

Examples

Run this code
if (FALSE) {
p <- predict(fit, variables = c("C","K"))
colMeans(p$C)
}

Run the code above in your browser using DataLab