BookmarkSubscribeRSS Feed
mgrovesteen
Calcite | Level 5

I tried to obtain a p-value for a 2 x 2 contingency table in which one row sums to zero. I used PROC FREQ along with the exact fisher option. The following warning was generated: "Row or column sum zero. No statistics computed for this table." For a Fisher's Exact test, the p-value should be calculated as 1 here. Can anyone tell me why SAS won't produce results when it can be calculated? (I am able to get results for other contingency tables without zero sum rows, so my code is correct.)

2 REPLIES 2
Reeza
Super User

0 rows are problematic for sure, especially if the row wouldn't even appear in the data set. It means a p-value cannot be calculated, what makes you think the p-value should be 1?

ballardw
Super User

Find a book on statistics that shows how to manually calculate a chi-square test statistic for a 2x2 table.

Do it with some tables that have a row total count of 0.

Then try to find that test statistic in a Chi-square table.

 

 

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 Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 1591 views
  • 0 likes
  • 3 in conversation