- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hey everyone,
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
If you weren't limited to just chi-square tests, I have found the following macro to be quite helpful:
http://www.datavis.ca/sasmac/stat2dat.html
Conversely, you could always write a small datastep to expand the aggregate file back to its original state.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
That is a very useful macro that I'll have to remember. Unfortunatley, the data wouldn't lend itself to that as it is only frequencies.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
http://blogs.sas.com/content/iml/2011/09/19/count-the-number-of-missing-values-for-each-variable/
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.