group_out: Group like-terms from left-hand side, and output lavaan...

Description Usage Arguments Examples

View source: R/make_lav_syntax.R

Description

Separates three kinds of equations * latent variable: uses "=~" operator * latent covariance: uses '~~' with lhs != rhs * residual variance: uses '~~' with lhs == rhs

Usage

1

Arguments

d

data.frame specifying lavaan partable

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# Build partable
make_meas <- make_edge(op='=~')
make_cov <-  make_edge(op='~~')
partable <- rbind(
   make_meas('A', c('A1','A2'), 'lam_A'),
   make_meas('B', c('B1','B2'), 'lam_B'),
   make_cov( 'A', 'B', 'cov_AxB'),
   make_cov( 'A', 'A', ""),
   make_cov( 'B', 'B', "")
)
# Convert to lavaan string syntax
group_out(partable)

machow/lavtools documentation built on May 21, 2019, 10:51 a.m.