12-21-2016 04:14 AM
below is my data, I want generate chisq p-value for 5 tests together. I have data for 3 tests (1,2,3) but don’t have counts for test 4 and 5. these should include in the model to get pvalue. any one could suggest what I have to do? the below is the dummy data for your reference!
test=1; trt=1; count=6;output;
test=1; trt=2; count=6;output;
test=2; trt=1; count=10;output;
test=2; trt=2; count=6;output;
test=3; trt=1; count=8;output;
test=3; trt=2; count=6;output;
test=4; trt=1; count=0;output;
test=4; trt=2; count=0;output;
test=5; trt=1; count=0;output;
test=5; trt=2; count=0;output;
proc sort data=test;by test trt;run;
proc freq data=test order=data;
*when i run this code i am getting below warning not getting chisqure pvalue;
Statistics for Table of test by trt
Row or column sum zero. No statistics computed for this table.
Sample Size = 42
12-21-2016 05:20 AM
In the chi-square test, you compute the quantities
(Observed - Expected) / Expected
for each cell, where Expected is the exoected value in the cell under the null hypothesis. For these data, the expected values for the cells in rows 4 and 5 are zero. Since 0/0 is mathematically undefined, it is not possible to compute the chi-square test. Consequently, what you are asking for doesn't make sense.
What to do? You can
1. Collect more data until to observe counts in rows 4 and 5
2. Drop rows 4 and 5 from the analysis
3. Combine small categories into larger ones. For example, if the rows represent the categories "small", "medium", "large", "extra-large", and "huge", you can merge the last three categories into a new categoriy called "Big."