If then statement in markov model

Hi, I'm trying to write an if statement for my Markov model, but don't think I'm doing it correctly. Currently I have the following:

For patients who survive, I would like to have those 75 and below to go to the "Screening Age" arm, and those older than 75 to go to the "Past screening age" arm. When I run my model with the statement I have currently "if(CurrentAge<=75;1;0)", nothing changes in my model (it runs as it did before I included the statement). What is the proper way to ensure people above a certain age go to one branch, and those below go to another branch?

0

Comments

3 comments
  • Zainab

    My first check would be to check how CurrentAge is being set? Does this change in your model and is it a function of _stage.

    Your "if" statement should do what you want, which makes me think the definitions of CurrentAge or the time cycle of the model could be causing the issue.

    If you have a current license feel free to contact support@treeage.com and we can provide more detailed assistance.

    Belinda

    0
    Comment actions Permalink
  • Hi Belinda,

    I've set CurrentAge as StartAge+_stage, where StartAge is 45. The time cycle is one year. I'll reach out to support@treeage.com.

    Thanks

    0
    Comment actions Permalink
  • Check the Markov Cohort Extended Report. This will show you how your cohort flows through states and events over time. You should see people go to the "no screening" event starting in _stage 30 if your logic is correct (and it looks correct to me).

    Andrew

    1
    Comment actions Permalink

Please sign in to leave a comment.

Didn't find what you were looking for?

New post