Obtains predictions for latent variables from a fitted generalized linear latent variable model object. Currently works only for the variational approximation method.
# S3 method for class 'gllvm'
predictLVs(object, newX = NULL, newY = object$y, ...)
A matrix containing requested predictor types.
Obtains predictions for latent variables from a fitted generalized linear latent variable model object.
# \donttest{
# Load a dataset from the mvabund package
data(antTraits, package = "mvabund")
y <- as.matrix(antTraits$abund)
X <- scale(antTraits$env[, 1:3])
# Fit gllvm model
fit <- gllvm(y = y, X, family = poisson())
# fitted values
predLVs <- predictLVs.gllvm(fit)
#> Error in eval(object$call): object 'X' not found
# }