gtheorys {quest} | R Documentation |
Generalizability Theory Reliability of Multiple Scores
Description
gtheorys
uses generalizability theory to compute the reliability
coefficient of multiple scores. It assumes single-level data where the rows
are cases and the columns are variables/items. Generaliability theory
coefficients in this case are the same as intraclass correlations (ICC). The
default computes ICC(3,k), which is identical to cronbach's alpha, from
cross.vrb
= TRUE. When cross.vrb
is FALSE, ICC(2,k) is
computed, which takes mean differences between variables/items into account.
gtheorys
is a wrapper function for ICC
.
Usage
gtheorys(
data,
vrb.nm.list,
ci.type = "classic",
level = 0.95,
cross.vrb = TRUE,
R = 200L,
boot.ci.type = "perc"
)
Arguments
data |
data.frame of data. |
vrb.nm.list |
list of character vectors containing colnames from
|
ci.type |
character vector of length = 1 specifying the type of confidence interval to compute. There are currently two options: 1) "classic" = traditional ICC-based confidence intervals (see details), 2) "boot" = bootstrapped confidence intervals. |
level |
double vector of length 1 specifying the confidence level from 0 to 1. |
cross.vrb |
logical vector of length 1 specifying whether the variables/items should be crossed when computing the generalizability theory coefficients. If TRUE, then only the covariance structure of the variables/items will be incorperated into the estimates of reliability. If FALSE, then the mean structure of the variables/items will be incorperated. |
R |
integer vector of length 1 specifying the number of bootstrapped
resamples to use. Only used if |
boot.ci.type |
character vector of length 1 specifying the type of
bootstrapped confidence interval to compute. The options are 1) "perc" for
the regular percentile method, 2) "bca" for bias-corrected and accelerated
percentile method, 3) "norm" for the normal method that uses the
bootstrapped standard error to construct symmetrical confidence intervals
with the classic formula around the bias-corrected estimate, and 4) "basic"
for the basic method. Note, "stud" for the studentized method is NOT an
option. See |
Details
When ci.type
= "classic" the confidence intervals are computed
according to the formulas laid out by McGraw, Kenneth and Wong (1996). These
are taken from the ICC
function in the psych
package. They are appropriately non-symmetrical given ICCs are not unbounded
and range from 0 to 1. Therefore, there is no standard error associated with
the coefficient. Note, they differ from the confidence intervals available in
the cronbachs
function. When ci.type
= "boot" the
standard deviation of the empirical sampling distribution is returned as the
standard error, which may or may not be trustworthy depending on the value of
the ICC and sample size.
Value
data.frame containing the generalizability theory statistical information. The columns are as follows:
- est
the generalizability theory coefficient itself
- se
standard error of the reliability coefficient
- lwr
lower bound of the confidence interval for the reliability coefficient
- lwr
lower bound of the confidence interval for the reliability coefficient
References
McGraw, Kenneth O. and Wong, S. P. (1996), Forming inferences about some intraclass correlation coefficients. Psychological Methods, 1, 30-46. + errata on page 390.
See Also
Examples
dat0 <- psych::bfi[1:100, ] # reduce number of rows
# to reduce computational time of boot examples
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(data = dat1, vrb.nm.list = vrb_nm_list)
## Not run:
gtheorys(data = dat1, vrb.nm.list = vrb_nm_list, ci.type = "boot") # singular messages
gtheorys(data = dat1, vrb.nm.list = vrb_nm_list, ci.type = "boot",
R = 250L, boot.ci.type = "bca")
## End(Not run)
gtheorys(data = attitude,
vrb.nm.list = list(names(attitude))) # also works with only one set of variables/items