I have this dataset:
data have;
length day$ 20;
input week day$ sell_item;
format sell_item sell_item_.;
datalines;
1 Monday 6
1 Tuesday 51
1 Wednesday 69
1 Thursday 68
1 Friday 28
1 Saturday 16
1 Sunday 94
;
proc freq data=have;
tables day / nopercent norow nocol deviation expected chisq;
weight sell_item;
run;
here i see information of selling items in a store. Regarding chi squared test, can be found statistical significance (p<0.01), but i would like to estimate individual difference of selling between each day.
thanks in advance
For that hypothesis you only need the Type 3 test for DAY from this code:
proc genmod data=have;
class day;
model sell_item=day/dist=poisson type3;
run;
The Chi-Square Test you do is testing for Equal Proportions.
Here's how to compare two proportions in SAS (between two days if you want):
I haven't read above blog and usage note myself (I'm in a hurry) but it may be that you still have to correct for an inflation of the TYPE-I error when doing multiple comparisons (like a BONFERRONI correction).
Cheers,
Koen
You can't find a statistical difference between days unless you have replicates of Monday, and replicates of Tuesday, and so on.
Okay, what hypothesis do you want to test to determine if the difference between days is statistically significant?
For that hypothesis you only need the Type 3 test for DAY from this code:
proc genmod data=have;
class day;
model sell_item=day/dist=poisson type3;
run;
If there is only the one predictor, then you can fit a Poisson model. Note that in this case, the model is saturated, so the predicted values are exactly the observed values.
proc genmod;
class day;
model sell_item=day/dist=poisson;
lsmeans day / diff ilink;
run;
If there is a second categorical predictor, resulting in a 2-way table with your SELL_ITEM variable giving the cell counts, then this note shows ways you can proceed, including analyzing subtables or fitting a model.
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.
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.