getSortedPsem: Get a sorted psem object in DAG order

View source: R/helpers.R

getSortedPsemR Documentation

Get a sorted psem object in DAG order

Description

Takes a [psem] object, pulls out the DAG, and then sorts the psem object into the order of the DAG (from exogenous to terminal endogenous variable) for use by other functions. Note: removes correlated errors.

Usage

getSortedPsem(object, keepdata = TRUE)

Arguments

object

A fit [psem] object

keepdata

Defaults to TRUE. Should the data with the psem be included in the returned object?

Value

A new [psem] object, without the data.


piecewiseSEM documentation built on March 7, 2023, 7:45 p.m.