Crandore Hub

simplexgof

Bootstrap-Calibrated Goodness-of-Fit Test for Simplex Regression

Implements the bootstrap-calibrated local-influence goodness-of-fit test for simplex regression models with constant or varying dispersion, following the local influence approach of Zhu and Zhang (2004) <doi:10.1093/biomet/91.3.579> and the simplex regression model of Barndorff-Nielsen and Jorgensen (1991) <doi:10.1016/0047-259X(91)90008-P>. The test statistic aggregates individual local-influence measures under case-weight perturbation. Because the first-order asymptotic normal calibration is severely liberal in finite samples, a parametric bootstrap calibration is provided that restores accurate size control and delivers high power against omitted covariates, neglected dispersion, and distributional misspecification. Plotting functions reproduce the figures and tables of the companion methodological paper. Computational kernels are implemented in 'C++' via 'Rcpp' and 'RcppArmadillo' for speed, and two real datasets are bundled.

README

# Reproduction scripts

These scripts reproduce every figure and table of
Ospina, Espinheira, Silva & Barros (2026), "A Bootstrap-Calibrated
Local Influence Goodness-of-Fit Procedure for Simplex Regression Models".

Each script is **standalone** and writes to `./output/`.

## Run everything

```r
setwd(system.file("scripts", package = "simplexgof"))
source("00_run_all.R")
```

## Run a single piece

| Script | Produces |
|--------|----------|
| `01_fig1_qqplots.R`            | Figure 1 — QQ-plots of the asymptotic \(U_n\) |
| `02_fig2_leverage_influence.R` | Figure 2 — leverage + influence (unified, B&W, cutoff lines) |
| `03_table1_asymptotic_size.R`  | Table 1 — asymptotic test size |
| `04_table2_bootstrap.R`        | Table 2 — bootstrap size and power |
| `05_applications.R`            | Ammonia + PBSC parameter and GoF tables |
| `06_envelopes.R`               | Bootstrap half-normal envelopes (package-only) |
| `07_bootstrap_dist.R`          | Bootstrap null distribution of \(U_n\) (package-only) |
| `make_latex_tables.R`          | Convert the CSV outputs to LaTeX tables |

## Notes

- The paper uses `R = 5000` Monte Carlo replications and `B = 1000`
  bootstrap resamples. The scripts ship with smaller values for a quick
  run; increase them (see the top of each script) to match the paper.
- The asymptotic test (Table 1, Figure 1) uses
  `simplex_Un_asymptotic()` (finite-difference gradient, correct
  asymptotic variance). The bootstrap test (`simplex_gof()`) uses the
  bootstrap-invariant analytic gradient.
- Figures 4–5 of earlier drafts (bootstrap distribution, envelope) are
  produced by scripts 06–07 for completeness but are **not** part of the main article.

Versions across snapshots

VersionRepositoryFileSize
0.1.0 rolling linux/jammy R-4.5 simplexgof_0.1.0.tar.gz 459.0 KiB
0.1.0 rolling linux/noble R-4.5 simplexgof_0.1.0.tar.gz 464.1 KiB
0.1.0 rolling source/ R- simplexgof_0.1.0.tar.gz 296.1 KiB
0.1.0 latest linux/jammy R-4.5 simplexgof_0.1.0.tar.gz 459.0 KiB
0.1.0 latest linux/noble R-4.5 simplexgof_0.1.0.tar.gz 464.1 KiB
0.1.0 latest source/ R- simplexgof_0.1.0.tar.gz 296.1 KiB
0.1.0 2026-04-23 source/ R- simplexgof_0.1.0.tar.gz 0 B

Dependencies (latest)

Imports

LinkingTo

Suggests