Skip to contents

Computes both the average-information reliability (\(\tilde{\rho}\)) and the MSEM-based marginal reliability (\(\bar{w}\)) from a single set of test-information reductions, avoiding redundant kernel evaluation.

This is a performance optimization over calling compute_rho_tilde() and compute_rho_bar() separately, since both share the same stable, automatically chunked item-information reduction.

Usage

compute_rho_both(
  c,
  theta_vec,
  beta_vec,
  lambda_base,
  theta_var = NULL,
  guessing = NULL,
  weights = NULL,
  return_diagnostics = FALSE
)

Arguments

c

Numeric scalar. Global discrimination scaling factor.

theta_vec

Numeric vector of abilities \(\theta_m\).

beta_vec

Numeric vector of item difficulties \(\beta_i\).

lambda_base

Numeric vector of baseline discriminations \(\lambda_{i,0}\) (before scaling by c).

theta_var

Optional numeric. Pre-calculated variance of theta. If NULL, computed from theta_vec.

guessing

Optional numeric scalar or item-length vector of 3PL lower asymptotes in [0, 1). A scalar is recycled; NULL gives the Rasch/2PL special case. The kernel uses D = 1.

weights

Optional non-negative integration weights, one per theta value. They are normalized internally.

return_diagnostics

Logical. Return log-domain numerical diagnostics in addition to the two legacy reliability fields.

Value

A named list with components:

rho_tilde

Average-information reliability.

rho_bar

MSEM-based marginal reliability.

Details

For the same information values and latent-variance basis, Jensen's inequality implies \(\tilde{\rho} \geq \bar{w}\). See compute_rho_bar for details on each metric.

Examples

set.seed(1)
theta <- rnorm(1000)
beta  <- rnorm(20)
lambda0 <- rep(1, 20)

both <- compute_rho_both(1, theta, beta, lambda0)
both$rho_tilde
#> [1] 0.7870079
both$rho_bar
#> [1] 0.7795393

# Verify: rho_tilde >= rho_bar (Jensen's inequality)
both$rho_tilde >= both$rho_bar
#> [1] TRUE

# The same call supports 3PL information.
compute_rho_both(1, theta, beta, lambda0, guessing = 0.20)
#> $rho_tilde
#> [1] 0.7055277
#> 
#> $rho_bar
#> [1] 0.6946309
#>