Analysis of Multivariate Event Times
Overview
Implementation of various statistical models for multivariate event history data doi:10.1007/s10985-013-9244-x. Including multivariate cumulative incidence models doi:10.1002/sim.6016, and bivariate random effects probit models (Liability models) doi:10.1016/j.csda.2015.01.014. Modern methods for survival analysis, including regression modelling (Cox, Fine-Gray, Ghosh-Lin, Binomial regression) with fast computation of influence functions.
- brier score for binreg objects
brier_binreg
From NEWS.md in the release
Install
Health
ERRORexamplesr-devel-linux-x86_64-debian-gcc
Running examples in ‘mets-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: WA_recurrent
> ### Title: While-Alive Estimands for Recurrent Events
> ### Aliases: WA_recurrent
>
> ### ** Examples
>
> data(hfactioncpx12)
> dtable(hfactioncpx12,~status)
status
0 1 2
617 1391 124
> dd <- WA_recurrent(Event(entry,time,status)~treatment+cluster(id),data=hfactioncpx12,
+ time=2,death.code=2)
Error in a$specials[[i]] : subscript out of bounds
Calls: WA_recurrent -> rmstIPCW -> binreg
Execution haltedERRORtestsr-devel-linux-x86_64-debian-gcc
Running ‘tinytest.R’ [3s/4s]
Running the tests in ‘tests/tinytest.R’ failed.
Complete output:
> if (requireNamespace("tinytest", quietly = TRUE)) {
+ options(Ncpus = 2)
+ Sys.setenv(OMP_THREAD_LIMIT = 2)
+ Sys.setenv(OMP_NUM_THREADS = 2)
+ Sys.setenv(OPENBLAS_NUM_THREADS = 2)
+ Sys.setenv(ARMA_OPENMP_THREADS = 2)
+ RcppArmadillo::armadillo_set_number_of_omp_threads(2)
+ tinytest::test_package("mets")
+ }
test_approx.R................. 0 tests
test_approx.R................. 0 tests
test_approx.R................. 2 tests OK 0.8s
test_ate_wglm.R............... 0 tests
test_ate_wglm.R............... 0 tests riskRegression version 2026.03.11
test_ate_wglm.R............... 0 tests
test_ate_wglm.R............... 0 tests
test_ate_wglm.R............... 0 tests
test_ate_wglm.R............... 0 tests
test_ate_wglm.R............... 0 tests
test_ate_wglm.R............... 0 tests
test_ate_wglm.R............... 0 tests Error in a$specials[[i]] : subscript out of bounds
Calls: <Anonymous> ... lapply -> FUN -> eval -> eval -> test_ate_wglm -> logitIPCW
Execution halted- ERROR12 OK, 1 ERROR2026-10-24
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-07-31
- OK13 OK2026-07-09
- ERROR11 OK, 2 ERROR2026-07-01
Show 6 earlier changesHide 6 earlier changes
- OK13 OK2026-06-08
- ERROR12 OK, 1 ERROR2026-06-07
- OK13 OK2026-05-02
- NOTE11 OK, 3 NOTE2026-04-22
- ERROR10 OK, 3 NOTE, 1 ERROR2026-04-18
- NOTE11 OK, 3 NOTE2026-03-10
Documentation
- Help pages
- 165 (3 internal)includes a package overview page
- Examples that run
- 88%94 run in a plain check · 6 only when donttest examples are enabled (R CMD check --as-cran) · 5 never run · 2 hold no code
- Exported functions with examples
- 71%
- Documented parameters
- 99%
- Return-value docs
- 63%
- Help pages citing references
- 20%
Also includes 3 demo scripts (run with demo())
- A practical guide to Human Genetics with Lifetime Data
- Analysis of bivariate binomial data: Twin analysis
- Analysis of multivariate binomial data: family analysis
- Analysis of multivariate survival data
- Average treatment effect (ATE) for Competing risks and binary outcomes
- Average treatment effect (ATE) for Restricted mean survival and years lost of Competing risks
- Binomial Regression for Survival and Competing Risks Data
- Cooking Survival Data: 5-Minute Recipes
- Cumulative Incidence Regression
- Discrete Interval Censored Survival Models
Show 12 moreHide 12 vignettes
- dUtility data-frame manipulations
- G-Computation or standardization for the Cox, Fine-Gray and binomial regression models for survival data
- GEE cluster standard errors and predictions for glm objects
- Haplotype Discrete Survival Models
- IPCW Cumulative Cost
- Marginal modelling of clustered survival data
- Mediation Analysis for survival data
- Randomization for Cox Type rate models
- Recurrent events
- Twin models
- Two-Stage Randomization for Competing risks and Survival outcomes
- While Alive estimands for Recurrent Events
Downloads
Repository
- PRs merged (all time)
- 90%
- Median days to close, 50 most recently updated closed issues
- 32
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Issues over time
PRs over time
Commits over time
8 development-tooling and community-health practices detected across 4 families in the upstream repository
Checks run against github.com/kkholst/mets on 2026-10-21.
The R CMD check workflow runs on Linux
GitHub Pages site last deployed 2026-08-25 · The repository has a site deploy workflow
pkgdown site last built 2026-08-25
Dependencies
Installing mets adds 15 packages (7 with compiled code, 8.2 MB of source tarballs). Heaviest: Rcpp 1.8 MB, lava 1.2 MB, RcppArmadillo 1.0 MB.
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- 1.3.12Latest
- 1.3.112026-05-23 · diff ↗ ·
removed 1 export
glm_IPTWadded 3 exports
binregStrata, binreg_IPTW, brier_binreg - 1.3.102026-05-23 · diff ↗ ·
removed 137 exports
BinAugmentCifstrata, Bootphreg, CCbinomial.twostage, EVaddGam, Effbinreg, EventSplit2, FG_AugmentCifstrata, IIDrecreg, aalenfrailty, ace.family.design, addCums, ascertained.pairs, back2timereg, basecumhaz, basehazplot.phreg, baseplot, binomial.twostage, binomial.twostage.time, bplotdFG, casewise.bin, casewise.test, cif.yearslost, coarse.clust, coefmat, construct_id, cor.cif, corsim.prostate, corsim.prostate.random, count.history, count.historyVar and 107 moreadded 80 exports
Grandom_cif, WA_reg, ace_family_design, ascertained_pairs, binomial_twostage, binomial_twostage_time, casewise_bin, cif_yearslost, cluster_index, coarse_clust, cor_cif, corsim_prostate_random, count_history, divide_conquer, event_split, event_split2, familyclusterWithProbands_index, familycluster_index, force_same_cens, gofM_phreg, gofZ_phreg, haplo_surv_discrete, interval_logitsurv_discrete, kendall_ClaytonOakes_twin_ace, kendall_normal_twin_ace, lin_approx, logrankRecurrentBase, make_pairwise_design, or_cif, p11_binomial_twostage_RV and 50 more - RR 4.6.0 released · 2026-04-24
- 1.3.92026-01-11 · diff ↗ ·
removed 11 exports
FastCoxPLstrataR, cause.pchazard.sim, namesortme, phregR, pre.cifs, rcrisks, read.phreg, sim.base, sim.cause.cox, sim.cifsRestrict, sim.coxadded 5 exports
draw.phreg, marks, nameme, phreg_weibull, rweibullcox - 1.3.8
- 1.3.72025-08-30 · diff ↗ ·
removed 9 exports
IIDbaseline.cifreg, IIDbaseline.phreg, IIDbaseline.recreg, cifregO, cumODDS, resmeanIPCWold, showfitsimIII, simRecurrentIII, strataAugmentadded 11 exports
binregRatio, construct_id, cumoddsreg, iidBaseline, namesortme, plot_twin, ratioATE, rmstRatio, setup.phreg, showfitsimList, simRecurrentList - 1.3.62025-04-23 · diff ↗ ·
removed 16 exports
Bootcovariancerecurrence, BootcovariancerecurrenceS, EventSplit, covarianceRecurrent, covarianceRecurrentS, plotstrata, predictRisk.binreg, predictRisk.cifreg, predictRisk.phreg, predictmlogit, prob.exceedBiRecurrent, prob.exceedBiRecurrentStrata, prob.exceedRecurrent, prob.exceedRecurrentStrata, recurrentMarginalIPCW, simCoxadded 18 exports
EventSplit2, IIDrecreg, Surv, baseplot, cifregFG, cifregO, cluster, conftype, iid, plotO.predictphreg, plotpredictphreg, predictO.phreg, predictRisk, predictrecreg, recurrentMarginalPhreg, strata, summaryRecurrentobject, summarybase.phreg - RR 4.5.0 released · 2025-04-11
- 1.3.52025-01-11 · diff ↗ ·
removed 2 exports
binregATEbin, recurrentMarginalAIPCWdataadded 22 exports
Event, IIDbaseline.recreg, WA_recurrent, evalTerminal, event.split, gofFG, kmplot, plotConfregion, predictRisk.binreg, predictRisk.cifreg, predictRisk.phreg, rchazl, read.phreg, resmeanIPCWold, showfitsimIII, sim.phreg, sim.phregs, sim.recurrent, simCens, simGLcox, simRecurrentIII, survivalGtime - RR 4.4.0 released · 2024-04-24
- 1.3.4
- 1.3.32023-12-05 · diff ↗ ·
removed 3 exports
easy.survival.twostage, simRecurrentGamma, survival.twostageCCadded 11 exports
binregG, binregTSR, cumODDS, phreg_IPTW, phreg_lt, predictGLM, rchazC, rcrisks, summaryGLM, twostageREC, waldTest - RR 4.3.0 released · 2023-04-21
- 1.3.22023-01-17 · diff ↗ ·
added 29 exports
IC, IIDbaseline.cifreg, IIDbaseline.phreg, cause.pchazard.sim, cpred, estimate, gof, invsubdist, lin.approx, pre.cifs, predictCumhaz, rchaz, rcrisk, recregIPCW, resmeanATE, rmst.phreg, rmstATE, rmstIPCW, sim.base, sim.cause.cox, sim.cif, sim.cifs, sim.cifsRestrict, sim.cox, simrchaz, simsubdist, subdist, survivalG, twostage - 1.3.12022-10-02 · diff ↗
Show 42 earlier eventsHide 42 earlier events
- 1.3.02022-09-05 · diff ↗ ·
removed 2 exports
EventCens, recurrentMarginalgamadded 18 exports
BootmediatorSurv, Effbinreg, EventSplit, GLprediid, aalenMets, binregATEbin, binregt, cif.yearslost, kumarsimRCT, mediatorSurv, medweight, normalATE, predictmlogit, recurrentMarginalAIPCWdata, resmean.phreg, resmeanIPCW, scalecumhaz, strataAugment - RR 4.2.0 released · 2022-04-22
- 1.2.92021-09-06 · diff ↗ ·
added 13 exports
EventCens, bicompriskData, binregATE, binregCasewise, indexstratarightR, kumarsim, logitATE, logitIPCW, logitIPCWATE, readmargsurv, recreg, recurrentMarginalAIPCW, survival.twostageCC - RR 4.1.0 released · 2021-05-18
- unarchivedReturned to CRAN2020-09-29
- 1.2.8.1
- archivedRemoved from CRAN2020-09-12check problems were not corrected in time
- 1.2.82020-08-27 · diff ↗ ·
removed 4 exports
make.pairwise.design.competing, readmargsurv, survival.iterative, survival.twostage.fullseadded 22 exports
BinAugmentCifstrata, FG_AugmentCifstrata, FGprediid, bplotdFG, count.historyVar, cumsum2strata, diffstrata, doubleFGR, drop.specials, drop.strata, headstrata, indexstrata, mystrata2index, plotConfRegionSE, plotstrata, predictdFG, revcumsum2strata, revcumsum2stratafdN, setup.cif, simul.cifs, strataC, vecAllStrata - RR 4.0.0 released · 2020-04-24
- 1.2.7.1
- 1.2.72020-02-19 · diff ↗ ·
removed 1 export
simGlmadded 15 exports
FastCoxPLstrataR, Interval, binreg, countID, dInterval, interval.logitsurv.discrete, mystrata, pairRisk, phregR, predictlogitSurvd, prob.exceedBiRecurrentStrata, prob.exceedRecurrentStrata, recurrentMarginalIPCW, simTTP, simlogitSurvd - 1.2.62019-08-05 · diff ↗ ·
removed 1 export
simRecurrentIIIadded 16 exports
Bootphreg, cifreg, dsort2, extendCums, haplo.surv.discrete, mlogit, plotConfRegion, plotSurvd, pred.cif.boot, predictSurvd, rpch, simClaytonOakesLam, simGlm, simMultistate, simRecurrentTS, tailstrata - RR 3.6.0 released · 2019-04-26
- 1.2.52018-11-20 · diff ↗ ·
removed 3 exports
concordance, concordance.twin.ace, concordance.twostageadded 10 exports
addCums, concordanceCor, concordanceTwinACE, concordanceTwostage, logitSurv, mdi, randomDes, readPhreg, simRecurrentIII, twostageMLE - 1.2.42018-08-13 · diff ↗ ·
added 18 exports
dspline<-, dtrans<-, dtransform<-, LinSpline, cif, covIntH1dM1IntH2dM2, cumContr, dmvn, dspline, gofZ.phreg, km, prob.exceedBiRecurrent, prob.exceedRecurrent, recurrentMarginalgam, revcumsum, rmvn, squareintHdM, survival.iterative - 1.2.3.12018-04-30 · diff ↗
- RR 3.5.0 released · 2018-04-23
- 1.2.32018-02-09 · diff ↗ ·
added 36 exports
Bootcovariancerecurrence, BootcovariancerecurrenceS, basecumhaz, basehazplot.phreg, bplot, count.history, covarianceRecurrent, covarianceRecurrentS, covfr, covfridstrata, covfridstrataCov, cumsumidstratasum, cumsumidstratasumCov, cumsumstrata, cumsumstratasum, dreg, gofG.phreg, gofM.phreg, matdoubleindex, prob.exceed.recurrent, procformdata, recmarg, recurrentMarginal, revcumsumidstratasum, revcumsumidstratasumCov, revcumsumstrata, revcumsumstratasum, robust.basehaz.phreg, robust.phreg, showfitsim and 6 more - RR 3.4.0 released · 2017-04-21
- 1.2.2
- 1.2.12017-02-27 · diff ↗ ·
added 13 exports
drelev<-, daggr, dbyr, dlev, dlevel, dmeansd, drelev, dsample, dtab, dtrans, dtransform, procform, procform3 - 1.22017-02-04 · diff ↗ ·
removed 2 exports
easy.twostage, twostageadded 80 exports
dby2<-, dby<-, dcut<-, ddrop<-, dfactor<-, dkeep<-, dlag<-, dnames<-, dnumeric<-, drelevel<-, drename<-, drm<-, dsort<-, CCbinomial.twostage, EVaddGam, ace.family.design, ascertained.pairs, coarse.clust, concordance.twin.ace, concordance.twostage, daggregate, dby, dby2, dcor, dcount, dcut, ddrop, deval, deval2, dfactor and 50 more - RR 3.3.0 released · 2016-05-03
- 1.1.12015-05-29 · diff ↗ ·
removed 1 export
survpoisadded 5 exports
corsim.prostate.random, eventpois, ipw, ipw2, simnordic.random - RR 3.2.0 released · 2015-04-16
- 1.1.0
- 1.02014-11-18 · diff ↗ ·
removed 1 export
ipwadded 15 exports
Event, binomial.twostage.time, biprobit.time, biprobit.vector, bptwin.time, casewise.bin, divide.conquer, divide.conquer.timereg, folds, jumptimes, or2prob, rbind.Event, slope.process, tetrachoric, twin.clustertrunc - 0.2.82014-05-13 · diff ↗ ·
removed 1 export
cumhadded 5 exports
blocksample, grouptable, phreg.par, twinlm.strata, twinlm.time - RR 3.1.0 released · 2014-04-10
- 0.2.7
- 0.2.6
- 0.2.5
- 0.2.4
- 0.2.32013-05-22 · diff ↗
- 0.2.2
- 0.2.12013-04-24 · diff ↗ ·
added 6 exports
binomial.twostage, cluster.index, easy.binomial.twostage, familycluster.index, faster.reshape, piecewise.data - RR 3.0.0 released · 2013-04-03
- 0.1-132013-01-21 · diff ↗ ·
removed 1 export
fastapproxadded 3 exports
fast.approx, fast.pattern, fast.reshape - 0.1-122012-11-20 · diff ↗ ·
removed 1 export
conc2probandwiseadded 10 exports
aalenfrailty, alpha2kendall, alpha2spear, casewise, casewise.test, coefmat, piecewise.twostage, printcasewisetest, surv.boxarea, twostage - 0.1-112012-07-06 · diff ↗ ·
removed 1 export
conc2caseadded 4 exports
Grandom.cif, conc2probandwise, corsim.prostate, plack.cif2 - 0.1-82012-05-14
- RR 2.15.0 released · 2012-03-30
Package metadata
- First published
- 2012-05-14
- Total releases
- 41 / 14 yrs
- License
- Apache License (== 2.0) · relicensed from GPL (>= 2) in 1.3.9
- Minimum R
- ≥ 3.5
- Bundled data
- 904 KB / 21 files
- Download size
- 4.4 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("mets")The package provides a citation file that builds its entry when R runs it. Run citation() to see it.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-24, which the citation names so these numbers can be found later. More on citing and the projects behind them.