Hello, Sorry the 0.2% was just an example. The prevalence of asthma is 1.92% for male and 1.25% for female non-smokers. As for smokers it is 5.4% for males and 3.5% for females. data x; set x; if Smoker= 'Smoker' AND sex='Male' then asthma= ifn(rand("uniform") <= 0.054, 1, 0); if Smoker= 'Non-smoker' AND sex='Male' then asthma = ifn(rand("uniform") <= 0.0192, 1, 0); run; data x; set x; if Smoker= 'Smoker' AND sex='Female' then asthma= ifn(rand("uniform") <= 0.035, 1, 0); if Smoker= 'Non-smoker' AND sex='Female' then asthma = ifn(rand("uniform") <= 0.0125, 1, 0); run;
... View more