Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

getPredictErr.gllvm

Extract prediction errors for latent variables from gllvm object


Description

Calculates the prediction errors for latent variables for gllvm model.

Usage

## S3 method for class 'gllvm'
getPredictErr(object, CMSEP = TRUE, ...)

Arguments

object

an object of class 'gllvm'.

CMSEP

logical, if TRUE conditional mean squared errors for predictions are calculated. If FALSE, prediction errors are based on covariances of the variational distributions for method ="VA".

...

not used

Details

Calculates conditional mean squared errors for predictions. If variational approximation is used, prediction errors can be based on covariances of the variational distributions, and therefore they do not take into account the uncertainty in the estimation of (fixed) parameters.

Value

Function returns following components:

lvs

prediction errors for latent variables

row.effects

prediction errors for random row effects if included

Author(s)

Francis K.C. Hui, Jenni Niku, David I. Warton

Examples

## Not run: 
# Load a dataset from the mvabund package
data(antTraits)
y <- as.matrix(antTraits$abund)
# Fit gllvm model
fit <- gllvm(y = y, family = poisson())
# prediction errors for latent variables:
getPredictErr(fit)

## End(Not run)

gllvm

Generalized Linear Latent Variable Models

v1.3.0
GPL-2
Authors
Jenni Niku [aut, cre], Wesley Brooks [aut], Riki Herliansyah [aut], Francis K.C. Hui [aut], Sara Taskinen [aut], David I. Warton [aut], Bert van der Veen [aut]
Initial release
2021-4-26

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.