Define K_adj value. DEPRECATED legacy pathway.
Arguments
- replicates
Number of replicates
- dat
Life history data
- mx
A projection matrix expression
- dx
A matrix of density-dependence effect
- Nyears
Years to run simulation (must be greater than 51)
- H.mx
A harm projection matrix
- K
Adult carrying capacity being calibrated. Defaults to dat$Ka for backwards compatibility; Projection_DD passes its own K argument so the calibration measures the same model it is calibrating.
Details
DEPRECATED: this is a legacy stochastic capacity calibration retained for backwards compatibility with older scripts. It is never called by PopulationModel_Run or the Shiny app, is only meaningful in compensation-ratio mode, and is deliberately not exercised by the test suite (the replicate simulations are slow). Repaired 2026-09-15 (previously received NULL projection matrices from Projection_DD and crashed).
Runs replicate stochastic simulations, measures the realized long-run mean adult abundance, and returns K.adj = K / mean so callers can inflate the working capacity (stochastic variability drags the long-run mean below the deterministic K). A 51-year burn-in is discarded from each replicate, so Nyears must exceed 51.