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

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

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
Totally agreed. I made a mistake in calling the categorization a GAM. If we apply a step function to the continuous age we get a limited range ordinal variable. Categorizing is creating several binary variables from the continuous (with treatment contrasts). Stephen B -Original

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

2009-05-10 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. Cheers,