I have aggregate data (no person-level data; all numbers and percentages) including predictor variables with multiple levels (age in the screenshot below has 5 levels) across 3 levels of an outcome (n% across the top of the screen shot below). My mentor is asking me to calculate standard differences for each categorical predictor variable across 3 levels of the outcome (realizing that we'll have to compare 2 vs 1, and 3 vs 1; instead of 1 vs 2 vs 3). I see that to use proc psmatch, the predictor variables have to be binary (0/1), but I don't think I can do this with the aggregated data that I have.
Does anyone know how I can calculate standard differences for categorical predictor variables as shown below?
Thank you in advance for your help!
I'm afraid that I don't quite understand what that picture shows in relation to your question.
I see 4 columns that have an N but your question talks about comparing 1 to 2 and 3. What about 4?
I'm not even sure which are "categorical predictor variables" or what they predict.
And the picture shows 5 age groups as rows. So further confused.
You haven't even described which 3 columns might be the outcomes. If we have to guess at such things the results are likely to be suboptimal. If you are hiding something because it may be "sensitive" in some way then at least show something like "outcome a" "outcome b" "outcome c" so we have a chance getting the right values.
I also am not sure what you mean by "standard difference". The definitions I find involving that sort of want a mean and standard deviation as part of the calculations and we have insufficient information if those are needed.
Hi, the pictures is the data I have to work with. I have 4 categories of age (categorical predictor variable) across 3 categories of the outcome (n and % across the top of the table).
@amrora Please unmark your reply as correct. Your reply hasn't answered the question. The question should only be marked correct when there is a correct answer, and so when people do searches they can find answered questions.
@amrora You can't delete this thread ... only certain moderators can do that. But do things that will help us out. In this new thread, answer the questions we have already asked (specifically, @ballardw has already asked). Don't make someone ask the questions again, just answer them. Add some more information that will answer those questions to that other thread in a reply post. Helping us out also helps you, because you will get faster and more likely correct answers.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.