partialprune: Partial pruning of multi-group models

View source: R/e_modelmodifications_partialprune.R

partialpruneR Documentation

Partial pruning of multi-group models


This function will search for a multi-group model with equality constrains on some but not all parameters. This is called partial pruning (Epskamp, Isvoranu, & Cheung, 2020; Haslbeck, 2020). The algorithm is as follows: 1. remove all parameters not significant at alpha in all groups (without equality constrains), 2. create a union model with all parameters included in any group included in all groups and constrained equal. 3. Stepwise free equality constrains of the parameter that features the largest sum of modification indices until BIC can no longer be improved. 4. Select and return (by default) the best model according to BIC (original model, pruned model, union model and partially pruned model).


partialprune(x, alpha = 0.01, matrices, verbose, combinefun = unionmodel, 
             return = c("best","partialprune","union_equal","prune"),
               criterion = "bic",  best = c("lowest","highest"), ...)



A psychonetrics model.


Significance level to use.


Vector of strings indicating which matrices should be pruned. Will default to network structures.


Logical, should messages be printed?


Function used to combine models of different groups.


What model to retur? "best" for best fitting model (according to BIC, "partialprune" for the partialpruned model, "union_equal" for the union model with equality constraints, and "prune" for the originally pruned model without equality constraints.)


Should the lowest or the highest index of criterion be used to select the final model?


What criterion to use for the model selection in the last step? Defaults to "bic" for BIC selection.


Arguments sent to prune.


Sacha Epskamp <>


Epskamp, S., Isvoranu, A. M., & Cheung, M. (2020). Meta-analytic gaussian network aggregation. PsyArXiv preprint. DOI:10.31234/

Haslbeck, J. (2020). Estimating Group Differences in Network Models using Moderation Analysis. PsyArXiv preprint. DOI:10.31234/

psychonetrics documentation built on June 22, 2024, 10:29 a.m.