Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Problems using stcoxgof and estat concordance with dichotomous variables


From   Kat Witt <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: Problems using stcoxgof and estat concordance with dichotomous variables
Date   Mon, 30 Sep 2013 11:38:03 +0000

Dear Stata Listers,
I am using Stata, version 11 and wish to run the stcoxgof and estat concordance post-estimation commands after my Cox model to calculate the added variable version of the Gronnesby-Borgan chi-square test and the c-statistic for my model. When I have previously run the model using age as a continuous variable, the post-estimation commands have worked perfectly. However, now that I wish to run the same command using age as a dichotomous variable (dichotomised as less than 32 years==1; 32 years or older==0), I get problems. 


Cox model with age coded continuously (works fine):
stcox Age_AtDiagnosis SubstanceUse_Disorder Previous_Violence, mgale(mg) scaledsch(scaled*)


Cox model with age coded dichotomously (problematic):
stcox Age_Less32AtDiagnosis SubstanceUse_Disorder Previous_Violence, mgale(mg) scaledsch(scaled*)


Gronnesby-Borgan command I have been using without problems in the Cox model with age coded continuously:
stcoxgof, group(8)


Harrel's c-index command I have been using without problems in the Cox model with age coded continuously:
estat concordance


Error message I receive whenever I try to run the stcoxgof command after the Cox model with age coded dichotomously:
(There are only 8 distinct quantiles of risk because of number of covariate patterns).
_I__000003_4 not found in the model

I seem to have only 8 groups in my command, however, and I cannot seem to understand what variable is missing to cause the "_I__000003_4 not found in the model" message to be generated. It is my understanding that the stcoxgof command requires Martingale residuals to be calculated but I have specified them to be populated in the stcox command above.


Error message I receive whenever I try to run the estat concordance command after the Cox model with age coded dichotomously:
variable _I__000003_3 not found

Once again, I cannot seem to understand what variable is missing to cause the "_I__000003_4 not found in the model" message to be generated.



I would very much appreciate your help in decoding what is going wrong with these commands as it only seems to affect the calculation of the Gronnesby-Borgan chi-square test and the c-statistic when a dichotomous variable is placed in first place in the stcox command. For example, if I were to run the following model, the stcoxgof and estat concordance commands would once again work fine:
stcox PositiveSymptoms_TotalScore Age_Less32AtDiagnosis SubstanceUse_Disorder Previous_Violence, mgale(mg) scaledsch(scaled*)


I thank you for any advice you can give as to the calculation of these statistics when all variables within a Cox model are dichotomous.


With warm regards,
Kat Witt


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index