Hello,
I am studying a binary variable A (Yes/No) across different groups. e.g. immigrant, agegroup, provinces...... I use the syntax below to estimate the p-value for proportions of non-immigrant vs that of immigrant (the syntax is for SUDAAN)
proc descript data=mydata design=BRR;
Weight pweight;
repweight BSW_001-BSW_500;
var A A ;
Catlevel 1 2;
class immigrant;
contrast immigrant= (-1 1)/ name= "non-immigrant va immigrant";run;
for the above one, it is easy because i can consider any group as the reference group. But, when it comes to multicategory groups like agegroup it could be something like this:
proc descript data=mydata design=BRR;
Weight pweight;
repweight BSW_001-BSW_500;
var A A A;
Catlevel 1 2 3;
class agegroup;
contrast agegroup= (-1 1 0)/ name= "46-55 vs 20-45";
contrast agegroup= (-1 0 1)/ name= 56+ vs 20-45";
run;
The syntax above will estimate the p-value for each age group of 46-55 or 56+ vs 20-45. But, I would like to estimate the p-value for each age group vs total population.
Thank you.
Unfortunately that looks like SAS callable SUDAAN code. Proc Descript is not a SAS product so you may not get a good answer here quickly. You might be better off asking on a SUDAAN board. It has been about 13 years since I had access to SUDAAN so can't make a good suggestion.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.