.gtheorys {quest}R Documentation

Bootstrap Function for gtheorys() Function

Description

.gtheorys is the function used by the boot function within the gtheorys function. It is primarily created to increase the computational efficiency of bootstrap confidence intervals within the gtheorys function by doing only the minimal computations needed to compute the generalizability theory coefficient.

Usage

.gtheorys(dat, i, nm.list, cross.vrb)

Arguments

dat

data.frame of data. It can contain variables other than those used for generalizability theory coefficient calculation.

i

integer vector of length = nrow(dat) specifying which rows should be included in the computation. When used by the boot::boot function this argument will change with every new bootstrapped resample.

nm.list

list of character vectors specifying the sets of variables/items associated with each of the generalizability theory coefficient calculations.

cross.vrb

logical vector of length 1 specifying whether the variables/items should be crossed when computing the generalizability theory coefficient. If TRUE, then only the covariance structure of the variables/items will be incorperated into the estimate of reliability. If FALSE, then the mean structure of the variables/items will be incorperated.

Value

double vector of length = length(nm.list) providing the generalizability theory coefficients.

See Also

.gtheory gtheorys

Examples

dat0 <- psych::bfi[1:250, ]
dat1 <- str2str::pick(x = dat0, val = c("A1","C4","C5","E1","E2","O2","O5",
   "gender","education","age"), not = TRUE, nm = TRUE)
vrb_nm_list <- lapply(X = str2str::sn(c("E","N","C","A","O")), FUN = function(nm) {
   str2str::pick(x = names(dat1), val = nm, pat = TRUE)})
.gtheorys(dat = dat1,
   i = sample(x = 1:nrow(dat1), size = nrow(dat1), replace = TRUE),
   nm.list = vrb_nm_list, cross.vrb = TRUE)
.gtheorys(dat = dat1,
   i = sample(x = 1:nrow(dat1), size = nrow(dat1), replace = TRUE),
   nm.list = vrb_nm_list, cross.vrb = FALSE)

[Package quest version 0.2.0 Index]