balance.miss.l: Search for the optimal balanced item-level planned missing...

Description Usage Arguments Value See Also

View source: R/balanced-simsem.R

Description

balance.miss.l runs simulations using lavaan and simsem. It returns the search results for optimal balanced item-level PM designs.

Usage

1
2
3
4
balance.miss.l(popModel, analyzeModel, NAMES, Time, Time.complete, k, pc,
  pd, costmx, n, nreps, focal.param, complete.var = NULL,
  eval.budget = T, rm.budget = NULL, distal.var = NULL,
  seed = 1234)

Arguments

popModel

The data generation model (population model) specified using lavaan script.

analyzeModel

The analysis model, specified using lavaan script. The analysis model can be different from the population model.

NAMES

A character vector containing the names of the observed variables. The variable names must be ordered chronologically, by the time (wave) they are measured.

Time

Numeric. The total number of time points (or total number of waves of data collection).

Time.complete

Numeric. Number of waves of data collection that have been completed before the funding cut occurs.

k

Numeric. The number of observed variables collected at each wave.

pc

Numeric. Proportion of completers: the proportion of subjects that will participate in all of the following waves of data collection and provide complete data. This must be greater than 0.

pd

Numeric. The proportion of subjects that will not participate in any of the following waves of data collection (i.e., people who will drop from the longitudinal study). This value can be 0.

costmx

A numeric vector containing the unit cost of each observed variable that is yet to be measured (post the funding cut). The cost is assumed to be constant across subjects, but it is allowed to vary across variables and across waves.

n

The total sample size as initially planned.

nreps

Number of replications for Monte Carlo simulations.

focal.param

Character vector. The parameters of focal interest. The focal parameters should be specified in the format of lavaan script.

complete.var

Char vector. Specify the name(s) of the variable(s) if there are any variable(s) that need to have complete data collected from all the participating subjects.

eval.budget

Logical scalar (TRUE or FALSE), indicating whether there is any budget constraint. If the user wishes to search for PM designs under the budget limit, they need to specify the amount of the remaining available budget that can be used for future data collection.

rm.budget

Numeric. The amount of remaining budget avaialbe for future data collection. User must supply a value for this argument if eval.budget = TRUE.

distal.var

Char vector. Specify the name(s) of the distal variables. User needs to specify this argument if there are any time-independent distal variables included in the model that are not subject to planned missingness.

seed

The random seed for random number generation.

Value

An object containing the information of the optimal balanced item-level missing design. The optimal design is the one that yields highest power for testing the focal parameters, compared to other plausible candidate PM designs.

See Also

simPM which is a warpper function for this function.


YiFengEDMS/simPM documentation built on July 25, 2020, 4:08 a.m.