Calcite | Level 5

## How to calculate standard difference of 4-level predictor variables with aggregate data

Hello,

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?

7 REPLIES 7
Super User

## Re: How to calculate standard difference of 4-level predictor variables with aggregate data

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.

Calcite | Level 5

## Re: How to calculate standard difference of 4-level predictor variables with aggregate data

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).

Super User

## Re: How to calculate standard difference of 4-level predictor variables with aggregate data

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.

@amrora wrote:

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).

Calcite | Level 5

## Re: How to calculate standard difference of 4-level predictor variables with aggregate data

I posted this is the wrong community. I need someone with more of a statistics background than a programming background.
Diamond | Level 26

## Re: How to calculate standard difference of 4-level predictor variables with aggregate data

--
Paige Miller
Calcite | Level 5

## Re: How to calculate standard difference of 4-level predictor variables with aggregate data

I reposted this is a different community but I don’t see a way to delete this one.
Diamond | Level 26