clogit and general conditional logistic regression
On Tue, 10 Dec 2002 Ted.Harding at nessie.mcc.ac.uk wrote:
However, that is a theoretical truth! What I was really asking (and apologies if it was not clear) was whether (and, if so, how) it would be possible to present the sort of data I was referring to to the R function 'coxph' or 'clogit'; the documentation seems to assume data involving a time component in a survival context, and I find I am confused about how to escape from that context into the more general regression (logistic linear model) context, when using these functions in R. Specifically, suppose I have data (say in the form of vectors) A = Level of categorical factor A X = Value of quantitative covariate X Cases = Number of Cases, r_i, out of n_i Unaffected = Number of Unaffected, (n_i - r_i), out of n_i (no "time" involved here) and I want to fit, by conditional logistic regression, a model such as Cases ~ A + X How, then, may such data be presented to say 'coxph'? Might the trick simply be to give every row an extra quasi-start-time equal to 0, and a quasi-end-time equal to 1?
If you look at the example for clogit it shows how to use it, and if you look at the code you can see how it works. It does just construct an end time of 1 for every observation. -thomas