Re: [R] Comparing COXPH models, one with age as a continuous variable, one with age as a three-level factor

2010-09-02 Thread Bond, Stephen
- From: Frank Harrell [mailto:harre...@gmail.com] On Behalf Of Frank Harrell Sent: Thursday, September 02, 2010 4:23 PM To: Bond, Stephen Cc: r-help@r-project.org Subject: Re: [R] Comparing COXPH models, one with age as a continuous variable, one with age as a three-level factor On Thu, 2 Sep

Re: [R] Comparing COXPH models, one with age as a continuous variable, one with age as a three-level factor

2010-09-02 Thread Frank Harrell
On Thu, 2 Sep 2010, stephenb wrote: sorry to bump in late, but I am doing similar things now and was browsing. IMHO anova is not appropriate here. it applies when the richer model has p more variables than the simpler model. this is not the case here. the competing models use different variabl

Re: [R] Comparing COXPH models, one with age as a continuous variable, one with age as a three-level factor

2010-09-02 Thread stephenb
sorry to bump in late, but I am doing similar things now and was browsing. IMHO anova is not appropriate here. it applies when the richer model has p more variables than the simpler model. this is not the case here. the competing models use different variables. you are left with IC. by transfo

Re: [R] Comparing COXPH models, one with age as a continuous variable

2009-05-11 Thread Terry Therneau
The "anova" process is only statistically valid for nested models, i.e., where one includes the other as a proper subset. A model with continuous age and one with discrete age are not nested; your p-value will be meaningless. Terry Therneau __ R-he

Re: [R] Comparing COXPH models, one with age as a continuous variable, one with age as a three-level factor

2009-05-09 Thread Greg Finak
?anova.coxph will tell you that there's an additional parameter, test, taking values "F", "Cp", or "Chisq" which instructs the anova method to perform the stated test comparing the two models and spit out a p- value (for F and Chisq at least). example(anova.chisq) provides some examples. Che

[R] Comparing COXPH models, one with age as a continuous variable, one with age as a three-level factor

2009-05-09 Thread John Sorkin
Windows XP R 2.8.1 I am trying to use anova(fitCont,fitCat) to compare two Cox models (coxph) one in which age is entered as a continuous variable, and a second where age is entered as a three-level factor (young, middle, old). The Analysis of Deviance Table produced by anova does not give a p