strata.data() and strata.distr() gain a
method argument supporting three optimisation strategies:
"dp" (default) — the original exhaustive Dynamic
Programming grid search, guaranteed globally optimal on the discrete
grid."cobyla" — multi-start gradient-free local optimiser
(COBYLA) via nloptr; faster than DP for large
h, suitable for exploratory work."global" — two-phase global optimiser combining
DIRECT-L (deterministic space-filling search) followed by COBYLA local
refinement; closest to DP accuracy among the two new methods.n_starts, max_iter,
tol, and verbose in both functions to control
COBYLA/GLOBAL behaviour.DESCRIPTION updated: nloptr added to
Imports.distr.root() and data.root() were using the
unregularized upper incomplete gamma function
UGamma(s, z) (via zipfR) where the
regularized form Q(s, z) was required by the
mathematical formulation. Fixed by replacing all calls with
pgamma(z, shape = s, lower.tail = FALSE), which correctly
implements Q(s, z) = Γ(s, z) / Γ(s) as defined in
Abramowitz & Stegun (1972), Chapter 6, equation 6.5.2. Results for
Weibull and Gamma populations are now consistent with the published
theory..refit_real_scale(): simultaneous MLE of all three
triangular parameters (min, max, mode) produced degenerate estimates
(min ≈ max ≈ mode). Fixed by fixing min and max to sample bounds and
estimating only the mode via MLE, matching the approach already used in
get.dist().get.dist(): triangular distribution
now only selected over a tail model (Gamma, Weibull, Log-normal,
Exponential) when its AIC advantage exceeds 10 units, preventing
spurious triangular wins on mildly right-skewed data.Q(r, y) (regularized) vs
Γ(r, y) (unregularized) in the Weibull and Gamma sections,
with explicit R implementation note.mean/sd parameters).fix.arg approach.NeedsCompilation field,
removed stray \url{} in Introduction.strata.data() / strata.distr() call
signatures from v1.0-5 work without modification (method
defaults to "dp")."strata" S3 class and all slot names are
unchanged.Initial CRAN-submission-ready version. Implemented DP solver,
10-family distribution fitting via AIC, Neyman allocation with cost
support, and coloured summary.strata() output.