09-28-2015 09:54 AM
Hi I have a project that aims to assess the percentage of screened patients within a county versus the average within the whole state. Due to overlap between the state average and county proportion, I have to test whether the county is different from the rest of the state. Therefore, I will have to calculate the proportion within the county and then calculate the proportion of screened within the state removing the county that I am comparing. For example, if state is made up of 20 counties. If I want to compare county 1 to the rest fo the state, I would have to calculate the state proportion without county 1.
I am wondering if there's a way to do this in SAS easily?
09-28-2015 10:25 AM - edited 09-28-2015 10:27 AM
Possibly easiest, as it doesn't require making lots of variables, would be to provide a custome format that assigns all of the county values except the one of interest to a "rest of state" vs the one you have. Use of the Keyword _other_ makes this relatively easy.
An example with numeric county codes:
_other_ = 'Rest of state'
And assign that format to the county in your code.
If you have names or text categories then $countygroup for name and values like '23' or the county name on the left of =.
WARNING: if your county code is missing for any records they will be included in the "rest of state" group. If this isn't the desired behavior then you would need a separate format value or use a dataset option to drop those records.
09-28-2015 11:06 AM
Hi thank you so much. I have a quick question though. If I do this for all 20 counties, is this considered multiple comparison testing? For example, should I calculate the p-values and then use proc multtest to apply Bonferroni's correction?
09-29-2015 08:26 AM
I think this is a clear case where an adjustment for multiple comparisons is needed, especially if you are going to examine differences between two states (say Texas and Wyoming, for example). The number of counties is greatly different, and so to get comparisons on an equal basis, some sort of adjustment is needed.
I wouldn't go Bonferroni, though, as it is generally too conservative. Check out the alternatives in PROC MULTTEST for analysis of raw p values.