coefTest and one tailed T-test
Show older comments
Dear all,
I have fitted a linear model to my data as follows: Var6 ~ 1 + groupVar1 +groupVar2 + groupVar3 +Var4 + Var5
the first 3 variables are dummy variables for the three groups that I have, and I aim to compare groups using GeneralizedLinearModel.fit and adjusting for nuisance variables. Using coefTest with this contrast I get the f statistic of "any group different from zero" while controlling for Var4 and Var5: [0 1 0 0 0 0;0 0 1 0 0 0;0 0 0 1 0 0] and I get a p value, and so on. However, when it comes to one tail t tests for the following two contrasts I get the same significant p value for which does not make sense to me:
contrast 2:Group1 >Group2 coefTest(m, [0 1 -1 0 0 0]) contrast 3:Group2 >Group1 coefTest (m, [0 -1 1 0 0 0])
It would be great if someone could let me know where I'm getting this wrong, as there is no way for a group to be greater and lesser than another group at the same time.
-Arman
1 Comment
Accepted Answer
More Answers (0)
Categories
Find more on Statistics and Machine Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!