selected {modnets} | R Documentation |
Shows which variables were selected for each node of a network
Description
Provides a quick representation showing which variables were selected as
predictors of each node in a network, both for unmoderated and moderated
networks. Especially useful as a way to see which variables were selected in
a variable selection procedure, such as through the varSelect
and resample
functions.
Usage
selected(object, threshold = FALSE, mod = c("temporal", "between"))
Arguments
object |
Output from either |
threshold |
Can be a numeric value between |
mod |
Only relevant to models fit with |
Details
The threshold
argument allows the user to set a threshold for
p-values, such that the output only reflects the predictors that are
significant at that threshold. This argument can be utilized whether or not a
variable selection procedure has been employed.
Value
A table where the columns represent nodes, and the rows show which
variables were selected in predicting each node. For moderated networks,
the output is a list that separates main effects (mods
) from
interaction effects (ints
).
See Also
Examples
fit1 <- fitNetwork(ggmDat)
selected(fit1)
fit2 <- mlGVAR(mlgvarDat, m = 'M', verbose = FALSE)
selected(fit2, threshold = TRUE, mod = 'temporal') # Can also set to 'between'
fit3 <- fitNetwork(gvarDat, moderators = 'M', type = 'varSelect', lags = 1)
selected(fit3)