Skip to content

Fix hillSlope1 at 1: not identifiable with covariate coefficients - #47

Merged
eliotmcintire merged 3 commits into
developmentfrom
fix/hillSlope1-fixed-at-1
Sep 28, 2026
Merged

eliotmcintire merged 3 commits into
developmentfrom
fix/hillSlope1-fixed-at-1

Conversation

@eliotmcintire

@eliotmcintire eliotmcintire commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

estimateSpreadParams() (fireSense_SpreadFit.R:886-921 before this change) put hillSlope1, the spread link's slope, in the default DEoptim bounds ([0.2, 2]). With the link's linear predictor x = covariates %*% beta, hillSlope1 enters only as hillSlope1 * x, so scaling every covariate coefficient by k and dividing hillSlope1 by k leaves every prediction unchanged: it was never identifiable, and letting DEoptim fit it let every coefficient drift along that ridge.

estimateSpreadParams() no longer emits hillSlope1; fireSenseUtils::.objfunSpreadFit() (>= 0.2.3.9049, PredictiveEcology/fireSenseUtils#93) reinserts hillSlope1 = 1 before evaluating the fit. The run event's ledger row gets it back too, via the new addHillSlope1ToLedger(), so an old ledger row keeps predicting with its own fitted hillSlope1 and a new one predicts with 1. A supplied upper/lower naming hillSlope1 is now a clear error rather than being silently fit and then discarded.

Verified with new/updated tests covering: the default bounds no longer contain hillSlope1, a supplied upper/lower naming hillSlope1 is refused, the run event's ledger row gets hillSlope1 = 1 right after maxAsymptote, and (test-ledgerPrediction.R) an old-style row keeps predicting with its own fitted value while a new row predicts with 1. Full module suite (SpaDES.core::convertToPackage() + testthat::test_local()), stacked on PR #46 (fix/youngage-exclusivity) with fireSenseUtils 0.2.3.9049 from the scratch lib: 153 test blocks / 515 passed, 0 failed.

Version 1.0.6.9020. This branch is stacked on #46 (fix/youngage-exclusivity), so this PR's base is that branch, not development; it will retarget automatically once #46 merges. Requires fireSenseUtils@development (>= 0.2.3.9049), from PredictiveEcology/fireSenseUtils#93, similarly stacked on fireSenseUtils#92 -- merge order: fireSenseUtils#92, fireSenseUtils#93, fireSense_SpreadFit#46, fireSense_SpreadFit#47.

🤖 Generated with Claude Code

https://claude.ai/code/session_01CwcjqqK59FmTJscyi7xUqv

estimateSpreadParams() (fireSense_SpreadFit.R:886-921 pre-fix) put hillSlope1,
the spread link's slope, in the default DEoptim bounds with [0.2, 2]. With the
link's linear predictor x = covariates %*% beta, hillSlope1 enters only as
hillSlope1 * x, so scaling every covariate coefficient by k and dividing
hillSlope1 by k leaves every prediction unchanged: it was never identifiable
and let coefficients drift along that ridge.

estimateSpreadParams() no longer emits hillSlope1. fireSenseUtils::.objfunSpreadFit()
(>= 0.2.3.9047) reinserts hillSlope1 = 1 before evaluating the fit. The run
event's ledger row gets it back too (new addHillSlope1ToLedger()), so an old
ledger row keeps predicting with its own fitted hillSlope1 and a new one
predicts with 1. A supplied upper/lower naming hillSlope1 is now a clear error,
since DEoptim would silently fit and then ignore it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CwcjqqK59FmTJscyi7xUqv
eliotmcintire and others added 2 commits September 28, 2026 10:41
fireSenseUtils' development moved to 0.2.3.9047 (unrelated PR) while
PredictiveEcology/fireSenseUtils#93 was open, so its fix rebased onto
0.2.3.9048; match the floor here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CwcjqqK59FmTJscyi7xUqv
…ix/hillSlope1-fixed-at-1

# Conflicts:
#	NEWS.md
@eliotmcintire
eliotmcintire changed the base branch from development to fix/youngage-exclusivity September 28, 2026 17:49
Base automatically changed from fix/youngage-exclusivity to development September 28, 2026 18:16
@eliotmcintire eliotmcintire reopened this Sep 28, 2026
@eliotmcintire
eliotmcintire merged commit de0bd95 into development Sep 28, 2026
9 of 11 checks passed
@eliotmcintire
eliotmcintire deleted the fix/hillSlope1-fixed-at-1 branch September 28, 2026 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant