mxComputeBootstrap: Repeatedly estimate model using resampling with replacement

View source: R/MxCompute.R

mxComputeBootstrapR Documentation

Repeatedly estimate model using resampling with replacement

Description

This is a low-level compute plan object to perform resampling with replacement.

Usage

mxComputeBootstrap(data, plan, replications=200, ...,
                        verbose=0L, parallel=TRUE, freeSet=NA_character_,
			OK=c("OK", "OK/green"), only=NA_integer_)

Arguments

data

A vector of dataset or model names.

plan

The compute plan used to optimize the model for each data set.

replications

The number of resampling replications. If available, replications from prior mxBootstrap invocations will be reused.

...

Not used. Forces remaining arguments to be specified by name.

verbose

For levels greater than 0, enables runtime diagnostics

parallel

Whether to process the replications in parallel

freeSet

names of matrices containing free variables

OK

The set of status code that are considered successful

only

When provided, only the given replication from a prior run of mxBootstrap will be performed. See details.

Details

The ‘only’ option facilitates investigation of a single replication attempt.

Value

Output is stored in the compute object's output slot. Specifically, model$compute$output$raw contains a data frame with parameters in columns and replications in rows. In addition to parameters, the seed, fit, and statusCode of the replication is also included.

When ‘only’ is set to a particular replications, the weight vectors (one per dataset) are also returned in the compute object's output slot. model$compute$output$weight is a character vector (by dataset name) of numeric vectors (the weights). These weights can be used to recreate a model identical to the model used in the given replication.

See Also

mxBootstrap, as.statusCode


OpenMx documentation built on Nov. 8, 2023, 1:08 a.m.