data_sem16 {semlrtp}R Documentation

Sample Dataset For Test (16 Items and 2 Groups)

Description

A 16-variable dataset with 336 cases.

Usage

data_sem16

Format

A data frame with 336 rows and 16 variables:

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.

x10

Indicator. Numeric.

x11

Indicator. Numeric.

x12

Indicator. Numeric.

x13

Indicator. Numeric.

x14

Indicator. Numeric.

x15

Indicator. Numeric.

x16

Indicator. Numeric.

group

Group with two values, "alpha" and "gamma". Character.

Examples

library(lavaan)
data(data_sem16)
mod <-
"
f1 =~ x1 + x2 + x3 + x4
f2 =~ x5 + x6 + x7 + x8
f3 =~ x9 + x10 + x11 + x12
f4 =~ x13 + x14 + x15 + x16
f3 ~ f2 + f1
f4 ~ f3
"
fit <- sem(mod, data_sem16)
summary(fit)

[Package semlrtp version 0.1.1 Index]