11-07-2011 10:35 PM
I have a data set with quite a few obersvations. I need to test non-response bias based on a previous study using a chi-squared test; however, I don't have access to the actual observations of the previous study, just the summarized totals for everything. Is there a way to compare summarized data with raw data in SAS?
Thanks for the help!
11-07-2011 10:57 PM
If you weren't limited to just chi-square tests, I have found the following macro to be quite helpful:
Conversely, you could always write a small datastep to expand the aggregate file back to its original state.
11-08-2011 08:13 AM
You can either expand the summary data, or use PROC FREQ to summarize the observed data. For this situation, I'd suggest summarizing the new data by running PROC FREQ on the new observations; see the 2nd example of
Then you can use a short DATA step to consolidate the old summary and the new summary, and use PROC FREQ with a WEIGHT statement to take the frequencies into account when you do the chi-square test.