Learn R Programming

gtheory (version 0.1.2)

gstudy: Conduct a Univariate or Multivariate Generalizability (G) Study

Description

gstudy estimates variance components attributable to objects of measurement (e.g., persons) and facets (e.g., items and raters), as well as unexplained variation.

Usage

gstudy(data, ...)
"gstudy"(data, formula, colname.strata = NULL, colname.objects = NULL, keep.mer = F, ...)
"gstudy"(data, formula, colname.strata = NULL, colname.objects = NULL, keep.mer = F, ...)
"gstudy"(data, formula, colname.strata = NULL, colname.objects = NULL, keep.mer = F, ...)

Arguments

data
a data frame in long format with a column for item scores and columns for sources of variance
...
additional arguments to be passed to lmer
formula
a formula specifying the model to be estimated by lmer
colname.strata
an optional string that specifies the name of the column containing strata (if conducting a multivariate G study)
colname.objects
an optional string that specifies the name of the column containing objects of measurement for calculating observed-score covariance (if conducting a multivariate G study)
keep.mer
a logical indicating whether or not to store the output from lmer as an attribute of the variance components data frame

Value

an object of class "gstudy" that lists variance components of class "components". It will also list observed-score variance and covariance between strata if you specify the names of the columns identifying strata and objects of measurement.

Methods (by class)

  • data.frame: G study of a data.frame object
  • univariate: G study of a univariate object
  • multivariate: G study of a multivariate object

References

Brennan, R. L. (2001). Generalizability theory. New York: Springer.

Rajaratnam, N., Cronbach, L. J., & Gleser, G. C. (1965). Generalizability of stratified-parallel tests. Psychometrika, 30(1), 39-56.

Examples

Run this code
#Conduct a univariate G study.
#Compare to results on page 116 of Brennan (2001).
data(Brennan.3.2)
formula.Brennan.3.2 <- "Score ~ (1 | Person) + (1 | Task) + 
  (1 | Rater:Task) + (1 | Person:Task)"
gstudy(data = Brennan.3.2, formula = formula.Brennan.3.2)

#Conduct a multivariate G study.
#Compare to results on page 270 of Brennan (2001).
data(Rajaratnam.2)
formula.Rajaratnam.2 <- "Score ~ (1 | Person) + (1 | Item)"
gstudy(data = Rajaratnam.2, formula = formula.Rajaratnam.2, colname.strata = "Subtest", 
  colname.objects = "Person")

Run the code above in your browser using DataLab