Skip to content

PSM model improvements - #8

Merged
alanalutz merged 7 commits into
mainfrom
model_improvements
Aug 31, 2026
Merged

PSM model improvements#8
alanalutz merged 7 commits into
mainfrom
model_improvements

Conversation

@alanalutz

@alanalutz alanalutz commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Description

Improvements to the propensity score model:

  • Adds three more covariates: tree cover in 2000, travel time to nearest city, and population density
  • Enforces a minimum distance between sample points to avoid spatial autocorrelation
  • Applies a land mask to avoid sampling large permanent water bodies
  • Stratifies samples by biome

Created, updated, or replaced Files and/or tables

  • ‎notebooks/ps_model.ipynb renamed to notebooks/match_cells.ipynb
  • notebooks/match_cells.ipynb: Code updated to apply the changes described above.

Notes for reviewers

This PR does not require close review, as the propensity score model is no longer used in the current TPARA methodology. This PR mostly serves to preserve the development process in the commit history.
However, there are a couple of elements here that are still in use that I would like review on:

  • The three additional covariates, and the way they are resampled and assembled into a 1km-resolution stack
  • Use of a land mask to avoid including large, permanent bodies of water in the analysis

Stack created with GitHub Stacks CLIGive Feedback 💬

@alanalutz alanalutz changed the title model improvements PSM model improvements Aug 24, 2026
@alanalutz
alanalutz marked this pull request as ready for review August 24, 2026 23:32

@cjthomas730 cjthomas730 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good to me; a minor nitpick on the variables.py which would be nice to address but isn't needed for approval. Resampling and land masking look good

Comment thread src/utils/variables.py
Base automatically changed from calc_relative_effectiveness to main August 31, 2026 19:51
@alanalutz
alanalutz merged commit 4051bb9 into main Aug 31, 2026
@alanalutz
alanalutz deleted the model_improvements branch August 31, 2026 19:54
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.

2 participants