psem is used to unite a list of structural equations into a single structural equation model.

psem(...)

Arguments

A list of structural equations

Value

Returns an object of class psem

Details

psem takes a list of structural equations, which can be model objects of classes: lm, glm, gls, pgls, sarlm, lme, glmmPQL, lmerMod, lmerModLmerTest, glmerMod.

It also takes objects of class formula, formula.cerror, corresponding to additional variables to be included in the tests of directed separation (X ~ 1) or correlated errors (X1 %~~% X2).

The function optionally accepts data objects of classes: matrix, data.frame, SpatialPointsDataFrame, comparative.data, or these are derived internally from the structural equations.

See also

Examples

mod <- psem( lm(rich ~ cover, data = keeley), lm(cover ~ firesev, data = keeley), lm(firesev ~ age, data = keeley), data = keeley ) summary(mod)
#> | | | 0% | |======================= | 33% | |=============================================== | 67% | |======================================================================| 100%
#> #> Structural Equation Model of mod #> #> Call: #> rich ~ cover #> cover ~ firesev #> firesev ~ age #> #> AIC BIC #> 35.136 57.634 #> #> --- #> Tests of directed separation: #> #> Independ.Claim Estimate Std.Error DF Crit.Value P.Value #> cover ~ age + ... -0.0048 0.0027 87 -1.8018 0.0750 #> rich ~ age + ... -0.2559 0.1270 87 -2.0146 0.0470 * #> rich ~ firesev + ... -2.0714 1.0597 86 -1.9546 0.0539 #> #> Global goodness-of-fit: #> #> Fisher's C = 17.136 with P-value = 0.009 and on 6 degrees of freedom #> #> --- #> Coefficients: #> #> Response Predictor Estimate Std.Error DF Crit.Value P.Value Std.Estimate #> rich cover 15.6727 4.7931 88 3.2698 0.0015 0.3291 ** #> cover firesev -0.0839 0.0184 88 -4.5594 0.0000 -0.4371 *** #> firesev age 0.0597 0.0125 88 4.7781 0.0000 0.4539 *** #> #> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 #> #> Individual R-squared: #> #> Response method R.squared #> rich none 0.11 #> cover none 0.19 #> firesev none 0.21