as.model {causalSLSE}R Documentation

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 class 'slseFit'
as.model(x, ...)

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

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

Arguments

x

An object containing the model to extract.

...

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

Value

The method returns an object of class slseModel or cslseModel.

Examples

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)

[Package causalSLSE version 0.3-1 Index]