BookmarkSubscribeRSS Feed
altadata1
Obsidian | Level 7

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.

 

2 REPLIES 2
ballardw
Super User

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.

 

 

altadata1
Obsidian | Level 7
Thank you so much for your response. Yes, it is SAS callable SUDAAN code.
Is there a SUDAAN board here or any other communities that you may know?

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 383 views
  • 0 likes
  • 2 in conversation