Package: mets 1.3.4

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.4.tar.gz
mets_1.3.4.tar.gz(r-4.5-noble)mets_1.3.4.tar.gz(r-4.4-noble)
mets_1.3.4.tgz(r-4.4-emscripten)mets_1.3.4.tgz(r-4.3-emscripten)
mets.pdf |mets.html
mets/json (API)
NEWS

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

Peer review:

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

Pkgdown:https://kkholst.github.io

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
Datasets:
  • TRACE - The TRACE study group of myocardial infarction
  • base1cumhaz - Rate of CRBSI for HPN patients of Copenhagen
  • base44cumhaz - Rate of Occlusion/Thrombosis complication for catheter of HPN patients of Copenhagen
  • base4cumhaz - Rate of Mechanical (hole/defect) complication for catheter of HPN patients of Copenhagen
  • bmt - The Bone Marrow Transplant Data
  • dermalridges - Dermal ridges data
  • dermalridgesMZ - Dermal ridges data
  • diabetes - The Diabetic Retinopathy Data
  • drcumhaz - Rate for leaving HPN program for patients of Copenhagen
  • ghaplos - Ghaplos haplo-types for subjects of haploX data
  • hapfreqs - Hapfreqs data set
  • haploX - HaploX covariates and response for haplo survival discrete survival
  • 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
  • tTRACE - The TRACE study group of myocardial infarction
  • ttpd - Ttpd discrete survival data on interval form
  • twinbmi - BMI data set
  • twinstut - Stutter data set

9.55 score 1 stars 36 packages 326 scripts 9.3k downloads 6 mentions 345 exports 19 dependencies

Last updated 10 months agofrom:3c6ae6420f. Checks:OK: 2. Indexed: no.

TargetResultDate
Doc / VignettesOKNov 13 2024
R-4.5-linux-x86_64OKNov 13 2024

Exports:aalenfrailtyaalenMetsace.family.designaddCumsalpha2kendallalpha2spearascertained.pairsback2timeregbasecumhazbasehazplot.phregbicompriskbicompriskDataBinAugmentCifstratabinomial.twostagebinomial.twostage.timebinregbinregATEbinregATEbinbinregCasewisebinregGbinregtbinregTSRbiprobitbiprobit.timebiprobit.vectorblocksampleBootcovariancerecurrenceBootcovariancerecurrenceSBootmediatorSurvBootphregbplotbplotdFGbptwinbptwin.timecasewisecasewise.bincasewise.testcause.pchazard.simCCbinomial.twostagecifcif.yearslostcifregClaytonOakescluster.indexcoarse.clustcoefmatconcordanceCorconcordanceTwinACEconcordanceTwostagecor.cifcorsim.prostatecorsim.prostate.randomcount.historycount.historyVarcountIDcovarianceRecurrentcovarianceRecurrentScovfrcovfridstratacovfridstrataCovcovIntH1dM1IntH2dM2cpredcumContrcumODDScumsum2stratacumsumidstratasumcumsumidstratasumCovcumsumstratacumsumstratasumdaggrdaggregateDbvndbydby<-dby2dby2<-dbyrdcordcountdcutdcut<-ddropddrop<-devaldeval2dfactordfactor<-dheaddiffstratadIntervaldivide.conquerdivide.conquer.timeregdkeepdkeep<-dlagdlag<-dlevdleveldlevelsdlistdmeandmeansddmvndnamesdnames<-dnumericdnumeric<-doubleFGRdprintdquantiledregdrelevdrelev<-dreleveldrelevel<-drenamedrename<-dreshapedrmdrm<-drop.specialsdrop.stratadsampledscalardsddsortdsort<-dsort2dsplinedspline<-dstrdsubsetdsumdsummarydtabdtabledtaildtransdtrans<-dtransformdtransform<-duniqueeasy.binomial.twostageEffbinregestimateEVaddGameventpoisEventSplitextendCumsfamilycluster.indexfamilyclusterWithProbands.indexfast.approxfast.clusterfast.patternfast.reshapeFastCoxPLstrataRfaster.reshapeFG_AugmentCifstrataFGprediidfoldsforce.same.censglm_IPTWGLprediidgofgofG.phreggofM.phreggofZ.phregGrandom.cifgrouptablehaplo.surv.discreteheadstrataICIIDbaseline.cifregIIDbaseline.phregilapindexstrataindexstratarightRIntervalinterval.logitsurv.discreteinvsubdistipwipw2jumptimeskendall.ClaytonOakes.twin.acekendall.normal.twin.acekmkumarsimkumarsimRCTlifecourselifetablelin.approxLinSplinelogitATElogitIPCWlogitIPCWATElogitSurvloglikMVNmake.pairwise.designmatdoubleindexmatplot.mets.twostagemdimediatorSurvmedweightmets.optionsmlogitmystratamystrata2indexnonparcumincnormalATEnpcobject.definedor.cifor2probp11.binomial.twostage.RVpairRiskpbvnpcifphregphreg_IPTWphreg_rctphreg.parphregRpiecewise.datapiecewise.twostageplack.cifplack.cif2plotConfRegionplotConfRegionSEplotcrplotstrataplotSurvdpmvnpre.cifspred.cif.bootpredictCumhazpredictdFGpredictGLMpredictlogitSurvdpredictmlogitpredictPairPlackpredictSurvdprob.exceed.recurrentprob.exceedBiRecurrentprob.exceedBiRecurrentStrataprob.exceedRecurrentprob.exceedRecurrentStrataprocformprocform3procformdatarandom.cifrandomDesrchazrchazCrcriskrcrisksreadmargsurvreadPhregrecmargrecregrecregIPCWrecurrentMarginalrecurrentMarginalAIPCWrecurrentMarginalAIPCWdatarecurrentMarginalIPCWresmean.phregresmeanATEresmeanIPCWrevcumsumrevcumsum2stratarevcumsum2stratafdNrevcumsumidstratasumrevcumsumidstratasumCovrevcumsumstratarevcumsumstratasumrmst.phregrmstATErmstIPCWrmvnrobust.basehaz.phregrobust.phregrpchrr.cifscalecumhazscoreMVNsetup.cifshowfitsimsim.basesim.cause.coxsim.cifsim.cifssim.cifsRestrictsim.coxsimAalenFrailtysimbinClaytonOakes.family.acesimbinClaytonOakes.pairssimbinClaytonOakes.twin.acesimBinFamsimBinFam2simBinPlacksimClaytonOakessimClaytonOakes.family.acesimClaytonOakes.twin.acesimClaytonOakesLamsimClaytonOakesWeisimCompete.simplesimCompete.twin.acesimCoxsimFrailty.simplesimlogitSurvdsimMultistatesimnordicsimnordic.randomsimrchazsimRecurrentsimRecurrentIIsimRecurrentTSsimsubdistsimSurvFamsimTTPsimul.cifsslope.processsquareintHdMstrataAugmentstrataCsubdistsummaryGLMsummaryTimeobjectsumstratasurv.boxareasurvival.twostagesurvivalGtailstratatest.conctetrachorictie.breakertwin.clustertrunctwin.polygen.designtwinlmtwinlm.stratatwinlm.timetwinsimtwostagetwostageMLEtwostageRECvecAllStrata

Dependencies:clicodetoolsdigestfuturefuture.applyglobalslatticelavalistenvMatrixmvtnormnumDerivparallellyprogressrRcppRcppArmadilloSQUAREMsurvivaltimereg

A practical guide to Human Genetics with Lifetime Data

Rendered fromtime-to-event-family-studies-arev.Rmdusingknitr::rmarkdownon Nov 13 2024.

Last update: 2023-01-17
Started: 2021-09-06

Analysis of bivariate binomial data: Twin analysis

Rendered frombinomial-twin.Rmdusingknitr::rmarkdownon Nov 13 2024.

Last update: 2023-12-05
Started: 2020-08-27

Analysis of multivariate binomial data: family analysis

Rendered frombinomial-family.Rmdusingknitr::rmarkdownon Nov 13 2024.

Last update: 2023-12-05
Started: 2020-08-27

Analysis of multivariate survival data

Rendered fromtwostage-survival.Rmdusingknitr::rmarkdownon Nov 13 2024.

Last update: 2023-12-05
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 Nov 13 2024.

Last update: 2023-12-05
Started: 2023-01-17

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

Rendered frombinreg-ate.Rmdusingknitr::rmarkdownon Nov 13 2024.

Last update: 2023-12-05
Started: 2021-09-06

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

Rendered fromrmst-ate.Rmdusingknitr::rmarkdownon Nov 13 2024.

Last update: 2023-12-05
Started: 2023-01-17

Binomial Regression for Survival and Competing Risks Data

Rendered frombinreg.Rmdusingknitr::rmarkdownon Nov 13 2024.

Last update: 2023-12-05
Started: 2021-09-06

Cumulative Incidence Regression

Rendered fromcifreg.Rmdusingknitr::rmarkdownon Nov 13 2024.

Last update: 2023-01-17
Started: 2020-08-27

Discrete Interval Censored Survival Models

Rendered frominterval-discrete-survival.Rmdusingknitr::rmarkdownon Nov 13 2024.

Last update: 2023-12-05
Started: 2021-09-06

dUtility data-frame manipulations

Rendered frombasic-dutils.Rmdusingknitr::rmarkdownon Nov 13 2024.

Last update: 2021-09-06
Started: 2020-08-27

GEE cluster standard errors and predictions for glm objects

Rendered fromglm-utility.Rmdusingknitr::rmarkdownon Nov 13 2024.

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

Haplotype Discrete Survival Models

Rendered fromhaplo-discrete-ttp.Rmdusingknitr::rmarkdownon Nov 13 2024.

Last update: 2022-09-05
Started: 2020-08-27

Marginal modelling of clustered survival data

Rendered frommarginal-cox.Rmdusingknitr::rmarkdownon Nov 13 2024.

Last update: 2023-01-17
Started: 2020-08-27

Mediation Analysis for survival data

Rendered frommediation-survival.Rmdusingknitr::rmarkdownon Nov 13 2024.

Last update: 2023-12-05
Started: 2022-09-05

Recurrent events

Rendered fromrecurrent-events.Rmdusingknitr::rmarkdownon Nov 13 2024.

Last update: 2024-02-17
Started: 2020-08-27

Twin models

Rendered fromquantitative-twin.Rmdusingknitr::rmarkdownon Nov 13 2024.

Last update: 2023-01-17
Started: 2020-08-27

Two-Stage Randomization for for Competing risks and Survival outcomes

Rendered frombinreg-TRS.rmdusingknitr::rmarkdownon Nov 13 2024.

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

Readme and manuals

Help Manual

Help pageTopics
Analysis of Multivariate Eventsmets-package
Aalen frailty modelaalenfrailty
Fast additive hazards model with robust standard errorsaalenMets
Convert to timereg objectback2timereg
rate of CRBSI for HPN patients of Copenhagenbase1cumhaz
rate of Occlusion/Thrombosis complication for catheter of HPN patients of Copenhagenbase44cumhaz
rate of Mechanical (hole/defect) complication for catheter of HPN patients of Copenhagenbase4cumhaz
Plotting the baslines of stratified Coxbasecumhaz basehazplot.phreg bplot plotConfRegion plotConfRegionSE plotstrata
Estimation of concordance in bivariate competing risks databicomprisk bicompriskData
Augmentation for Binomial regression based on stratified NPMLE Cif (Aalen-Johansen)BinAugmentCifstrata
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 binregATEbin kumarsim kumarsimRCT logitATE logitIPCWATE normalATE
Estimates the casewise concordance based on Concordance and marginal estimate using binregbinregCasewise
G-estimator for binomial regression model (Standardized estimates)binregG
2 Stage Randomization for Survival Data or competing Risks DatabinregTSR
Bivariate Probit modelbiprobit biprobit.time biprobit.vector
Block samplingblocksample dsample
The Bone Marrow Transplant Databmt
Wild bootstrap for Cox PH regressionBootphreg pred.cif.boot
Liability model for twin databptwin bptwin.time twinlm.time
Estimates the casewise concordance based on Concordance and marginal estimate using prodlim but no testingcasewise
Estimates the casewise concordance based on Concordance and marginal estimate using timereg and performs test for independencecasewise.bin casewise.test slope.process
Cumulative incidence with robust standard errorscif
CIF regressioncifreg diffstrata FGprediid IIDbaseline.cifreg indexstratarightR vecAllStrata
Clayton-Oakes model with piece-wise constant hazardsClaytonOakes
Finds subjects related to same clustercluster.index countID mystrata mystrata2index pairRisk
Concordance Computes concordance and casewise concordanceconcordance.cor concordanceCor
Cross-odds-ratio, OR or RR risk regression for competing riskscor.cif or.cif rr.cif
Counts the number of previous events of two types for recurrent events processescount.history count.historyVar
Estimation of covariance for bivariate recurrent events with terminal eventBootcovariancerecurrence BootcovariancerecurrenceS covarianceRecurrent covarianceRecurrentS plot.covariace.recurrent
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
Split a data set and run function from timereg and aggregatedivide.conquer.timereg
Lag operatordlag dlag<-
Double CIF Fine-Gray model with two causesbplotdFG doubleFGR predictdFG
list, head, print, taildhead dlist dprint dtail
Rate for leaving HPN program for patients of Copenhagendrcumhaz
Regression for data frames with dutility calldreg
relev levels for data framesdfactor dfactor<- dlev dlev<- dlevel dlevel<- dlevels dnumeric dnumeric<- drelev drelev<- drelevel drelevel<-
Sort data framedsort dsort2 dsort<-
Simple linear splinedspline dspline<-
tables for data framesdtab dtable
Transform that allows conditiondtrans dtrans<- dtransform dtransform<-
Fits two-stage binomial for describing depdendence in binomial data using marginals that are on logistic form using the binomial.twostage funcion, but call is different and easier and the data manipulation is build into the function. Useful in particular for family design data.easy.binomial.twostage
Efficient IPCW for binary dataEffbinreg
Relative risk for additive gamma modelEVaddGam
Extract survival estimates from lifetable analysiseventpois pcif
Event split with two time-scales, time and gaptimeEventSplit
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 patternfast.pattern
Fast reshapedreshape fast.reshape
Augmentation for Fine-Gray model based on stratified NPMLE Cif (Aalen-Johansen)drop.strata FG_AugmentCifstrata setup.cif simul.cifs strataC
ghaplos haplo-types for subjects of haploX dataghaplos
IPTW GLM, Inverse Probaibilty of Treatment Weighted GLMglm_IPTW
GOF for Cox PH regressiongof.phreg
Stratified baseline graphical GOF test for Cox covariates in PH regressiongofG.phreg
GOF for Cox covariates in PH regressiongofM.phreg
GOF for Cox covariates in PH regressioncumContr gofZ.phreg
Additive Random effects model for competing risks data for polygenetic modellingGrandom.cif
hapfreqs data sethapfreqs
Discrete time to event haplo type analysishaplo.surv.discrete plotSurvd predictSurvd simTTP
haploX covariates and response for haplo survival discrete survivalhaploX
Discrete time to event interval censored datacumODDS dInterval Interval interval.logitsurv.discrete predictlogitSurvd simlogitSurvd
Inverse Probability of Censoring Weightsipw
Inverse Probability of Censoring Weightsipw2
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 phreg regressionmlogit predictmlogit
Multivariate Cumulative Incidence Function example data setmultcif
np data setnp
For internal useace.family.design alpha2kendall alpha2spear ascertained.pairs CCbinomial.twostage coarse.clust coefmat concordanceTwinACE concordanceTwostage corsim.prostate corsim.prostate.random drop.specials fast.cluster faster.reshape folds force.same.cens grouptable ilap jumptimes kendall.ClaytonOakes.twin.ace kendall.normal.twin.ace make.pairwise.design make.pairwise.design.competing matplot.mets.twostage nonparcuminc npc object.defined p11.binomial.twostage.RV piecewise.data piecewise.twostage plotcr predictPairPlack procform procform3 procformdata sim simbinClaytonOakes.family.ace simbinClaytonOakes.pairs simbinClaytonOakes.twin.ace simBinFam simBinFam2 simBinPlack simClaytonOakes.family.ace simClaytonOakes.twin.ace simCompete.simple simCompete.twin.ace simCox simFrailty.simple simnordic simnordic.random simSurvFam surv.boxarea twin.polygen.design
Fast Cox PH regressionIIDbaseline.phreg phreg phreg.par readPhreg robust.phreg
IPTW Cox, Inverse Probaibilty of Treatment Weighted Cox regressionphreg_IPTW
Lu-Tsiatis More Efficient Log-Rank for Randomized studies with baseline covariatesphreg_rct
Fast Cox PH regression and calculations done in R to make play and adjustments easyFastCoxPLstrataR phregR
plack Computes concordance for or.cif based model, that is Plackett random effects modelplack.cif plack.cif2
Multivariate normal distribution functiondmvn loglikMVN pbvn pmvn rmvn scoreMVN
Predictions from proportional hazards modelcovfr covfridstrata covfridstrataCov cumsum2strata cumsumidstratasum cumsumidstratasumCov cumsumstrata cumsumstratasum headstrata matdoubleindex mdi predict.phreg revcumsum revcumsum2strata revcumsum2stratafdN revcumsumidstratasum revcumsumidstratasumCov revcumsumstrata revcumsumstratasum robust.basehaz.phreg sumstrata tailstrata
prints Concordance testprint.casewise
Estimation of probability of more that k events for recurrent events processprob.exceed.recurrent prob.exceedBiRecurrent prob.exceedBiRecurrentStrata prob.exceedRecurrent prob.exceedRecurrentStrata summaryTimeobject
Prostate data setprt
Random effects model for competing risks datarandom.cif
Simulation of Piecewise constant hazard model (Cox).addCums lin.approx rchaz simrchaz
Piecewise constant hazard distributionrchazC
Simulation of Piecewise constant hazard models with two causes (Cox).cause.pchazard.sim rcrisk rcrisks
Recurrent events regression with terminal eventGLprediid recreg recregIPCW scalecumhaz strataAugment twostageREC
Fast recurrent marginal mean when death is possiblerecmarg recurrentMarginal recurrentMarginalAIPCW recurrentMarginalAIPCWdata recurrentMarginalIPCW tie.breaker
Restricted mean for stratified Kaplan-Meier or Cox model with martingale standard errorscif.yearslost resmean.phreg rmst.phreg
Average Treatment effect for Restricted Mean for censored competing risks data using IPCWresmeanATE rmstATE
Restricted IPCW mean for censored survival dataresmeanIPCW rmstIPCW
Piecewise constant hazard distributionppch rpch
Simulation of cause specific from Cox models.sim.cause.cox
Simulation of output from Cumulative incidence regression modelinvsubdist pre.cifs sim.cif sim.cifs sim.cifsRestrict simsubdist subdist
Simulation of output from Cox model.read.fit sim.base sim.cox simulate.cox
Simulate from the Aalen Frailty modelsimAalenFrailty
Simulate from the Clayton-Oakes frailty modelsimClaytonOakes simClaytonOakesLam
Simulate from the Clayton-Oakes frailty modelsimClaytonOakesWei
Simulation of illness-death modelextendCums simMultistate
Simulation of recurrent events data based on cumulative hazards IIcovIntH1dM1IntH2dM2 showfitsim simRecurrent simRecurrentII squareintHdM
Simulation of recurrent events data based on cumulative hazards: Two-stage modelsimRecurrentTS
Summary for dependence models for competing riskssummary.cor
Reporting OR (exp(coef)) from glm with binomial link and glm predictionspredictGLM summaryGLM
Twostage survival model for multivariate survival datarandomDes readmargsurv survival.twostage twostage.aalen twostage.cox.aalen twostage.coxph twostage.phreg
G-estimator for Cox and Fine-Gray modelsurvivalG
Concordance test Compares two concordance estimatestest.conc
Estimate parameters from odds-ratioor2prob tetrachoric
The TRACE study group of myocardial infarctionsTRACE TRACE tTRACE
ttpd discrete survival data on interval formttpd
Estimation of twostage model with cluster truncation in bivariate situationtwin.clustertrunc
BMI data settwinbmi
Classic twin model for quantitative traitstwinlm twinlm.strata
Simulate twin datatwinsim
Stutter data settwinstut
Twostage survival model fitted by pseudo MLEtwostageMLE