Package: mets 1.3.10

Klaus K. Holst

mets: Analysis of Multivariate Event Times

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.

Authors:Klaus K. Holst [aut, cre], Thomas Scheike [aut]

mets_1.3.10.tar.gz
mets_1.3.10.tar.gz(r-4.7-arm64)mets_1.3.10.tar.gz(r-4.7-x86_64)mets_1.3.10.tar.gz(r-4.6-arm64)mets_1.3.10.tar.gz(r-4.6-x86_64)
mets_1.3.10.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
mets/json (API)
NEWS

# Install 'mets' in R:
install.packages('mets', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/kkholst/mets/issues

Pkgdown/docs site:https://kkholst.github.io

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
Datasets:
  • ACTG175 - ACTG175, block randomized study from speff2trial package
  • bmt - The Bone Marrow Transplant Data
  • calgb8923 - CALGB 8923, twostage randomization SMART design
  • CPH_HPN_CRBSI - Rates for HPN program for patients of Copenhagen Cohort
  • dermalridges - Dermal ridges data
  • dermalridgesMZ - Dermal ridges data
  • diabetes - The Diabetic Retinopathy Data
  • haplo - Haplo fun data
  • hfactioncpx12 - Hfaction, subset of block randomized study HF-ACtion from WA package
  • melanoma - The Melanoma Survival Data
  • mena - Menarche data set
  • migr - Migraine data
  • multcif - Multivariate Cumulative Incidence Function example data set
  • np - Np data set
  • prt - Prostate data set
  • sTRACE - The TRACE study group of myocardial infarction
  • TRACE - The TRACE study group of myocardial infarction
  • ttpd - Ttpd discrete survival data on interval form
  • tTRACE - The TRACE study group of myocardial infarction
  • twinbmi - BMI data set
  • twinstut - Stutter data set

On CRAN:

Conda:

openblascpp

9.63 score 1 stars 54 packages 338 scripts 18k downloads 306 exports 19 dependencies

Last updated from:cb01a56144. Checks:6 OK. Indexed: no.

TargetResultTimeFilesSyslog
linux-devel-arm64OK357
linux-devel-x86_64OK387
source / vignettesOK543
linux-release-arm64OK376
linux-release-x86_64OK397
wasm-releaseOK203

Exports:aalenMetsace_family_designalpha2kendallalpha2spearascertained_pairsbicompriskbicompriskDatabinomial_twostagebinomial_twostage_timebinregbinregATEbinregCasewisebinregGbinregRatiobinregtbinregTSRbiprobitbiprobit.timebiprobit.vectorblocksampleBootmediatorSurvbplotbptwinbptwin.timecasewisecasewise_bincifcif_yearslostcifregcifregFGClaytonOakesclustercluster_indexcluster.indexcoarse_clustconcordanceCorconcordanceTwinACEconcordanceTwostageconftypecor_cifcorsim_prostate_randomcount_historycountIDcpredcumoddsregcumsumstratadaggrdaggregateDbvndbydby<-dby2dby2<-dbyrdcordcountdcutdcut<-ddropddrop<-devaldeval2dfactordfactor<-dheaddiffstratadIntervaldivide_conquerdkeepdkeep<-dlagdlag<-dlevdleveldlevelsdlistdmeandmeansddmvndnamesdnames<-dnumericdnumeric<-dprintdquantiledregdrelevdrelev<-dreleveldrelevel<-drenamedrename<-dreshapedrmdrm<-drop.specialsdsampledscalardsddsortdsort<-dsort2dsplinedspline<-dstrdsubsetdsumdsummarydtabdtabledtaildtransdtrans<-dtransformdtransform<-duniqueestimateEventevent_splitevent_split2eventpoisextendCumsfamilycluster_indexfamilyclusterWithProbands_indexfast.approxfast.clusterfast.patternfast.reshapefaster.reshapeFGprediidfoldsforce_same_censforce.same.censglm_IPTWGLprediidgofgofFGgofM_phreggofZ_phregGrandom_cifGrandom.cifgrouptablehaplo_surv_discreteICiidiidBaselineilapindexstrataindexstratarightRIntervalinterval_logitsurv_discreteinvsubdistipwipw2jumptimeskendall_ClaytonOakes_twin_acekendall_normal_twin_acekendall.ClaytonOakes.twin.acekmkmplotkumarsimkumarsimRCTlifecourselifetablelin_approxLinSplinelogitATElogitIPCWlogitIPCWATElogitSurvloglikMVNlogrankRecurrentBasemake_pairwise_designmarksmatdoubleindexmatplot.mets.twostagemdimediatorSurvmedweightmets.optionsmlogitmystratamystrata2indexnonparcumincnormalATEnpcor_cifor2probp11_binomial_twostage_RVpairRiskpbvnpcifphregphreg_IPTWphreg_rctphreg_weibullphreg.parpiecewise_datapiecewise_twostageplack_cifplack.cif2plot_twinplotConfregionplotConfRegionplotConfRegionSEplotcrplotSurvdpmvnpredictCumhazpredictGLMpredictlogitSurvdpredictPairPlackpredictSurvdprob_exceed_recurrentrandom_cifrandom.cifrandomDesratioATErchazrchazlrcriskrecregrecregIPCWrecurrent_marginalrecurrent_marginalAIPCWrecurrentMarginalrecurrentMarginalPhregresmean_phregresmeanATEresmeanIPCWrevcumsumrevcumsumstratarmst_phregrmstATErmstIPCWrmtlRatiormvnrobust_phregrobust.basehaz.phregrr_cifrweibullcoxscalecumhazscoreMVNsim_binClaytonOakes_family_acesim_binClaytonOakes_pairssim_binClaytonOakes_twin_acesim_BinFamsim_BinFam2sim_BinPlacksim_bptwinsim_cifsim_cifssim_ClaytonOakessim_ClaytonOakes_family_acesim_ClaytonOakes_twin_acesim_ClaytonOakesLamsim_ClaytonOakesWeisim_Compete_simplesim_Compete_twin_acesim_Frailty_simplesim_GLcoxsim_multistatesim_multistateIIsim_nordic_randomsim_nordictwinsim_phregsim_phregssim_recurrentsim_recurrent_listsim_recurrent_tssim_recurrentIIsim_recurrentTSsim_SurvFamsimlogitSurvdsimrchazsimul_cifsstratasubdistsummarybase.phregsummaryGLMsummaryTimeobjectsumstrataSurvsurv_boxareasurvival_twostagesurvival.twostagesurvivalGsurvivalGtimetest_casewisetest_conctest_logrankRecurrenttest_marginalMeantetrachorictie_breakertwin_polygen_designtwin.polygen.designtwinlmtwinlm.stratatwinlm.timetwinsimtwostagetwostageMLEtwostageRECvecAllStrataWA_recurrentWA_reg

Dependencies:clicodetoolsdigestfuturefuture.applyglobalslatticelavalistenvMatrixmvtnormnumDerivparallellyprogressrRcppRcppArmadilloSQUAREMsurvivaltimereg

A practical guide to Human Genetics with Lifetime Data

Rendered fromtime-to-event-family-studies-arev.Rmdusingknitr::rmarkdownon May 23 2026.

Last update: 2026-05-23
Started: 2021-09-06

Analysis of bivariate binomial data: Twin analysis

Rendered frombinomial-twin.Rmdusingknitr::rmarkdownon May 23 2026.

Last update: 2026-05-23
Started: 2020-08-27

Analysis of multivariate binomial data: family analysis

Rendered frombinomial-family.Rmdusingknitr::rmarkdownon May 23 2026.

Last update: 2026-05-23
Started: 2020-08-27

Analysis of multivariate survival data

Rendered fromtwostage-survival.Rmdusingknitr::rmarkdownon May 23 2026.

Last update: 2026-05-23
Started: 2020-08-27

G-Computation or standardization for the Cox, Fine-Gray and binomial regression models for survival data

Rendered fromsurvival-ate.Rmdusingknitr::rmarkdownon May 23 2026.

Last update: 2026-05-23
Started: 2023-01-17

Average treatment effect (ATE) for Competing risks and binary outcomes

Rendered frombinreg-ate.Rmdusingknitr::rmarkdownon May 23 2026.

Last update: 2026-05-23
Started: 2021-09-06

Average treatment effect (ATE) for Restricted mean survival and years lost of Competing risks

Rendered fromrmst-ate.Rmdusingknitr::rmarkdownon May 23 2026.

Last update: 2026-05-23
Started: 2023-01-17

Binomial Regression for Survival and Competing Risks Data

Rendered frombinreg.Rmdusingknitr::rmarkdownon May 23 2026.

Last update: 2026-05-23
Started: 2021-09-06

Cooking Survival Data: 5-Minute Recipes

Rendered fromcooking-survival-data.Rmdusingknitr::rmarkdownon May 23 2026.

Last update: 2026-05-23
Started: 2025-01-11

Cumulative Incidence Regression

Rendered fromcifreg.Rmdusingknitr::rmarkdownon May 23 2026.

Last update: 2026-05-23
Started: 2020-08-27

Discrete Interval Censored Survival Models

Rendered frominterval-discrete-survival.Rmdusingknitr::rmarkdownon May 23 2026.

Last update: 2026-05-23
Started: 2021-09-06

dUtility data-frame manipulations

Rendered frombasic-dutils.Rmdusingknitr::rmarkdownon May 23 2026.

Last update: 2026-05-23
Started: 2020-08-27

GEE cluster standard errors and predictions for glm objects

Rendered fromglm-utility.Rmdusingknitr::rmarkdownon May 23 2026.

Last update: 2026-05-23
Started: 2023-12-05

Haplotype Discrete Survival Models

Rendered fromhaplo-discrete-ttp.Rmdusingknitr::rmarkdownon May 23 2026.

Last update: 2026-05-23
Started: 2020-08-27

IPCW Cumulative Cost

Rendered fromcumulative-cost.Rmdusingknitr::rmarkdownon May 23 2026.

Last update: 2026-05-23
Started: 2026-01-11

Marginal modelling of clustered survival data

Rendered frommarginal-cox.Rmdusingknitr::rmarkdownon May 23 2026.

Last update: 2026-05-23
Started: 2020-08-27

Mediation Analysis for survival data

Rendered frommediation-survival.Rmdusingknitr::rmarkdownon May 23 2026.

Last update: 2026-05-23
Started: 2022-09-05

Randomization for Cox Type rate models

Rendered fromphreg_rct.Rmdusingknitr::rmarkdownon May 23 2026.

Last update: 2026-05-23
Started: 2025-01-11

Recurrent events

Rendered fromrecurrent-events.Rmdusingknitr::rmarkdownon May 23 2026.

Last update: 2026-05-23
Started: 2020-08-27

Twin models

Rendered fromquantitative-twin.Rmdusingknitr::rmarkdownon May 23 2026.

Last update: 2026-05-23
Started: 2020-08-27

Two-Stage Randomization for Competing risks and Survival outcomes

Rendered frombinreg-TRS.Rmdusingknitr::rmarkdownon May 23 2026.

Last update: 2026-05-23
Started: 2025-01-11

While Alive estimands for Recurrent Events

Rendered fromwhile-alive.Rmdusingknitr::rmarkdownon May 23 2026.

Last update: 2026-05-23
Started: 2025-01-11

Readme and manuals

Help Manual

Help pageTopics
Fast Additive Hazards Model with Robust Standard ErrorsaalenMets
ACTG175, block randomized study from speff2trial packageACTG175
Estimation of Concordance in Bivariate Competing Risks Databicomprisk bicompriskData
Fits Clayton-Oakes or bivariate Plackett (OR) models for binary data using marginals that are on logistic form. If clusters contain more than two times, the algoritm uses a compososite likelihood based on all pairwise bivariate models.binomial_twostage binomial_twostage_time
Binomial Regression for Censored Competing Risks Databinreg binregt logitIPCW
Average Treatment Effect for Censored Competing Risks Data using Binomial RegressionbinregATE logitATE logitIPCWATE normalATE
Estimate Casewise Concordance Using Binomial RegressionbinregCasewise
G-Estimator for Binomial Regression Model (Standardized Estimates)binregG
Percentage of Years Lost Due to a Cause RegressionbinregRatio rmtlRatio
Two-Stage Randomization for Survival or Competing Risks DatabinregTSR
Bivariate Probit modelbiprobit biprobit.time biprobit.vector
Block samplingblocksample dsample
The Bone Marrow Transplant Databmt
Liability model for twin databptwin bptwin.time twinlm.time
CALGB 8923, twostage randomization SMART designcalgb8923
Estimate Casewise Concordance from prodlim Objectscasewise
Casewise Concordance from Concordant/Discordant Countscasewise_bin
Cumulative Incidence with Robust Standard Errorscif
Restricted Mean Time Lost for Competing Riskscif_yearslost
Cumulative Incidence Function (CIF) Regressioncifreg diffstrata FGprediid gofFG indexstratarightR vecAllStrata
Fine-Gray Cumulative Incidence Function RegressioncifregFG
Clayton-Oakes model with piece-wise constant hazardsClaytonOakes
Finds subjects related to same clustercluster.index cluster_index countID mystrata mystrata2index pairRisk
Coarsen Cluster Identifierscoarse_clust
Concordance Computes concordance and casewise concordanceconcordance.cor concordanceCor
Cross-odds-ratio, OR or RR risk regression for competing riskscor_cif or.cif rr.cif
Compute cumulative event counts as time-dependent covariatescount_history
Rates for HPN program for patients of Copenhagen CohortCPH_HPN_CRBSI
Cumulative Odds Regression for Discrete Time Datacumoddsreg
aggregating for for data framesdaggr daggregate
Derivatives of the bivariate normal cumulative distribution functionDbvn
Calculate summary statistics grouped bydby dby2 dby2<- dby<- dbyr
summary, tables, and correlations for data framesdcor dcount deval deval2 dmean dmeansd dquantile dscalar dsd dstr dsubset dsum dsummary
Cutting, sorting, rm (removing), rename for data framesdcut dcut<- ddrop ddrop<- dkeep dkeep<- dnames dnames<- drename drename<- drm drm<- dunique
Dermal ridges data (families)dermalridges
Dermal ridges data (monozygotic twins)dermalridgesMZ
The Diabetic Retinopathy Datadiabetes
Split a data set and run functiondivide_conquer
Lag operatordlag dlag<-
list, head, print, taildhead dlist dprint dtail
Regression for data frames with dutility calldreg
relev levels for data framesdfactor dfactor<- dlev dlev<- dlevel dlevel<- dlevels dnumeric dnumeric<- drelev drelev<- drelevel drelevel<-
Remove Special Terms from a Formuladrop.specials
Sort data framedsort dsort2 dsort<-
Simple linear splinedspline dspline<-
tables for data framesdtab dtable
Transform that allows conditiondtrans dtrans<- dtransform dtransform<-
Event history objectas.character.Event as.matrix.Event Event format.Event print.Event rbind.Event summary.Event [.Event
event_split (SurvSplit).event_split
Event split with two time-scales, time and gaptimeevent_split2
Extract survival estimates from lifetable analysiseventpois pcif
Extend Cumulative Hazard Functions to Common Time RangeextendCums
Finds all pairs within a cluster (family)familycluster_index
Finds all pairs within a cluster (famly) with the proband (case/control)familyclusterWithProbands_index
Fast approximationcpred fast.approx indexstrata predictCumhaz
Fast Cluster Index Conversionfast.cluster
Fast patternfast.pattern
Fast reshapedreshape fast.reshape
Fast Reshape from Long to Wide Formatfaster.reshape
Generate Random Fold Indices for Cross-Validationfolds
Force Same Censoring Within Clustersforce.same.cens force_same_cens
IPTW GLM, Inverse Probabibilty of Treatment Weighted GLMglm_IPTW
Goodness-of-Fit for Cox PH Regression (Proportionality)gof.phreg
Goodness-of-Fit for Cox Covariates (Model Matrix)gofM_phreg
Goodness-of-Fit for Cox Covariates (Linearity)cumContr gofZ_phreg
Additive Random effects model for competing risks data for polygenetic modellingGrandom_cif
Create Group Contingency Table from Clustered Datagrouptable
haplo fun datahaplo
Discrete Time-to-Event Haplotype Analysishaplo_surv_discrete
hfaction, subset of block randomized study HF-ACtion from WA packagehfactioncpx12
Influence Functions for phreg objectsIC.phreg
Influence Functions or IID Decomposition of BaselineiidBaseline
Inverse Laplace Transform Helperilap
Discrete Time-to-Event Analysis with Interval CensoringdInterval Interval interval_logitsurv_discrete plotSurvd predictlogitSurvd predictSurvd
Inverse Probability of Censoring Weightsipw
Inverse Probability of Censoring Weightsipw2
Extract Event (Jump) Timesjumptimes
Kaplan-Meier with Robust Standard Errorskm
Life-course plotlifecourse
Life tablelifetable lifetable.formula lifetable.matrix
Simple linear splineLinSpline
Proportional Odds Survival ModellogitSurv
Mediation analysis in survival contextBootmediatorSurv mediatorSurv
Computes mediation weightsmedweight
The Melanoma Survival Datamelanoma
Menarche data setmena
Set global options for 'mets'mets.options
Migraine datamigr
Multinomial Regression Based on phregmlogit predict
Multivariate Cumulative Incidence Function example data setmultcif
np data setnp
Concordance Probability from Twostage Modelace_family_design ascertained_pairs concordanceTwinACE concordanceTwostage kendall.ClaytonOakes.twin.ace kendall_ClaytonOakes_twin_ace kendall_normal_twin_ace make_pairwise_design p11.binomial.twostage.RV p11_binomial_twostage_RV twin-design twin.polygen.design twin_polygen_design
Fast Cox Proportional Hazards Regressionphreg robust_phreg
IPTW Cox Regression (Inverse Probability of Treatment Weighted)phreg_IPTW
Lu-Tsiatis More Efficient Log-Rank for Randomized Studies with Baseline Covariatesphreg_rct
Weibull-Cox regressionphreg.par phreg_weibull
plack Computes concordance for or.cif based model, that is Plackett random effects modelplack.cif2 plack_cif
Scatter plot functionplot_twin
Plotting the baselines of stratified Coxbasecumhaz baseplot bplot kmplot plot.phreg plotConfRegion plotConfregion plotConfRegionSE plotstrata
Multivariate normal distribution functiondmvn loglikMVN pbvn pmvn rmvn scoreMVN
Predictions from Multinomial Regressionpredict.mlogit
Predictions from Proportional Hazards Modelpredict.phreg
prints Concordance testprint.casewise
Estimate the probability of exceeding k recurrent events by time tprob_exceed_recurrent
Prostate data setprt
Random effects model for competing risks datarandom_cif
Ratio of Average Treatment EffectsratioATE
Simulation of Piecewise Constant Hazard Model (Cox)lin_approx rchaz sim_rchaz
Multiple Cause Piecewise Constant Hazard Simulationrchazl
Simulation of Piecewise constant hazard models with two causes (Cox).rcrisk
Recurrent Events Regression with Terminal EventGLprediid IIDrecreg marks recreg scalecumhaz
IPCW Estimator for Recurrent EventsrecregIPCW
Marginal mean estimation for recurrent events with a terminal eventiidRecurrent recurrentMarginal recurrentMarginalPhreg recurrent_marginal recurrent_marginalAIPCW
Restricted Mean for Stratified Kaplan-Meier or Cox Modelresmean_phreg rmst_phreg
Average Treatment Effect for Restricted Mean TimeresmeanATE rmstATE
Restricted IPCW Mean for Censored Survival DataresmeanIPCW rmstIPCW
Robust Baseline Hazard Standard Errorsconftype robust.basehaz.phreg summarybase.phreg
Non-parametric Cumulative Incidence Functionscif-nonpar Grandom.cif nonparcuminc npc or_cif plotcr predictPairPlack random.cif rr_cif
Simulate observations from a Weibull distributionrweibullcox
Simulation of Output from Cumulative Incidence Regression Modelinvsubdist sim_cif sim_cifs sim_subdist subdist
Simulate from the Clayton-Oakes frailty modelsim_ClaytonOakes sim_ClaytonOakesLam
Simulate from the Clayton-Oakes frailty modelsim_ClaytonOakesWei
Simulation of Two-Stage Recurrent Events Datasim_GLcox
Simulation of Illness-Death Modelsim_multistate
Illness-Death Competing Risks with Two Causes of Deathsim_multistateII
Simulation of Output from Cox Modelsim_phreg
Simulation of Cause-Specific Cox Modelssim_phregs
Simulate recurrent events with a single event type and a terminal eventsim_recurrent
Simulate recurrent events from a two-stage Cox or Ghosh-Lin modelsim_recurrent_ts
Simulate recurrent events with two event types and a terminal eventsim_recurrentII sim_recurrent_list
Simulate recurrent events from a two-stage model with structured gamma frailtiessim_recurrentTS
Stratified Cumulative and Summary Operationscumsumstrata matdoubleindex mdi revcumsum revcumsumstrata strata-numeric sumstrata
Summary for dependence models for competing riskssummary.cor
Reporting OR (exp(coef)) from glm with binomial link and glm predictionspredictGLM summaryGLM
Summarize a Time-Varying Estimate with Confidence BandssummaryTimeobject
Bivariate Survival Data on Rectangular Regionssurv_boxarea
Twostage Survival Model for Multivariate Survival DatarandomDes readmargsurv survival_twostage twostage_aalen twostage_cox.aalen twostage_coxph twostage_phreg
Survival Twostage Helpersalpha2kendall alpha2spear matplot.mets.twostage piecewise_data piecewise_twostage survival-helpers survival.twostage
G-Estimator for Cox and Fine-Gray ModelssurvivalG survivalGtime
Test for Independence Using Casewise Concordancetest_casewise
Compare Two Concordance Estimatestest_conc
Logrank-type test for comparing recurrent event marginal means between groupslogrankRecurrentBase test_logrankRecurrent
Pepe-Mori Test for Marginal Mean Comparisontest_marginalMean
Estimate parameters from odds-ratioor2prob tetrachoric
Break ties in event times for recurrent event datatie_breaker
The TRACE study group of myocardial infarctionsTRACE TRACE tTRACE
ttpd discrete survival data on interval formttpd
BMI data settwinbmi
Classic twin model for quantitative traitstwinlm twinlm.strata
Simulate twin datatwinsim
Stutter data settwinstut
Twostage Survival Model Fitted by Pseudo MLEtwostageMLE
Fitting of Two-Stage Recurrent Events Random Effects ModeltwostageREC
While-Alive Estimands for Recurrent EventsWA_recurrent
While-Alive Regression for Recurrent EventsWA_reg