Compute the residuals from a lvmfit object.
residuals2(object, ...)# S3 method for lm
residuals2(object, adjust.residuals = TRUE,
return.vcov.param = FALSE, ...)
# S3 method for gls
residuals2(object, cluster = NULL, p = NULL, data = NULL,
adjust.residuals = TRUE, as.clubSandwich = TRUE, second.order = FALSE,
return.vcov.param = FALSE, return.prepareScore2 = FALSE, ...)
# S3 method for lme
residuals2(object, cluster = NULL, p = NULL, data = NULL,
adjust.residuals = TRUE, as.clubSandwich = TRUE, second.order = FALSE,
return.vcov.param = FALSE, return.prepareScore2 = FALSE, ...)
# S3 method for lvmfit
residuals2(object, p = NULL, data = NULL,
adjust.residuals = TRUE, as.clubSandwich = TRUE, second.order = FALSE,
return.vcov.param = FALSE, return.prepareScore2 = FALSE, ...)
a fitted latent variable model.
[internal] Only used by the generic method.
Small sample correction: should the leverage-adjusted residuals be used to compute the score? Otherwise the raw residuals will be used.
Should the variance covariance matrix of the parameters be included in the output?
[only required for gls objects] a vector indicating the clusters of observation that are iid.
[optional] vector of parameters at which to evaluate the score.
[optional] data set.
method to take the square root of a non symmetric matrix. If TRUE
use a method implemented in the clubSandwich
package.
should the terms relative to the third derivative of the likelihood be be pre-computed?
should the quantities that have been pre-computed be returned?
# NOT RUN {
m <- lvm(Y1~eta,Y2~eta,Y3~eta)
latent(m) <- ~eta
e <- estimate(m,sim(m,1e2))
residuals2(e)
# }
Run the code above in your browser using DataLab