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

Description Usage Arguments Value Methods (by class) References Examples

View source: R/gstudy.R

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
gstudy(data, ...)

## S3 method for class 'data.frame'
gstudy(data, formula, colname.strata = NULL,
  colname.objects = NULL, keep.mer = F, ...)

## S3 method for class 'univariate'
gstudy(data, formula, colname.strata = NULL,
  colname.objects = NULL, keep.mer = F, ...)

## S3 method for class 'multivariate'
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)

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#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")

Example output

Loading required package: lme4
Loading required package: Matrix
$components
       source       var percent n
1 Person:Task 0.5595679    12.8 1
2  Rater:Task 0.6475309    14.8 1
3      Person 0.4731482    10.8 1
4        Task 0.3251542     7.4 1
5    Residual 2.3802469    54.3 1

attr(,"class")
[1] "gstudy" "list"  
$within
$within$`1`
$within$`1`$components
    source       var percent n
1   Person 1.5714285    61.1 1
2     Item 0.4285715    16.7 1
3 Residual 0.5714286    22.2 1


$within$`2`
$within$`2`$components
    source       var percent n
1   Person 2.7857142    68.7 1
2     Item 0.1994048     4.9 1
3 Residual 1.0714286    26.4 1


$within$`3`
$within$`3`$components
    source       var percent n
1   Person 1.8571429    68.0 1
2     Item 0.4464286    16.3 1
3 Residual 0.4285714    15.7 1



$between
$between$var.obs
         1         2         3
1 1.857143 1.4821429 0.5000000
2 1.482143 3.0535714 0.9464286
3 0.500000 0.9464286 2.0714286
attr(,"colname.objects")
[1] "Person"


attr(,"class")
[1] "gstudy" "list"  

gtheory documentation built on May 2, 2019, 6:59 a.m.