| coef2 | R Documentation | 
Extract the coefficients from a latent variable model.
Similar to lava::compare but with small sample correction.
coef2(object, as.lava, ...)
## S3 method for class 'lvmfit'
coef2(object, as.lava = TRUE, ssc = lava.options()$ssc, ...)
object | 
 a   | 
as.lava | 
 [logical] if   | 
... | 
 additional argument passed to   | 
ssc | 
 [character] method used to correct the small sample bias of the variance coefficients: no correction (  | 
When argument object is a lvmfit object, the method first calls estimate2 and then extract the model coefficients.
A numeric vector named with the names of the coefficients.
estimate2 to obtain lvmfit2 objects.
#### simulate data ####
set.seed(10)
dW <- sampleRepeated(10, format = "wide")
set.seed(10)
dL <- sampleRepeated(10, format = "long")
dL$time2 <- paste0("visit",dL$time)
#### latent variable models ####
e.lvm <- estimate(lvm(c(Y1,Y2,Y3) ~ 1*eta + X1, eta ~ Z1), data = dW)
coef(e.lvm)
coef2(e.lvm)
coef2(e.lvm, as.lava = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.