I am working on a Cox regression analysis with two categorical covariates (predictors) each of which has only two categories. In this particular situation, shouldn't the results be the same no matter which of the several available contrast options I choose (which in fact they aren't), or am I making an error in reasoning?
My covariates are Treatment (A or B) and Risk (High or Low), and I wan to know whether treatment has an effect, and whether the effect is modified by risk. Which contrasts should I choose for my two covariates? Thanks, Andreas |
Administrator
|
OK, I'll throw you a bone:
-- NEW FILE. DATASET CLOSE ALL. MATRIX. SAVE MAKE (1000,3,-1) / OUTFILE * /VARIABLES X C Y . END MATRIX. IF $CASENUM GT 500 X=1. IF RANGE($CASENUM,251,500,751,1000) C=1. COMPUTE XC = X*C. COMPUTE Y = 10 + X * .5 + C * .2 + XC * 8 + RV.NORMAL(0,1). DATASET NAME raw. FREQUENCIES X C. CROSSTABS TABLES X BY C. * OMS. DATASET DECLARE Regression. OMS /SELECT TABLES /IF COMMANDS=['Regression'] SUBTYPES=['Coefficients'] /DESTINATION FORMAT=SAV OUTFILE='Regression'. REGRESSION DEPENDENT Y / METHOD ENTER X C XC. OMSEND. * OMS. DATASET DECLARE Means. OMS /SELECT TABLES /IF COMMANDS=['Means'] SUBTYPES=['Report'] /DESTINATION FORMAT=SAV NUMBERED=TableNumber_ OUTFILE='Means'. MEANS Y BY X. MEANS Y BY XC. OMSEND. MATCH FILES /FILE Regression / KEEP Var2 B. DATASET NAME Coef. EXECUTE. MATCH FILES /FILE Means / KEEP TableNumber_ Var1 Mean. DATASET NAME MEInt. IF TableNumber_ EQ LAG( TableNumber_ ) AND Var1 NE 'Total' Delta=(Mean-LAG(Mean))/2. FORMATS Delta (F6.4). EXECUTE.
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
Administrator
|
In reply to this post by Frank Furter
I suspect you want to use INDICATOR. From the FM (under COXREG > CONTRAST Subcommand):
INDICATOR(refcat). Indicator variables. Contrasts indicate the presence or absence of category membership. By default, refcat is the last category (represented in the contrast matrix as a row of zeros). To omit a category other than the last, specify the sequence number of the category (which is not necessarily the same as its value) in parentheses after the keyword INDICATOR. Furthermore, I suspect you want INDICATOR(1) to make the first category of each variable the omitted reference category. (But I'm just guessing.) HTH.
--
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/). |
In reply to this post by David Marso
Thanks for the programming lesson, David ;) I'm actually not sure what this tells me about my contrast problem, though.
It appears that when the predictors are binary, then Simple, Difference, Helmet, Repeated and Indicator should have the same result (only the reference category may differ), right? Andreas |
Free forum by Nabble | Edit this page |