adjust: p-value adjustment method to use. See p.adjust.
matrices: Vector of strings indicating which matrices should be pruned. Will default to network structures.
runmodel: Logical, should the model be evaluated after pruning?
recursive: Logical, should the pruning process be repeated?
verbose: Logical, should messages be printed?
log: Logical, should the log be updated?
identify: Logical, should models be identified automatically?
startreduce: A numeric value indicating a factor with which the starting values should be reduced. Can be useful when encountering numeric problems.
limit: The maximum number of parameters to be pruned.
mode: Mode for adjusting for multiple comparisons. Should all parameters be considered as the total number of tests or only the tested parameters (parameters of interest)?
...: Arguments sent to runmodel
Returns
An object of the class psychonetrics (psychonetrics-class )
Author(s)
Sacha Epskamp
See Also
stepup
Examples
# Load bfi data from psych package:library("psychTools")data(bfi)# Also load dplyr for the pipe operator:library("dplyr")# Let's take the agreeableness items, and gender:ConsData <- bfi %>% select(A1:A5, gender)%>% na.omit # Let's remove missingness (otherwise use Estimator = "FIML)# Define variables:vars <- names(ConsData)[1:5]# Let's fit a full GGM:mod <- ggm(ConsData, vars = vars, omega ="full")# Run model:mod <- mod %>% runmodel
# Prune model:mod <- mod %>% prune(adjust ="fdr", recursive =FALSE)