coefs {piecewiseSEM}R Documentation

Extract path coefficients

Description

Extracts (standardized) path coefficients from a psem object.

Usage

coefs(
  modelList,
  standardize = "scale",
  standardize.type = "latent.linear",
  test.statistic = "F",
  test.type = "II",
  intercepts = FALSE
)

Arguments

modelList

A list of structural equations, or a model.

standardize

The type of standardization: none, scale, range. Default is scale.

standardize.type

The type of standardized for non-Gaussian responses: latent.linear, Menard.OE. Default is latent.linear for binomial; otherwise it is Menard.OE.

test.statistic

the type of test statistic generated by Anova

test.type

the type of test for significance of categorical variables from Anova. Default is type "II".

intercepts

Whether intercepts should be included in the coefficients table. Default is FALSE.

Details

P-values for models constructed using lme4 are obtained using the Kenward-Roger approximation of the denominator degrees of freedom as implemented in the Anova function.

Different forms of standardization can be implemented using the standardize argument:

For non-Gaussian responses, standardized coefficients are obtained in one of two ways:

For categorical predictors: significance is determined using ANOVA (or analysis of deviance). Because n-1 coefficients are reported for n levels, the output instead reports model-estimated means in the Estimate column. This is done so all n paths in the corresponding path diagram have assignable values.

The means are generated using function emmeans in the emmeans package. Pairwise contrasts are further conducted among all levels using the default correction for multiple testing. The results of those comparisons are given in the significance codes (e.g., "a", "b", "ab") as reported in the multcomp::cld function.

For non-linear variables (i.e., smoothing functions from mgcv::gam), there are no linear estimates reported.

Value

Returns a data.frame of coefficients, their standard errors, degrees of freedom, and significance tests.

Author(s)

Jon Lefcheck <LefcheckJ@si.edu>, Jim Grace

References

Grace, J.B., Johnson, D.A., Lefcheck, J.S., and Byrnes, J.E. "Standardized Coefficients in Regression and Structural Models with Binary Outcomes." Ecosphere 9(6): e02283.

See Also

Anova, emmeans, cld

Examples

mod <- psem(
lm(rich ~ cover, data = keeley),
lm(cover ~ firesev, data = keeley),
lm(firesev ~ age, data = keeley),
data = keeley
)

coefs(mod)


[Package piecewiseSEM version 2.3.0.1 Index]