| Title: | Simple Generalizability Theory for Crossed and Nested Designs |
|---|---|
| Description: | Provides a small, beginner-friendly interface for estimating variance components in simple generalizability theory designs. The package currently supports a fully crossed persons-by-items design and a simple items-within-person nested design, along with design-study summaries for relative and absolute decisions. |
| Authors: | Ujjwal Tyagi [aut, cre] |
| Maintainer: | Ujjwal Tyagi <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-05-22 08:27:42 UTC |
| Source: | https://github.com/cran/gtheoryr |
Small, beginner-friendly helpers for estimating variance components in simple generalizability theory designs. The package currently supports:
a crossed persons-by-items design via gstudy_pxi()
a nested items-within-person design via gstudy_nested_ip()
simple D-studies via dstudy_pxi() and dstudy_nested_ip()
Computes a simple reliability summary for a proposed number of nested items per person.
dstudy_nested_ip(gstudy, n_items = gstudy$n_items)dstudy_nested_ip(gstudy, n_items = gstudy$n_items)
gstudy |
A result from |
n_items |
Number of nested items per person in the proposed design. |
An object of class "dstudy_gtheoryr".
nested_scores <- data.frame( person = c("P1", "P1", "P2", "P2", "P3", "P3"), item = c("P1_I1", "P1_I2", "P2_I1", "P2_I2", "P3_I1", "P3_I2"), score = c(8, 6, 5, 4, 9, 7) ) gs_nested <- gstudy_nested_ip( nested_scores, person = "person", item = "item", score = "score" ) dstudy_nested_ip(gs_nested, n_items = 4)nested_scores <- data.frame( person = c("P1", "P1", "P2", "P2", "P3", "P3"), item = c("P1_I1", "P1_I2", "P2_I1", "P2_I2", "P3_I1", "P3_I2"), score = c(8, 6, 5, 4, 9, 7) ) gs_nested <- gstudy_nested_ip( nested_scores, person = "person", item = "item", score = "score" ) dstudy_nested_ip(gs_nested, n_items = 4)
Computes relative error, absolute error, a generalizability coefficient, and a phi coefficient for a proposed number of items.
dstudy_pxi(gstudy, n_items = gstudy$n_items)dstudy_pxi(gstudy, n_items = gstudy$n_items)
gstudy |
A result from |
n_items |
Number of items in the proposed design. |
An object of class "dstudy_gtheoryr".
scores <- data.frame( person = rep(c("P1", "P2", "P3"), each = 3), item = rep(c("I1", "I2", "I3"), times = 3), score = c(8, 7, 9, 5, 4, 6, 7, 6, 8) ) gs <- gstudy_pxi(scores, person = "person", item = "item", score = "score") dstudy_pxi(gs, n_items = 6)scores <- data.frame( person = rep(c("P1", "P2", "P3"), each = 3), item = rep(c("I1", "I2", "I3"), times = 3), score = c(8, 7, 9, 5, 4, 6, 7, 6, 8) ) gs <- gstudy_pxi(scores, person = "person", item = "item", score = "score") dstudy_pxi(gs, n_items = 6)
Estimates ANOVA mean squares and variance components for a simple balanced nested design in which each person has their own set of items.
gstudy_nested_ip(data, person, item, score)gstudy_nested_ip(data, person, item, score)
data |
A data frame containing one row per observation. |
person |
Name of the person column. |
item |
Name of the nested item column. |
score |
Name of the numeric score column. |
An object of class "gstudy_gtheoryr".
nested_scores <- data.frame( person = c("P1", "P1", "P2", "P2", "P3", "P3"), item = c("P1_I1", "P1_I2", "P2_I1", "P2_I2", "P3_I1", "P3_I2"), score = c(8, 6, 5, 4, 9, 7) ) gs_nested <- gstudy_nested_ip( nested_scores, person = "person", item = "item", score = "score" ) gs_nestednested_scores <- data.frame( person = c("P1", "P1", "P2", "P2", "P3", "P3"), item = c("P1_I1", "P1_I2", "P2_I1", "P2_I2", "P3_I1", "P3_I2"), score = c(8, 6, 5, 4, 9, 7) ) gs_nested <- gstudy_nested_ip( nested_scores, person = "person", item = "item", score = "score" ) gs_nested
Estimates ANOVA mean squares and variance components for a fully crossed random-effects persons-by-items design.
gstudy_pxi(data, person, item, score)gstudy_pxi(data, person, item, score)
data |
A data frame containing one row per person-item observation. |
person |
Name of the person column. |
item |
Name of the item column. |
score |
Name of the numeric score column. |
An object of class "gstudy_gtheoryr".
scores <- data.frame( person = rep(c("P1", "P2", "P3"), each = 3), item = rep(c("I1", "I2", "I3"), times = 3), score = c(8, 7, 9, 5, 4, 6, 7, 6, 8) ) gs <- gstudy_pxi(scores, person = "person", item = "item", score = "score") gsscores <- data.frame( person = rep(c("P1", "P2", "P3"), each = 3), item = rep(c("I1", "I2", "I3"), times = 3), score = c(8, 7, 9, 5, 4, 6, 7, 6, 8) ) gs <- gstudy_pxi(scores, person = "person", item = "item", score = "score") gs