Learn R Programming

RStanTVA (version 0.3.2)

fitted,stantvafit-method: Retrieve fitted parameter values

Description

Returns the fitted values for latent model parameters. This is identical to calling predict() without new data.

Usage

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

Value

The fitted values.

Arguments

object

The StanTVA fit object.

variables

The names of the parameters to retrieve.

Examples

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

Run the code above in your browser using DataLab