Test whether a path in the latent variable model correspond to a null effect.
Similar to lava::effects but with small sample correction (if any).
So far it only work for a single path related two variable composed of one or two edges.
effects2(object, linfct, robust, cluster, conf.level, ...)# S3 method for lvmfit
effects2(
object,
linfct,
robust = FALSE,
cluster = NULL,
conf.level = 0.95,
to = NULL,
from = NULL,
df = lava.options()$df,
ssc = lava.options()$ssc,
...
)
# S3 method for lvmfit2
effects2(
object,
linfct,
robust = FALSE,
cluster = NULL,
conf.level = 0.95,
to = NULL,
from = NULL,
...
)
# S3 method for lvmfit2
effects(
object,
linfct,
robust = FALSE,
cluster = NULL,
conf.level = 0.95,
to = NULL,
from = NULL,
...
)
A data.frame with a row per path.
a lvmfit or lvmfit2 object (i.e. output of lava::estimate or lavaSearch2::estimate2).
[character vector] The path for which the effect should be assessed (e.g. "A~B"),
i.e. the effect of the right variable (B) on the left variable (A).
[logical] should robust standard errors be used instead of the model based standard errors? Should be TRUE if argument cluster is not NULL.
[integer vector] the grouping variable relative to which the observations are iid.
[numeric, 0-1] level of the confidence intervals.
additional argument passed to estimate2 when using a lvmfit object.
alternative to argument linfct. See lava::effects.
[character] method used to estimate the degree of freedoms of the Wald statistic: Satterthwaite "satterthwaite".
Otherwise ("none"/FALSE/NA) the degree of freedoms are set to Inf.
Only relevant when using a lvmfit object.
[character] method used to correct the small sample bias of the variance coefficients: no correction ("none"/FALSE/NA),
correct the first order bias in the residual variance ("residual"), or correct the first order bias in the estimated coefficients "cox").
Only relevant when using a lvmfit object.
When argument object is a lvmfit object, the method first calls estimate2 and then extract the confidence intervals.