Bootstrap Uncertainty¶
Semiparametric Bootstrap¶
Resamples death counts from their assumed distribution (Poisson or Binomial) with mean equal to the fitted deaths, then refits the model on each sample:
import pystmomo as ps
data = ps.load_ew_male()
fit = ps.lc().fit(data.deaths, data.exposures,
ages=data.ages, years=data.years)
boot = ps.semiparametric_bootstrap(fit, nboot=500, seed=0)
print(boot)
# BootStMoMo(method='semiparametric', nboot=500, n_fits_ok=500)
Residual Bootstrap¶
Resamples deviance residuals and inverts them to obtain bootstrap death counts (Renshaw & Haberman 2008):
Confidence Intervals¶
Available parameters: "ax", "bx", "kt", "b0x", "gc".
Parallel Bootstrap¶
Accessing Raw Replicate Fits¶
All fitted FitStMoMo objects are stored in boot.fits: