Learn R Programming

causalSLSE (version 0.4-1)

as.model: Converter into Model Objects

Description

When the information about a model is available, it reconstructs it and returns a valid model object.

Usage

# S3 method for slseFit
as.model(x, ...)

# S3 method for cslseFit as.model(x, ...)

# S3 method for cslse as.model(x, ...)

Value

The method returns an object of class slseModel or cslseModel.

Arguments

x

An object containing the model to extract.

...

Other arguments to pass to other methods. Currently not used.

Examples

Run this code
data(simDat3)
mod <- cslseModel(Y ~ Z | ~ X1 * X2, data = simDat3)
fit <- estSLSE(mod)

## Extract the model from a cslseModel object

as.model(fit)

## Extract the model from a cslse object

cs <- causalSLSE(mod)
as.model(cs)

Run the code above in your browser using DataLab