Skip to contents

Generate parameter table for lavaan syntax

Usage

modsemify(syntax)

Arguments

syntax

model syntax

Value

data.frame with columns lhs, op, rhs, mod

Examples

library(modsem)
m1 <- '
  # Outer Model
  X =~ x1 + x2 +x3
  Y =~ y1 + y2 + y3
  Z =~ z1 + z2 + z3

  # Inner model
  Y ~ X + Z + X:Z
'
modsemify(m1)
#>    lhs op rhs mod
#> 1    X =~  x1    
#> 2    X =~  x2    
#> 3    X =~  x3    
#> 4    Y =~  y1    
#> 5    Y =~  y2    
#> 6    Y =~  y3    
#> 7    Z =~  z1    
#> 8    Z =~  z2    
#> 9    Z =~  z3    
#> 10   Y  ~   X    
#> 11   Y  ~   Z    
#> 12   Y  ~ X:Z