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.
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.
Thank you.
sorry, I mean as regression model not stratified by race and age, but adjusted in the model.
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..."
Thank you. The percent outcome variable has 3 categories. Also, this would give me only the beta coefficient not percent ?
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.
There are so many estimators. Could you tell me which one is the estimated proportion?
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.
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.
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.