How to set two table distributions in tree age?

In my model, there are two variables sex and age needed to set distributions, for example, I want to set male 0.5, female 0.5, 45-49 0.2, 50-54 0.3 55-60 0.5. And the difficulty is that I want one distribution could control another distribution, so I would appreciate it someone could help me to solve this problem
0

Comments

2 comments
  • Distributions are sampled independently, but you can use the sample from one as a formula for another.

    For example, let's say you have two different age distributions - one for men and one for women. You could create 3 distributions, then only use the appropriate age distribution for the simulated patient's gender.

    • dist_gender (samples 1 for male, 2 for female)
    • dist_age_male
    • dist_age_female
    • age_start = if(dist_gender=1; dist_age_male; dist_age_female)

    Sincerely,

    Andrew

    2
    Comment actions Permalink
  • Thank you for your reply! It’s working well to help me with this problem!

    0
    Comment actions Permalink

Please sign in to leave a comment.

Didn't find what you were looking for?

New post