regmed.edges {regmed}R Documentation

For an object of class regmed, create edges for a graph object that can be used for plots, or for creating models input to lavaan function sem

Description

Using the names of the alpha, beta, and delta matrices in the fitted object, create directed edges

Usage

regmed.edges(fit, type="mediators", eps = 0.001)

Arguments

fit

The fit as an object of class mvregmed. This can be output from either mvregmed.fit or mvregmed.grid.bestfit.

type

Character string specifying whether to only keep edges for mediators that have a non-zero coefficient with exposure and response variables ("mediator") or all edges ("all").

eps

Threshold to determine whether any of alpha, beta, or delta parameters are close to zero to be rounded to zero.

Value

a list with class "regmed.edges" containing all.edge which is a data.framewith directed edges that are the names of x, mediator, y that are in the fitted model, with the coefficient for that edge. The plot method will plot the edges using igraph plotting options.

Author(s)

Daniel Schaid and Jason Sinnwell

References

Schaid DS, Dikilitas O, Sinnwell JP, Kullo I (2022). Penalized mediation models for multivariate data. Genet Epidemiol 46:32-50.

See Also

regmed.fit plot.regmed.edges


[Package regmed version 2.1.0 Index]