BookmarkSubscribeRSS Feed
clouise
Calcite | Level 5

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!

3 REPLIES 3
art297
Opal | Level 21

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.

clouise
Calcite | Level 5

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.

Rick_SAS
SAS Super FREQ

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.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 1586 views
  • 0 likes
  • 3 in conversation