crolib 0.1.0

Generalizability theory: crossed-design reliability and D-study projections
Documentation
  • Coverage
  • 100%
    17 out of 17 items documented1 out of 5 items with examples
  • Size
  • Source code size: 16.2 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 174.5 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 7s Average build duration of successful builds.
  • all releases: 7s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • antimemeai/crolib
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • antimemeai

crolib

Generalizability theory and measurement design for Rust and Python. Named for Lee Cronbach, a founder of generalizability theory.

Initial release (0.1.0): project relative reliability (G) and absolute dependability (Phi) from supplied variance components for an all-random, crossed person × item × rater design. Both implementations have no runtime dependencies. Python is currently a portable implementation, not a Rust binding.

Python

pip install crolib
from crolib import CrossedComponents

components = CrossedComponents(
    person=12.0, item=6.0, rater=4.0,
    person_item=8.0, person_rater=10.0, item_rater=2.0, residual=24.0,
)
reliability = components.project(n_items=4, n_raters=2)
print(reliability.generalizability)  # 0.5454545454545454
print(reliability.dependability)     # 0.46601941747572817

Rust

[dependencies]
crolib = "0.1"
use crolib::CrossedComponents;

let components = CrossedComponents {
    person: 12.0, item: 6.0, rater: 4.0,
    person_item: 8.0, person_rater: 10.0, item_rater: 2.0, residual: 24.0,
};
let reliability = components.project(4, 2).expect("valid crossed components");
assert!((reliability.generalizability - 6.0 / 11.0).abs() < 1e-14);

Mathematical scope

For item count I and rater count R:

relative_error = person_item/I + person_rater/R + residual/I/R
absolute_error = relative_error + item/I + rater/R + item_rater/I/R
G   = person / (person + relative_error)
Phi = person / (person + absolute_error)

The residual component combines the three-way interaction and observational error in an unreplicated design. Inputs are variances, not standard deviations. Components must be finite and nonnegative; counts must be positive integers. Undefined coefficients produce an error. Negative estimates are rejected rather than silently clipped. Binary scaling avoids overflowing sums and premature underflow of count-weighted components.

Projection assumes the supplied components describe the same population and exchangeable item/rater universes as the proposed design. This release does not estimate components from raw observations, support fixed/nested facets, or calculate uncertainty intervals. General design support, fitting, unbalanced estimation, and multivariate G-theory are planned research and development.

Reference: Brennan, R. L. (2001), Generalizability Theory, Springer, doi:10.1007/978-1-4757-3456-0.

Development

Read AGENTS.md and BLACKBIRD.md. Run scripts/check.sh to check Rust and Python behavior. Research lives in papers/, decisions in journal/, and the initial work queue in issues/. Project-specific references and private working material belong in ignored quarantine/ and context/.

MIT licensed.