Learn R Programming

semfindr (version 0.1.9)

sem_dat2: Sample Data: A Latent Variable Structural Model With an Influential Case

Description

A ten-variable dataset with 200 cases, with one influential case.

Usage

sem_dat2

Arguments

Format

A data frame with 200 rows and 10 variables:

case_id

Case ID. Character.

x1

Indicator. Numeric.

x2

Indicator. Numeric.

x3

Indicator. Numeric.

x4

Indicator. Numeric.

x5

Indicator. Numeric.

x6

Indicator. Numeric.

x7

Indicator. Numeric.

x8

Indicator. Numeric.

x9

Indicator. Numeric.

Examples

Run this code
library(lavaan)
data(sem_dat2)
mod <-
"
f1 =~  x1 + x2 + x3
f2 =~  x4 + x5 + x6
f3 =~  x7 + x8 + x9
f2 ~ a * f1
f3 ~ b * f2
ab := a * b
"
fit <- sem(mod, sem_dat2)
summary(fit)
inf_out <- influence_stat(fit)
gcd_plot(inf_out)

Run the code above in your browser using DataLab