BookmarkSubscribeRSS Feed
Emma8
Quartz | Level 8

Hi. Can anyone help with this:

 

I would like to calculate percentage of school graduate degree (3-level) by gender while adjusting for age (numeric variable) and race (categorical variable). How can I do that? 
thank you.

 

7 REPLIES 7
PaigeMiller
Diamond | Level 26

Well, I'm not sure I know what you mean by "adjusted". There are probably many ways to do such an adjustment, including simple stratification by age and race. Modeling is another approach, and I'm sure there are still others.

 

Please provide a lot more detail about this study and what data is available and what type of adjustment do you want to do.

--
Paige Miller
Emma8
Quartz | Level 8

Thank you.

sorry, I mean as regression model not stratified by race and age, but adjusted in the model.

PaigeMiller
Diamond | Level 26

Something like this:

 

proc logistic data=have;
    class gender race;
    model percent = gender age race;
run;

By the way, if you do this (or something like it), I would change the problem statement from "I would like to calculate percentage of school graduate degree..." to "I would like to estimate the percentage of school graduate degree..."

 

--
Paige Miller
Emma8
Quartz | Level 8

Thank you. The percent outcome variable has 3 categories. Also, this would give me only the beta coefficient not percent ?

PaigeMiller
Diamond | Level 26

Three levels of the outcome variable is fine in PROC LOGISTIC. It will give betas as well as predicted (or estimated, or adjusted) percentages for each value of age, gender and race.

--
Paige Miller
Emma8
Quartz | Level 8

There are so many estimators. Could you tell me which one is the estimated proportion?

PaigeMiller
Diamond | Level 26

This example shows how to obtain the predicted probabilities. It has three levels of Y like yours. It requires a SCORE data set, which contains the values of Gender, Race and Age that you want to predict at (you can make this SCORE data set up yourself). The data set that is in the OUT= part of the SCORE statement will contain the predicted probabilities. Or you can use the EFFECTPLOT statement.

https://documentation.sas.com/?docsetId=statug&docsetTarget=statug_logistic_examples20.htm&docsetVer...

--
Paige Miller

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 7 replies
  • 2859 views
  • 1 like
  • 2 in conversation