Group testing regression by Xie's EM algorithm
Usage
GtRegEM(z, group, X, se = 1, sp = 1, max_iter = 1000, tol = 1e-10)
Arguments
- z
Group responses (0/1), one per group.
- group
Group label (0-based) of each individual.
- X
Individual design matrix with intercept.
- se, sp
Group test accuracy.
- max_iter, tol
EM controls.
Value
list(beta, loglik, iterations, converged).
References
Bilder, C. R. & Loughin, T. M. (2025). Analysis of Categorical
Data with R, 2nd ed. Eqs (6.32)-(6.33).
Examples
xs <- ((7 * (0:39)) %% 13) / 4 - 1.5
z <- c(1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0)
GtRegEM(z, (0:39) %/% 2, cbind(1, xs), se = 0.95, sp = 0.95)$beta
#> xs
#> -1.0928531 0.3319932