modelAveraging: modelAveraging

Description Usage Arguments Details Value References

View source: R/modelAveraging.R

Description

Apply Bayesian model averaging for aggregating the results of multiple partial MI models. Uses STAN. Can currently deal with two-group models for metric items or dichotomous items (Rasch or 2PL model).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
bma <- modelAveraging(res_clusterItems = NULL,
                             res_modelAveraging = NULL,
                             weights = NULL,
                             CPUcores = 2,
                             chains = 2,
                             iter = NULL,
                             burninPerc = 0.5,
                             silent = FALSE,
                             partialMIwhat,
                             anchors = NULL,
                             ...)

Arguments

res_clusterItems

Object generated by clusterItems. Delivers the clustering structure as well as the model setup.

res_modelAveraging

Object generated by previous use modelAveraging. An alternative to res_clusterItems. Different weights can thereby be applied in a timely manner.

weights

Weights in numerical order of the clusters. This represents the believe of the researcher in the plausibility of the item cluster as appropriate anchors (see Schulze & Pohl, 2021). With no prior knowledge or beliefs, weights should be chosen to be equally distributed across all clusters. Weights have to sum to one.

CPUcores

Number of CPU cores to be used. Defaults to 2.

chains

Number of chains. Defaults to 2.

iter

Number of total iterations. Defaults to 2'000 for metric items (blavaan) and 10'000 for dichotomous items (IRT models)

burninPerc

Percentage of burn-in iteration of the total iterations. Defaults to 0.5.

silent

Do not print summary output? Defaults to FALSE.

partialMIwhat

String, either "loadings", "difficulties", or c("loadings", "difficulties"). Has not to be specified when using res_clusterItems but when setting up a new MI model. This is an equivalent to clusterWhat in clusterMI. @param ... Arguments of testMI, if testMI or clusterItems has not been called before to describe a measurement model.

anchors

A list of vectors of item names which shall serve as anchors.

Details

If multiple cores are used (like in the default), STAN will maximize the Viewer Tab of RStudio.

Value

Bayesian Average of the mean difference of two groups ("muAver"). Info on convergence and precision. All fitted STAN objects.

References

Schulze, D., & Pohl, S. (2021). Measurement Invariance: Dealing with the uncertainty in anchor item choice by model averaging. [Manuscript submitted]


Dani-Schulze/measurementInvariance documentation built on Jan. 28, 2022, 1:56 a.m.