[R] Cox regression and p-values

Peter Dalgaard p.dalgaard at biostat.ku.dk
Tue Sep 18 23:15:03 CEST 2007


Duncan Murdoch wrote:
> On 9/18/2007 12:41 PM, Daniel Brewer wrote:
>   
>> Hello,
>> I might be barking up the wrong tree here, but I want to make sure I
>> have a full understanding of this.  What I would like to know is what
>> tests are performed to give the p-values for each variable in the table
>> that is the result of coxph regression when the variables are
>> categorical only.
>>
>> More specifically, when expected counts are less than 5 is the Fisher's
>> exact test used instead of the Chi^2 test?
>>     
>
> I think you need to check the reference (Anderson and Gill) or the 
> source to be sure, but I wouldn't expect either of those tests to be 
> used here.
>   
(That's Andersen, with an 'e'. He's probably used to that misspelling by 
now, though.)

Almost everything in this world can be converted to a chi-square 
distributed test statistic, but it is not usually the familiar 
sum((O-E)^2/E) formula (which is wrong already for the simple two-group 
comparison, i.e. logrank test, unless you have special assumptions on 
the censoring pattern).

There is no obvious counterpart to the Fisher test available for 
survival data, as far as I know.
> I'd guess these are generalized likelihood ratio tests:  fit the model 
> with the variable, fit it without, and look at the difference in 
> (partial) log likelihood.  If the variable does not affect the response 
> then twice the difference in log likelihood would have an asymptotic 
> chi-square distribution.
>
>   
The ones in the table of coefficients are Wald tests, I believe. I.e. 
they are based on the variance-covariance matrix based on the inverse 
Hessian matrix for the likelihood, calculated at the  maximum  
likelihood estimate.

> Fisher's exact test and the Pearson chi-square test are not appropriate 
> here, because the individuals are not exchangeable under the null 
> hypothesis.
>
> Duncan Murdoch
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>   


-- 
   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)                  FAX: (+45) 35327907



More information about the R-help mailing list