Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

psem

Fitting piecewise structural equation models


Description

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

Usage

psem(...)

Arguments

...

A list of structural equations

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.

Value

Returns an object of class psem

Author(s)

Jon Lefcheck <lefcheckj@si.edu>

See Also

Examples

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

summary(mod)

piecewiseSEM

Piecewise Structural Equation Modeling

v2.1.2
GPL-3
Authors
Jon Lefcheck [aut, cre], Jarrett Byrnes [aut], James Grace [aut]
Initial release
2020-12-09

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.