Re: Repeated contrast for COXREG
Posted by
Bruce Weaver on
Jan 04, 2022; 4:07pm
URL: http://spssx-discussion.165.s1.nabble.com/Repeated-contrast-for-COXREG-tp5740927p5740929.html
I found the answer to my own question.
* Aha. I found the solution. One must distinguish between
* the hypothesis matrix and the contrast matrix.
* "The generalized inverse of the hypothesis matrix yields the desired contrast matrix".
* Source:
https://www.theoj.org/joss-papers/joss.02134/10.21105.joss.02134.pdf.
* Let h = the hypothesis matrix for "repeated" contrasts with k = 4 levels.
MATRIX.
COMPUTE h = { 1, -1, 0, 0 ; 0, 1, -1, 0; 0, 0, 1, -1 }.
COMPUTE c = GINV(h).
PRINT h /TITLE="h = hypothesis matrix" /FORMAT=F5.0.
PRINT c /TITLE="c = contrast matrix = GINV(h)" /FORMAT=F5.3.
END MATRIX.
OUTPUT:
Run MATRIX procedure:
h = hypothesis matrix
1 -1 0 0
0 1 -1 0
0 0 1 -1
c = contrast matrix = GINV(h)
.750 .500 .250
-.250 .500 .250
-.250 -.500 .250
-.250 -.500 -.750
------ END MATRIX -----
Bruce Weaver wrote
Hello everyone and Happy New Year. I just read a question on ResearchGate about the REPEATED contrast option for COXREG, and must confess that I am rather confused by the output that was attached to the question. You can see it here:
https://www.researchgate.net/post/How_to_interpret_the_output_of_cox-regression_using_the_CONTRAST_subcommand_repeatedHere is what the v27 CSR manual entry for COXREG-CONTRAST says about Repeated contrasts:
"REPEATED. Comparison of adjacent categories. Each category of the independent variable except the last is compared to the next category."
The categorical variable in question has 4 levels. Therefore, I would expect the following contrast coefficients for REPEATED contrasts:
Contrast 1: 1 -1 0 0
Contrast 2: 0 1 -1 0
Contrast3: 0 0 1 -1
But the output shows the following values:
Contrast 1: .750 -.250 -.250 -.250
Contrast 2: .500 .500 -.500 -.500
Contrast 3: .250 .250 .250 -.750
--
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/).