Skip to content

Add age-stratified transition probabilities to Markov and microsimula…#14

Open
alecdmorton wants to merge 1 commit intoronhandels:mainfrom
alecdmorton:claude/add-age-stratified-transitions-8qF5e
Open

Add age-stratified transition probabilities to Markov and microsimula…#14
alecdmorton wants to merge 1 commit intoronhandels:mainfrom
alecdmorton:claude/add-age-stratified-transitions-8qF5e

Conversation

@alecdmorton
Copy link

…tion models

Transition probability inputs (disease progression and institutionalization) now accept either a scalar (backward compatible, constant across ages) or a named numeric vector keyed by age (e.g., c("65"=0.15, "70"=0.20, "75"=0.25)).

Changes:

  • Add f.age_lookup() helper that resolves scalar or age-keyed parameters to per-cycle vectors using linear interpolation with constant extrapolation
  • Markov model: replace rep() with f.age_lookup() for all disease transition and institutionalization probabilities; use vectorized v.p.*_i throughout the TP matrix construction
  • Microsimulation: pre-compute age-specific vectors and rebuild the transition matrix each cycle; use age-specific institutionalization probabilities
  • Add commented usage examples in both ICER and microsim input lists

https://claude.ai/code/session_01AfopRzm7UqRiszRaQGsFi7

…tion models

Transition probability inputs (disease progression and institutionalization) now
accept either a scalar (backward compatible, constant across ages) or a named
numeric vector keyed by age (e.g., c("65"=0.15, "70"=0.20, "75"=0.25)).

Changes:
- Add f.age_lookup() helper that resolves scalar or age-keyed parameters to
  per-cycle vectors using linear interpolation with constant extrapolation
- Markov model: replace rep() with f.age_lookup() for all disease transition
  and institutionalization probabilities; use vectorized v.p.*_i throughout
  the TP matrix construction
- Microsimulation: pre-compute age-specific vectors and rebuild the transition
  matrix each cycle; use age-specific institutionalization probabilities
- Add commented usage examples in both ICER and microsim input lists

https://claude.ai/code/session_01AfopRzm7UqRiszRaQGsFi7
@alecdmorton alecdmorton reopened this Feb 16, 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.

2 participants