tidy_sem: Structural equation model

Description Usage Arguments Value Examples

Description

Conduct latent variable model analysis (structural equation modeling)

Usage

1
tidy_sem(.data, model = NULL, robust = FALSE, ...)

Arguments

robust

Logial indicating whether to use a robust estimator.

...

Model formula to be estimated.

data

Data frame containing variables in model

Value

A model object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## specify sem model and estimate
m1 <- polcom %>%
  tidy_sem_model(news =~ news_1 + news_2 + news_3 + news_4 + news_5 + news_6,
    ambiv_sexism =~ ambiv_sexism_1 + ambiv_sexism_2 + ambiv_sexism_3 +
    ambiv_sexism_4 + ambiv_sexism_5 + ambiv_sexism_6,
    partisan =~ a*therm_1 + a*therm_2,
    ambiv_sexism ~ age + sex + hhinc + edu + news + partisan)

## view summary
m1 %>%
  tidy_summary()

mkearney/tidyacademic documentation built on May 14, 2019, 6:12 a.m.