[R] Running cox models
p.dalgaard at biostat.ku.dk
Sun Sep 3 13:21:19 CEST 2006
"Geoff Russell" <geoffrey.russell at gmail.com> writes:
> I'm reading van Belle et al "Biostatistics" and trying to run a cox test using
> a dataset from:
> (Primary Biliary Cirrhosis data link at top of the page),
> I'm using the following code:
> --------------- start of code
> liver <- scan("liver2.txt",list(age=0,albumin=0,alkphos=0,ascites=0,bili=0,
> ----------------- End of code
> but the answer is rather different from that in the book (p.688 - for
> anyone with the book).
> The book refers to EDTRT, but the dataset has EDMADJ and EDMEMA, also
> the book talks about 312 patients and the dataset has 418 lines.
> Has anybody else used this dataset?
Have you looked at the pbc dataset that comes with the survival
package? The documentation says 312 randomised and 108 unrandomised
(which should be 106?).
There are some peculiar differences, e.g.
1 2 <NA>
157 153 108
> table(pbc$trt, exclude=NULL)
-9 1 2
106 158 154
(Thomas Lumley was involve in both the book and the package, so
probably knows better.)
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