Update EXCODE model by setting baseline states in surv_ts
compute_baseline_state.RdFits a quasi-Poisson GLM using the **background formula** stored in
excode_multistate@emission@excode_formula@formula_bckg on the data found in
excode_multistate@emission@excode_formula@surv_ts (optionally augmented with
covariates from @data if present), computes Anscombe residuals, and **writes**
a state column back into @surv_ts: entries are 0 when residuals
are below weights_threshold_baseline (or the observed count is 0), and
NA otherwise. Returns the updated excodeModel.
Arguments
- excode_multistate
An
excodeModelreturned byinit_excode()with a"MultiState"emission.- weights_threshold_baseline
Numeric residual cutoff; residuals strictly below this threshold are labeled baseline (
0). Default1.