kfoldBootstrap: (Repeated) _k_-Fold Bootstrap

Description Usage Arguments Value See Also Examples

View source: R/bootstrap_methods.R

Description

(Repeated) k-Fold Bootstrap

Usage

1
2
3
kfoldBootstrap(responseData, modelTypes, bootSize = 50, folds = 10,
  replications = 1, indicator = TRUE, ..., seed = NULL,
  type = "person")

Arguments

responseData

The initial, full sample data as a matrix of item responses.

modelTypes

A character vector specifying the model types to be compared. Uses the 'TAM' package format, so must be one of the following: "1PL", "2PL", "PCM", "PCM2", "RSM", "GPCM", and "2PL.groups".

bootSize

An integer value greater than 0 that indicates the number of bootstrap samples to draw.

folds

An integer value indicating the number of cross-validation folds to split the data into during the cross-validation process.

replications

The number of replications of the bootstrap procedure to perform. Not suggested to use as for the standard bootstrap changing the 'bootSize' is more efficient.

indicator

A logical value that controls the progress printing.

...

Further arguments to be passed to the 'tam' function.

seed

Either a positive integer setting the random seed, or 'NULL'.

type

A character vector specifying whether the validation treats the "person" or the "item" as the unit of observation. Default is "person".

leaveOneOut

A logical value indicating whether to use 'leaveOneOut' bootstrap. Not suggested for use.

Value

A list object of class "cvIRT" with the following values:

call

The original function calls.

seed

The random seed that produced the results.

bootstrapSamples

A list of each bootstrap samples' training data.

testLik

A matrix of the loglikelihood values estimated on the testing data for each model within each holdout replication.

nModelParams

A matrix of the number model parameters estimated on the training data within each holdout replication.

AIC

A matrix of the AIC value for each holdout replication, as well as the mean value across each replication.

AICc

A matrix of the AICc value for each holdout replication, as well as the mean value across each replication.

BIC

A matrix of the BIC value for each holdout replication, as well as the mean value across each replication.

-2 log-Likelihood Ratio Test

A list of the log-likelihood ratio test statistics, degrees of freedom, and p-values for each model comparison and each replication, as well as the test using the mean test statistics and degrees of freedom. If only one model is used, returns 'NULL'.

warnings

A character vector of any warnings incurred while the method runs.

time

A vector of the start and end times of the function.

See Also

Other bootstrap: simpleBootstrap

Examples

1
#None.

AnthonyRaborn/cvIRT documentation built on Jan. 9, 2020, 3:26 a.m.