Hello, I am grappling with a question and would like some advice from the statalist community. My colleague and I are working on cleaning and analyzing survey data right now, and to get some descriptives, we are running a lot of ttests. We are running multiple-group ttests (we have multiple treatment groups rather than just two groups), therefore we are using the command ttesti (which, you may know, you input the sample size, standard deviation and the mean manually to test multiple groups). We are running the difference in group means for four groups which makes it six different group combination (1vs2, 1vs 3, 1vs4, 2vs3, 2vs4 3vs4). Instead of using the command ttesti, we have also tried using the regress command (i.e., "regress y i.group") and using the postestimation command "pwcompare..., pveffects" to get multiple group comparisons p-values.
So, our question that we are grappling with is, the p-values that we get when we use ttesti/ttest and regress are different and we do not know why. We suspect it may be due to using "i." perhaps but I couldn't find more info on this on the web.
Below are the specific codes as an example:
sum y if group==1&CAMPUS==0
sum y if group==3&CAMPUS==0
ttesti 85 3304.612 3163.371 62 2716.484 3175.046, welch // p-value = 0.2686
regress y ib1.group if CAMPUS==0 // p-value = 0.261
Does anyone have any idea what could be going on?
Thank you!
Liz
So, our question that we are grappling with is, the p-values that we get when we use ttesti/ttest and regress are different and we do not know why. We suspect it may be due to using "i." perhaps but I couldn't find more info on this on the web.
Below are the specific codes as an example:
sum y if group==1&CAMPUS==0
sum y if group==3&CAMPUS==0
ttesti 85 3304.612 3163.371 62 2716.484 3175.046, welch // p-value = 0.2686
regress y ib1.group if CAMPUS==0 // p-value = 0.261
Does anyone have any idea what could be going on?
Thank you!
Liz
Comment