opt.nm.1: Search for the optimal missing pattern with only one missing...

Description Usage Arguments Value See Also

View source: R/opt-nm-1.R

Description

opt.nm.1 is an internal function that runs simulations using Mplus. It returns the optimal missing pattern that only contains one missing measured variable. This is the first step of forward assembly.

Usage

1
2
opt.nm.1(VNAMES, distal.var, n, nreps, seed, Time, k, Time.complete,
  costmx, pc, pd, design0.out, focal.param, complete.var = NULL)

Arguments

VNAMES

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

distal.var

Char vector. Specify the names of the variables, if there are any time-independent distal variables included in the model that are not subject to planned missingness.

n

The total sample size as initially planned.

nreps

Number of replications for Monte Carlo simulations.

seed

The seed for random number generation.

Time

The total number of time points (i.e., the total number of data collection waves).

k

The number of observed variables collected at each wave.

Time.complete

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

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.

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., drop from the longitudinal study). This value can be 0.

design0.out

An object returned by readModels. To obtain this object, the user need to have a Mplus output file which contains the a priori power analysis results for this specific model assuming a complete data design (i.e., simulation-based power analysis for sample size planning). In principle, a priori power analysis is supposed to be conducted before the study began.

focal.param

Char vector. The parameters of focal interest. The focal parameters should be specified in the specific format based on the Mplus output object design0.out.

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.

Value

An object containing the information of the optimal missing data pattern containing only one missing observed variable. The optimal pattern is the one that yields highest statistical power for testing the focal parameters, compared to other patterns with only one missing observed variable.

See Also

simPM which is a warpper function for this function.


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