Re: Runing contrast tests in a 2x2x2
Posted by
Bruce Weaver on
URL: http://spssx-discussion.165.s1.nabble.com/Runing-contrast-tests-in-a-2x2x2-tp5734662p5734666.html
I don't have SPSS on this machine, so cannot test. But if you try this:
GLM DV1 BY A B C WITH CV1
/DESIGN CV1 A B C A*B A*C B*C A*B*C
/EMMEANS TABLES(A*B*C) WITH(CV1=MEAN) COMPARE(B) ADJ(LSD)
/INTERCEPT=INCLUDE.
I expect one of the pairwise contrasts produced by COMPARE(B) will be the A1B0C0 vs. A1B1C0 contrast you want. If so, this is much easier (IMO) than messing around with LMATRIX.
By the way, notice that I changed the syntax to include the intercept, because I cannot imagine why you were excluding it. If you have some good reason for excluding the intercept, please explain.
p.s. - Mike, I agree that the syntax shown on that IBM website I referred to earlier should have included WITH covariate.
itwardus wrote
Thanks for the quick replies, I apologize I am a bit of a syntax novice and have been pouring over websearches all day to no avail.
Each IV in the 2x2x2 has 2 levels so there are 8 total conditions.
I am trying to do a simple contrast of two conditions so for example, A1B0C0 vs. A1B1C0.
I attempted the syntax as :
GLM DV1 BY A B C WITH CV1
/DESIGN CV1 A B C A*B A*C B*C A*B*C
/INTERCEPT=EXCLUDE
/PRINT = TEST(LMATRIX)
/LMARTIX A*B 0 0 -1 1 A*B*C 0 0 0 0 1 0 -1 0.
I have tried a few other iterations of the LMATRIX but none seem to work and I am a bit off on where exactly I am going off the rails.
itwardus wrote
Thanks for the quick replies, I apologize I am a bit of a syntax novice and have been pouring over websearches all day to no avail.
Each IV in the 2x2x2 has 2 levels so there are 8 total conditions.
I am trying to do a simple contrast of two conditions so for example, A1B0C0 vs. A1B1C0.
I attempted the syntax as :
GLM DV1 BY A B C WITH CV1
/DESIGN CV1 A B C A*B A*C B*C A*B*C
/INTERCEPT=EXCLUDE
/PRINT = TEST(LMATRIX)
/LMARTIX A*B 0 0 -1 1 A*B*C 0 0 0 0 1 0 -1 0.
I have tried a few other iterations of the LMATRIX but none seem to work and I am a bit off on where exactly I am going off the rails.
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/"When all else fails, RTFM."
PLEASE NOTE THE FOLLOWING:
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (
https://listserv.uga.edu/).