Skip to content

New parameter spreadIntercept: a spread formula with an intercept - #58

Merged
eliotmcintire merged 1 commit into
developmentfrom
feat/spread-intercept
Oct 5, 2026
Merged

eliotmcintire merged 1 commit into
developmentfrom
feat/spread-intercept

Conversation

@eliotmcintire

@eliotmcintire eliotmcintire commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Depends-on: PredictiveEcology/fireSenseUtils#131

fireSense_dataPrepFit.R:942 built the spread formula as paste0("~ 0 + ", RHS), so it never had an intercept and the rescaled covariates' coefficients set the level of the linear predictor. The new parameter spreadIntercept (logical, default FALSE) builds ~ 1 + RHS through a new spreadFormula(); fireSense_spreadFit (PredictiveEcology/fireSense_spreadFit#65) fits the intercept with centred covariates and fireSense_spreadPredict (PredictiveEcology/fireSense_spreadPredict#25) predicts with it.

The default is off: spreadFormula(RHS) returns the same string as before (tested byte for byte). New test-spreadIntercept.R (3 tests) fails on the base module and passes here; full module suite 85 tests, 0 failed, 1 skipped (base 82, 0 failed, 1 skipped), run against fireSenseUtils#131. No reqdPkgs floor yet: the fireSenseUtils version does not exist on development until #131 merges.

🤖 Generated with Claude Code

https://claude.ai/code/session_01CwcjqqK59FmTJscyi7xUqv

spreadFormula() builds "~ 1 + RHS" with spreadIntercept = TRUE and the
unchanged "~ 0 + RHS" by default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CwcjqqK59FmTJscyi7xUqv
@eliotmcintire
eliotmcintire merged commit 972406b into development Oct 5, 2026
6 checks passed
@eliotmcintire
eliotmcintire deleted the feat/spread-intercept branch October 5, 2026 17:03
eliotmcintire added a commit that referenced this pull request Oct 5, 2026
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