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-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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