partialprune: Partial pruning of multi-group models

View source: R/e_modelmodifications_partialprune.R

partialpruneR Documentation

Partial pruning of multi-group models

Description

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).

Usage

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

Arguments

x

A psychonetrics model.

alpha

Significance level to use.

matrices

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

verbose

Logical, should messages be printed?

combinefun

Function used to combine models of different groups.

return

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.)

best

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

criterion

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

...

Arguments sent to prune.

Author(s)

Sacha Epskamp <mail@sachaepskamp.com>

References

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

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


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