
Cholesky Decomposition with Non-PD Fallback
Source:R/hurdle-demand.R
dot-hurdle_chol_or_fallback.RdInternal helper shared by the RE-transform and marginal-prediction code
paths. Attempts chol(Sigma); if Sigma is not positive definite (chol()
errors — near-boundary rhos, overflow, or tanh(raw) rounding to exactly
+/-1), falls back to the Cholesky factor of an uncorrelated diagonal
covariance built from sigma_diag and emits ONE classed warning, since the
returned/reported correlation estimates no longer describe the transformed
random effects or marginal draws that result (TICKET-061).