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. 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. 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@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.