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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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
  • 1362 views
  • 0 likes
  • 3 in conversation