Learn R Programming

nlsem (version 0.8-1)

as.data.frame: Coerce to a Data Frame

Description

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

Usage

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

Value

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

Arguments

x

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

...

additional arguments.

See Also

specify_sem, create_sem

Examples

Run this code
# 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)

Run the code above in your browser using DataLab