View source: R/getPredictErr.gllvm.R
getPredictErr.gllvm | R Documentation |
Calculates the prediction errors for latent variables and random effects for gllvm model.
## S3 method for class 'gllvm'
getPredictErr(object, CMSEP = TRUE, cov = FALSE, ...)
object |
an object of class 'gllvm'. |
CMSEP |
logical, if |
cov |
if |
... |
not used |
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.
Function returns following components:
lvs |
prediction errors for latent variables |
row.effects |
prediction errors for random row effects if included |
Francis K.C. Hui, Jenni Niku, David I. Warton
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.