Learn R Programming

lavaSearch2 (version 2.0.3)

effects2: Effects Through Pathways With Small Sample Correction

Description

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.

Usage

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, ... )

Value

A data.frame with a row per path.

Arguments

object

a lvmfit or lvmfit2 object (i.e. output of lava::estimate or lavaSearch2::estimate2).

linfct

[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).

robust

[logical] should robust standard errors be used instead of the model based standard errors? Should be TRUE if argument cluster is not NULL.

cluster

[integer vector] the grouping variable relative to which the observations are iid.

conf.level

[numeric, 0-1] level of the confidence intervals.

...

additional argument passed to estimate2 when using a lvmfit object.

from, to

alternative to argument linfct. See lava::effects.

df

[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.

ssc

[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.

Details

When argument object is a lvmfit object, the method first calls estimate2 and then extract the confidence intervals.