- using R version 2.11.0 Under development (unstable) (2010-01-14 r50981)
- using session charset: UTF-8
- checking for file 'coxphf/DESCRIPTION' ... OK
- checking extension type ... Package
- this is package 'coxphf' version '1.0-2'
- checking package name space information ... OK
- checking package dependencies ... OK
- checking if this is a source package ... OK
- checking for executable files ... OK
- checking whether package 'coxphf' can be installed ... OK
- checking package directory ... OK
- checking for portable file names ... OK
- checking for sufficient/correct file permissions ... OK
- checking DESCRIPTION meta-information ... OK
- checking top-level files ... OK
- checking index information ... OK
- checking package subdirectories ... OK
- checking R files for non-ASCII characters ... OK
- checking R files for syntax errors ... OK
- checking whether the package can be loaded ... OK
- checking whether the package can be loaded with stated dependencies ... OK
- checking whether the package can be unloaded cleanly ... OK
- checking whether the name space can be loaded with stated dependencies ... OK
- checking whether the name space can be unloaded cleanly ... OK
- checking for unstated dependencies in R code ... OK
- checking S3 generic/method consistency ... OK
- checking replacement functions ... OK
- checking foreign function calls ... OK
- checking R code for possible problems ... NOTE
decomposeSurv: no visible binding for global variable ‘response’
- checking Rd files ... NOTE
prepare_Rd: coxphfplot.Rd:70-71: Dropping empty section \note
prepare_Rd: coxphftest.Rd:61-62: Dropping empty section \note
- checking Rd metadata ... OK
- checking Rd cross-references ... OK
- checking for missing documentation entries ... OK
- checking for code/documentation mismatches ... OK
- checking Rd \usage sections ... OK
- checking line endings in C/C++/Fortran sources/headers ... OK
- checking line endings in Makefiles ... OK
- checking for portable use of $BLAS_LIBS ... OK
- checking examples ... ERROR
Running examples in 'coxphf-Ex.R' failed.
The error most likely occurred in:
> ### * coxphf
>
> flush(stderr()); flush(stdout())
>
> ### Name: coxphf
> ### Title: Cox regression with Firth's penalized likelihood
> ### Aliases: coxphf
> ### Keywords: survival
>
> ### ** Examples
>
> # fixed covariate and monotone likelihood
> time<-c(1,2,3)
> cens<-c(1,1,1)
> x<-c(1,1,0)
> sim<-cbind(time,cens,x)
> sim<-data.frame(sim)
> coxphf(sim, formula=Surv(time,cens)~x) #convergence attained!
coxphf(formula = Surv(time, cens) ~ x, data = sim)
Model fitted by Penalized ML
Confidence intervals and p-values by Profile Likelihood
coef se(coef) exp(coef) lower 0.95 upper 0.95 Chisq p
x 1.329104 1.929072 3.777658 0.2914006 528.7306 0.9151565 0.3387499
Likelihood ratio test=0.9151565 on 1 df, p=0.3387499, n=3
> coxph(sim, formula=Surv(time,cens)~x) #no convergence!
Warning in fitter(X, Y, strats, offset, init, control, weights = weights, :
Ran out of iterations and did not converge
Call:
coxph(formula = Surv(time, cens) ~ x, data = sim)
coef exp(coef) se(coef) z p
x 21.0 1.29e+09 29282 0.000716 1
Likelihood ratio test=2.2 on 1 df, p=0.138 n= 3
>
> # time-dependent covariate
> test2 <- data.frame(list(start=c(1, 2, 5, 2, 1, 7, 3, 4, 8, 8),
+ stop =c(2, 3, 6, 7, 8, 9, 9, 9,14,17),
+ event=c(1, 1, 1, 1, 1, 1, 1, 0, 0, 0),
+ x =c(1, 0, 0, 1, 0, 1, 1, 1, 0, 0) ))
>
> summary( coxphf( formula=Surv(start, stop, event) ~ x, data=test2))
coxphf(formula = Surv(start, stop, event) ~ x, data = test2)
Model fitted by Penalized ML
Confidence intervals and p-values by Profile Likelihood
coef se(coef) exp(coef) lower 0.95 upper 0.95 Chisq p
x -0.1213111 0.7920055 0.8857583 0.2031077 4.21294 0.02621190 0.8713839
Likelihood ratio test=0.02621190 on 1 df, p=0.8713839, n=10
Wald test = 0.02346091 on 1 df, p = 0.8782646
Covariance-Matrix:
x
x 0.6272728
>
>
> # time-dependent effect
> # the coxphf function can handle interactions of a (fixed or time-dependent)
> # covariate with time
> # such that the hazard ratio can be expressed as a function of time
>
> summary(coxphf(formula=Surv(start, stop, event)~x+x:log(stop), data=test2, firth=FALSE))
coxphf(formula = Surv(start, stop, event) ~ x + x:log(stop),
data = test2, firth = FALSE)
Model fitted by Standard ML
Confidence intervals and p-values by Profile Likelihood
coef se(coef) exp(coef) lower 0.95 upper 0.95 Chisq p
x 1.854398 27.038116 6.387854e+00 NaN NaN 0 1
log(stop) -11.976909 9.618655 6.287737e-06 NaN NaN 0 1
x:log(stop) -1.548477 13.168942 2.125715e-01 NaN NaN 0 1
Likelihood ratio test=-27.09733 on 3 df, p=1, n=10
Wald test = 2.551232 on 3 df, p = 0.4661035
Covariance-Matrix:
x log(stop) x:log(stop)
x 731.0597 127.75834 -355.4551
log(stop) 127.7583 92.51852 -61.1405
x:log(stop) -355.4551 -61.14050 173.4210
>
> # note that coxph would treat x:log(stop) as a fixed covariate
> # (computed before the iteration process)
> # coxphf treats x:log(stop) as a time-dependent covariate which
> # changes (for the same individual!) over time
>
>
> # time-dependent effect with monotone likelihood
>
> test3 <- data.frame(list(start=c(1, 2, 5, 2, 1, 7, 3, 4, 8, 8),
+ stop =c(2, 3, 6, 7, 8, 9, 9, 9,14,17),
+ event=c(1, 0, 0, 1, 0, 1, 1, 0, 0, 0),
+ x =c(1, 0, 0, 1, 0, 1, 1, 1, 0, 0) ))
>
> summary( coxphf( formula=Surv(start, stop, event) ~ x+x:log(stop), data=test3))