regressions: regressions

View source: R/regularizationHelper.R

regressionsR Documentation

regressions

Description

Extract the labels of all regressions found in a lavaan model.

Usage

regressions(lavaanModel)

Arguments

lavaanModel

fitted lavaan model

Value

vector with parameter labels

Examples

# The following is adapted from ?lavaan::sem
library(lessSEM)
model <- ' 
  # latent variable definitions
  ind60 =~ x1 + x2 + x3
  dem60 =~ y1 + a*y2 + b*y3 + c*y4
  dem65 =~ y5 + a*y6 + b*y7 + c*y8

  # regressions
  dem60 ~ ind60
  dem65 ~ ind60 + dem60

  # residual correlations
  y1 ~~ y5
  y2 ~~ y4 + y6
  y3 ~~ y7
  y4 ~~ y8
  y6 ~~ y8
'

fit <- sem(model, data = PoliticalDemocracy)

regressions(fit)

lessSEM documentation built on May 29, 2024, 7:10 a.m.