Validate the Chapter 1 nesting / no-false-positive behaviour
Source:R/validate_nesting_2a.R
validate_nesting_2a.RdComplementary check to validate_recovery_2a(). It simulates independent
two-biomarker data (all cross-biomarker covariances c_vec = 0, i.e. the
Chapter 1 truth) and confirms that Model 2a does not invent
cross-biomarker correlation: every posterior c_p credible interval should
cover zero. This is the empirical counterpart of the algebraic fact that
lambda = 0 reduces Model 2a to Chapter 1.
The packaged typhoid simulator sim_case_data() also produces independent
biomarkers, so fitting Model 2a to its output is an equivalent
real-data-style null check.
Arguments
- n
integer number of subjects. Default
120.- mu_g, mu_a, sigma_g, sigma_a
Model 2a truth (cross-block forced to zero).
- noise_sd
Residual SD on the log scale. Default
0.15.- seed
RNG seed. Default
1.- ...
MCMC controls forwarded to
run_mod_2a().
Value
A data.frame with columns param, cov_med, cov_lo, cov_hi,
and covers_zero (logical); all rows should have covers_zero = TRUE.