as.data.frame: Coerce to a Data Frame

as.data.frameR Documentation

Coerce to a Data Frame

Description

Function to coerce an object created with specify_sem to a data frame.

Usage

## S3 method for class 'singleClass'
as.data.frame(x, ...)
## S3 method for class 'semm'
as.data.frame(x, ...)
## S3 method for class 'nsemm'
as.data.frame(x, ...)

Arguments

x

structural equation model of class singleClass, semm, or nsemm.

...

additional arguments.

Value

Returns a data frame with first column label and one column for each latent class labeled class1, class2 and so on.

See Also

specify_sem, create_sem

Examples

# specify model
model <- specify_sem(num.x = 6, num.y = 3, num.xi = 2, num.eta = 1,
  xi = "x1-x3,x4-x6", eta = "y1-y3", interaction = "eta1~xi1:xi2")

# coerce to data frame
as.data.frame(model)

nlsem documentation built on Aug. 31, 2023, 5:14 p.m.