confint2 {lavaSearch2} | R Documentation |
Confidence Intervals With Small Sample Correction
Description
Extract confidence intervals of the coefficients from a latent variable model.
Similar to lava::confint
but with small sample correction.
Extract estimate, standard error, confidence intervals and p-values associated to each coefficient of a latent variable model.
Similar to lava::confint
but with small sample correction.
Usage
confint2(object, robust, cluster, transform, as.lava, conf.level, ...)
## S3 method for class 'lvmfit'
confint2(
object,
robust = FALSE,
cluster = NULL,
transform = NULL,
as.lava = TRUE,
conf.level = 0.95,
ssc = lava.options()$ssc,
df = lava.options()$df,
...
)
model.tables2(object, robust, cluster, transform, as.lava, conf.level, ...)
Arguments
object |
a |
robust |
[logical] should robust standard errors be used instead of the model based standard errors? Should be |
cluster |
[integer vector] the grouping variable relative to which the observations are iid. |
transform |
[function] transformation to be applied. |
as.lava |
[logical] when |
conf.level |
[numeric, 0-1] level of the confidence intervals. |
... |
additional argument passed to |
ssc |
[character] method used to correct the small sample bias of the variance coefficients: no correction ( |
df |
[character] method used to estimate the degree of freedoms of the Wald statistic: Satterthwaite |
Details
When argument object is a lvmfit
object, the method first calls estimate2
and then extract the confidence intervals.
When argument object is a lvmfit
object, the method first calls estimate2
and then extract the confidence intervals.
Value
A data.frame with a row per coefficient.
A data.frame with a row per coefficient.
Examples
#### 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)
confint(e.lvm)
confint2(e.lvm)
confint2(e.lvm, as.lava = FALSE)