Learn R Programming

piecewiseSEM (version 1.2.1)

get.dag: Generates adjacency matrix from list of structured equations

Description

A helper function for sem.missing.paths that generates an adjacency matrix from a list of model formulae (generally recovered from a list of structured equations).

Usage

get.dag(formulaList)

Arguments

formulaList

a list of model formula(e).

Value

Returns a matrix of 0s and 1s, 0 indicating no relationship and 1 indicating a relationship, with columns being predictors and rows being responses.