Description Usage Arguments Details Value Author(s) References

View source: R/filter.exogenous.R

Identifies exogenous variables (variables that have no paths leading to them) and removes them from the basis set when they appear as responses.

1 | ```
filter.exogenous(modelList, basis.set, corr.errors, add.vars)
``` |

`modelList` |
a |

`basis.set` |
an |

`corr.errors` |
a vector of variables with correlated errors (separated by "~~"). |

`add.vars` |
a vector of additional variables whose independence claims should be evaluated, but which do not appear in the model list. |

Helper function for `sem.basis.set`

that removes independence claims between two exogenous (i.e., independent) variables, as the direction of causality cannot be reliably inferred from the SEM model list.

Returns a `list`

of independence claims. Each entry in the `list`

is a vector where the first entry is the predictor whose independence from the response is being evaluated, the second is the response, and remaining entries represent the variables on which the independence claim is conditional. E.g.,

[1] `"x1" "y" "x2"`

would be the missing path between `y ~ x1`

conditional on `x2`

. The basis set is constructed using the function `basiSet`

in the `ggm`

package.

Jon Lefcheck

Shipley, Bill. "A new inferential test for path models based on directed acyclic graphs." Structural Equation Modeling 7.2 (2000): 206-218.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.