
R version 2.7.1 (2008-06-23)
Copyright (C) 2008 The R Foundation for Statistical Computing
ISBN 3-900051-07-0

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> options(na.action=na.exclude) # preserve missings
> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
> library(survival)
Loading required package: splines
> 
> #
> # A test of  NULL models
> #
> fit1 <- coxph(Surv(stop, event) ~ rx + strata(number), bladder, iter=0)
> fit2 <- coxph(Surv(stop, event) ~ strata(number), bladder)
> 
> all.equal(fit1$loglik[2], fit2$loglik)
[1] TRUE
> all.equal(fit1$resid, fit2$resid)
[1] TRUE
> 
> 
> fit1 <- coxph(Surv(start, stop, event) ~ rx + strata(number), bladder2, iter=0)
> fit2 <- coxph(Surv(start, stop, event) ~ strata(number), bladder2)
> 
> all.equal(fit1$loglik[2], fit2$loglik)
[1] TRUE
> all.equal(fit1$resid, fit2$resid)
[1] TRUE
> 
