Learn R Programming

⚠️There's a newer version (0.7.2) of this package.Take me there.

semEff

semEff provides functionality to automatically calculate direct, indirect, and total effects for ‘piecewise’ structural equation models, comprising lists of fitted models representing structured equations (Shipley 2000, 2009; Lefcheck 2016). Confidence intervals are provided via bootstrapping.

Currently supported model classes are "lm", "glm", "lmerMod", "glmerMod", "lmerModLmerTest", "gls", and "betareg".

Installation

You can install the released version of semEff from CRAN with:

install.packages("semEff")

And the development version from GitHub with:

devtools::install_github("murphymv/semEff@dev")

Usage

The primary function is semEff(), which returns an object of class "semEff" with associated print() and summary() methods. Everything can technically be accomplished in a single call to semEff(); however, since bootstrapping is employed to generate resamples for confidence intervals (via bootEff()), it is usually preferable to save these estimates separately prior to calling semEff() — allowing more flexibility and saving time if/when recalling the function.

Examples

Package functions are well-documented and most include some short examples. In addition, see the following vignettes for some longer demonstrations:

References

Lefcheck, J. S. (2016). piecewiseSEM: Piecewise structural equation modelling in R for ecology, evolution, and systematics. Methods in Ecology and Evolution, 7(5), 573–579. https://doi.org/f8s8rb

Shipley, B. (2000). A New Inferential Test for Path Models Based on Directed Acyclic Graphs. Structural Equation Modeling: A Multidisciplinary Journal, 7(2), 206–218. https://doi.org/cqm32d

Shipley, B. (2009). Confirmatory path analysis in a generalized multilevel context. Ecology, 90(2), 363–368. https://doi.org/bqd43d

Copy Link

Version

Install

install.packages('semEff')

Monthly Downloads

9,767

Version

0.6.0

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Mark Murphy

Last Published

October 12th, 2021

Functions in semEff (0.6.0)

getEff

Get SEM Effects
RVIF

Root Variance Inflation Factors
getData

Get Model Data
R2

R-squared
bootCI

Bootstrap Confidence Intervals
bootEff

Bootstrap Effects
avgEst

Weighted Average of Model Estimates
VIF

Generalised Variance Inflation Factors
Object.Type

Object Types
predEff

Predict Effects
print.semEff

Print "semEff" Objects
rMapply

getX

Get Model Design Matrix
Param.Type

Parameter Types
print.bootCI

Print "bootCI" Objects
semEff

SEM Effects
getY

Get Model Response Variable
varW

Weighted Variance
shipley

Simulated Data from Shipley (2009)
shipley.growth

Candidate Model Set from Shipley 'Growth' Model
shipley.sem.boot

Bootstrapped Estimates for Shipley SEM
xNam

Get Model Term Names
pSapply

stdEff

Standardised Effects
glt

Generalised Link Transformation
summary.semEff

Summarise SEM Effects
shipley.sem.eff

Effects for Shipley SEM
shipley.sem

Hypothesised SEM from Shipley (2009)
sdW

Weighted Standard Deviation
semEff-package

semEff: Automatic Calculation of Effects for Piecewise Structural Equation Models