Skip to content

Commit

Permalink
version 0.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
aallignol authored and cran-robot committed Jan 13, 2017
1 parent fe9292d commit 363fa46
Show file tree
Hide file tree
Showing 8 changed files with 78 additions and 60 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
@@ -1,3 +1,10 @@
2017-01-13 Arthur Allignol <arthur.allignol@uni-ulm.de>

* version number 0.5.2
* NAMESPACE and DESCRIPTION: import stats and survival
* Examples and tests: require(survival) statements
* Rerun of the test file

2013-09-16 Arthur Allignol <arthur.allignol@uni-ulm.de>

* DESCRIPTION: update version number;
Expand Down
18 changes: 9 additions & 9 deletions DESCRIPTION
@@ -1,15 +1,15 @@
Package: kmi
Version: 0.5.1
Date: 2014/9/4
Title: Kaplan-Meier multiple imputation for the analysis of cumulative
incidence functions in the competing risks setting
Version: 0.5.2
Title: Kaplan-Meier Multiple Imputation for the Analysis of Cumulative
Incidence Functions in the Competing Risks Setting
Author: Arthur Allignol <arthur.allignol@uni-ulm.de>
Maintainer: Arthur Allignol <arthur.allignol@uni-ulm.de>
Depends: survival
Imports: mitools
Description: The package performs a Kaplan-Meier multiple imputation to recover the missing potential censoring information from competing risks events, so that standard right-censored methods could be applied to the imputed data sets to perform analyses of the cumulative incidence functions.
Imports: mitools,survival,stats
Description: The kmi package performs a Kaplan-Meier multiple imputation to recover the missing potential censoring information from competing risks events, so that standard right-censored methods could be applied to the imputed data sets to perform analyses of the cumulative incidence functions.
License: GPL (>= 2)
Packaged: 2014-09-04 21:06:46 UTC; arthur
URL: https://github.com/aallignol/kmi
BugReports: https://github.com/aallignol/kmi/issues
NeedsCompilation: no
Packaged: 2017-01-13 12:27:14 UTC; arthur
Repository: CRAN
Date/Publication: 2014-09-04 23:36:49
Date/Publication: 2017-01-13 15:34:36
14 changes: 7 additions & 7 deletions MD5
@@ -1,6 +1,6 @@
f5aa689562839759d76a34079eb17207 *ChangeLog
8cde2d75282d1c896ff3e2c220961573 *DESCRIPTION
cfda81db12c5f646907bacc2edefad16 *NAMESPACE
024dd0b9a31dbf45c3f0029a47c974bd *ChangeLog
da5f68f0abcdd5367a0035af27c59536 *DESCRIPTION
ddfcf4daaf5b71cbdbbfdc8cdbc797ed *NAMESPACE
946e6564399cf69089aaf2bdd2ec14cd *R/cox.kmi.R
14b8caf85c17ac55ea17a1b42e3d0e0d *R/kmi.R
433e23db8b80c6b899fe5235db056d9f *R/kmi.classic.R
Expand All @@ -9,12 +9,12 @@ d420a5c943333e5e919d86b39d4269a8 *R/kmi.tdc.R
052b3bd2d78d458f491145cffb2d0667 *R/print.summary.cox.kmi.R
f41407106aa9c0c1557deda7b3ee0731 *R/summary.cox.kmi.R
66b2fa917ef690eb2788f500ca7483eb *data/icu.pneu.rda
b92a7ed912b41aa66bca1b7108c556df *man/cox.kmi.Rd
4caee9672bf1ccb3c62f6ae069eeb239 *man/cox.kmi.Rd
c5c3dac6e0a7357e2a9ee6c8b3253016 *man/icu.pneu.Rd
5694dd1654e1b6677ecf2ad4bbcf4988 *man/kmi-package.Rd
2b102835e9a5435c1c86a628a13bee28 *man/kmi.Rd
3d5013331c9edbc2cf054dbaaeab10df *man/kmi.Rd
76a3f1442e8117c86f881386bc20d7fc *man/print.cox.kmi.Rd
756b9ebd16972c029b054ba2001cd623 *man/print.summary.cox.kmi.Rd
e6b96bbd9684834226a67095d94191d8 *man/summary.cox.kmi.Rd
4cd9aec85d4d5e8c954880aef62319aa *tests/test.kmi.R
198567dea2a2fff85c515ad5c4923971 *tests/test.kmi.Rout.save
17a86796978e079d6203d6c5886714e6 *tests/test.kmi.R
54c1e806666d332d88273472c68dbc7e *tests/test.kmi.Rout.save
2 changes: 2 additions & 0 deletions NAMESPACE
@@ -1,5 +1,7 @@
import(survival)
importFrom(mitools, MIcombine)
importFrom("stats", "formula", "model.extract", "model.matrix",
"printCoefmat", "pt", "qt", "update.formula")
export(kmi, cox.kmi, summary.cox.kmi)
S3method(print, cox.kmi)
S3method(summary, cox.kmi)
Expand Down
44 changes: 24 additions & 20 deletions man/cox.kmi.Rd
Expand Up @@ -43,28 +43,32 @@ cox.kmi(formula, imp.data, df.complete = Inf, ...)
\examples{
data(icu.pneu)

set.seed(1313)
imp.dat <- kmi(Surv(start, stop, status) ~ 1, data = icu.pneu,
etype = event, id = id, failcode = 2, nimp = 5)

fit.kmi <- cox.kmi(Surv(start, stop, event == 2) ~ pneu, imp.dat)

summary(fit.kmi)

if (require(survival)) {

set.seed(1313)
imp.dat <- kmi(Surv(start, stop, status) ~ 1, data = icu.pneu,
etype = event, id = id, failcode = 2, nimp = 5)

fit.kmi <- cox.kmi(Surv(start, stop, event == 2) ~ pneu, imp.dat)

summary(fit.kmi)

### Now using the censoring-complete data
fit <- coxph(Surv(start, adm.cens.exit, event == 2) ~ pneu, icu.pneu)

summary(fit)

## estimation of the censoring distribution adjusted on covariates
dat.cova <- kmi(Surv(start, stop, status) ~ age + sex,
data = icu.pneu, etype = event, id = id,
failcode = 2, nimp = 5)

fit.kmi2 <- cox.kmi(Surv(start, adm.cens.exit, event == 2) ~ pneu + age,
dat.cova)

summary(fit.kmi2)
fit <- coxph(Surv(start, adm.cens.exit, event == 2) ~ pneu, icu.pneu)

summary(fit)

## estimation of the censoring distribution adjusted on covariates
dat.cova <- kmi(Surv(start, stop, status) ~ age + sex,
data = icu.pneu, etype = event, id = id,
failcode = 2, nimp = 5)

fit.kmi2 <- cox.kmi(Surv(start, adm.cens.exit, event == 2) ~ pneu + age,
dat.cova)

summary(fit.kmi2)
}
}
\keyword{survival}
\keyword{models}
Expand Down
34 changes: 19 additions & 15 deletions man/kmi.Rd
Expand Up @@ -91,20 +91,24 @@ kmi(formula, data, id = NULL, etype, failcode = 1, nimp = 10,
\examples{
data(icu.pneu)

dat <- kmi(Surv(start, stop, status) ~ 1, data = icu.pneu,
etype = event, id= id, failcode = 2, nimp = 5)

## another way to specify the formula if there is no status
## variable
icu.pneu$ev <- icu.pneu$event
icu.pneu$ev[icu.pneu$status == 0] <- 0

dat <- kmi(Surv(start, stop, ev != 0) ~ 1, data = icu.pneu,
etype = ev, id= id, failcode = 2, nimp = 5)

## with covariates to model the censoring distribution
dat.cova <- kmi(Surv(start, stop, status) ~ age + sex,
data = icu.pneu, etype = event, id = id,
failcode = 2, nimp = 5)
if (require(survival)) {

dat <- kmi(Surv(start, stop, status) ~ 1, data = icu.pneu,
etype = event, id= id, failcode = 2, nimp = 5)

## another way to specify the formula if there is no status
## variable
icu.pneu$ev <- icu.pneu$event
icu.pneu$ev[icu.pneu$status == 0] <- 0

dat <- kmi(Surv(start, stop, ev != 0) ~ 1, data = icu.pneu,
etype = ev, id= id, failcode = 2, nimp = 5)

## with covariates to model the censoring distribution
dat.cova <- kmi(Surv(start, stop, status) ~ age + sex,
data = icu.pneu, etype = event, id = id,
failcode = 2, nimp = 5)

}
}
\keyword{survival}
1 change: 1 addition & 0 deletions tests/test.kmi.R
@@ -1,3 +1,4 @@
require(survival)
require(kmi)

### test 1
Expand Down
18 changes: 9 additions & 9 deletions tests/test.kmi.Rout.save
@@ -1,6 +1,6 @@

R version 3.1.1 (2014-07-10) -- "Sock it to Me"
Copyright (C) 2014 The R Foundation for Statistical Computing
R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-suse-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
Expand All @@ -17,10 +17,10 @@ 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.

> require(survival)
Loading required package: survival
> require(kmi)
Loading required package: kmi
Loading required package: survival
Loading required package: splines
>
> ### test 1
>
Expand Down Expand Up @@ -146,7 +146,7 @@ cox.kmi(formula = Surv(time, ev == 1) ~ cov, imp.data = dat.kmib)
Pooled estimates:
*****************
coef exp(coef) se(coef) t p
cov -0.2076261 0.8125108 0.3726519 -0.5571583 0.5774271
cov -0.2216016 0.8012345 0.3743375 -0.5919834 0.5538821

> fit.kmib.fact
Call:
Expand All @@ -156,7 +156,7 @@ cox.kmi(formula = Surv(time, status == "rel") ~ cov, imp.data = dat.kmib.fact)
Pooled estimates:
*****************
coef exp(coef) se(coef) t p
cov -0.2076261 0.8125108 0.3726519 -0.5571583 0.5774271
cov -0.2216016 0.8012345 0.3743375 -0.5919834 0.5538821

>
> summary(fit.kmib)
Expand All @@ -168,10 +168,10 @@ cox.kmi(formula = Surv(time, ev == 1) ~ cov, imp.data = dat.kmib)
Pooled estimates:
*****************
coef exp(coef) se(coef) t Pr(>|t|)
cov -0.2076 0.8125 0.3727 -0.557 0.577
cov -0.2216 0.8012 0.3743 -0.592 0.554

exp(coef) exp(-coef) lower .95 upper .95
cov 0.8125 1.231 0.3914 1.687
cov 0.8012 1.248 0.3846 1.669

>
>
Expand Down Expand Up @@ -409,4 +409,4 @@ pneu1 3.034 0.3297 1.896 4.854
>
> proc.time()
user system elapsed
4.409 0.035 4.494
5.104 0.024 5.119

0 comments on commit 363fa46

Please sign in to comment.