# Analysis of Multivariate Event Times

## Documentation for package ‘mets’ version 1.3.12

- DESCRIPTION file.
- User guides, package vignettes and other documentation.
- Code demos. Use demo() to run them.
- Package NEWS.

## Help Pages

A B C D E F G H I J K L M N O P R S T V W misc

## -- A --

aalenMets | Fast Additive Hazards Model with Robust Standard Errors
ace_family_design | Concordance Probability from Twostage Model
ACTG175 | ACTG175, block randomized study from speff2trial package
alpha2kendall | Survival Twostage Helpers
alpha2spear | Survival Twostage Helpers
as.character.Event | Event history object
as.matrix.Event | Event history object
ascertained_pairs | Concordance Probability from Twostage Model

## -- B --

basecumhaz | Plotting the baselines of stratified Cox
baseplot | Plotting the baselines of stratified Cox
bicomprisk | Estimation of Concordance in Bivariate Competing Risks Data
bicompriskData | Estimation of Concordance in Bivariate Competing Risks Data
binomial_twostage | 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_time | 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.
binreg | Binomial Regression for Censored Competing Risks Data
binregATE | Average Treatment Effect for Censored Competing Risks Data using Binomial Regression
binregCasewise | Estimate Casewise Concordance Using Binomial Regression
binregG | G-Estimator for Binomial Regression Model (Standardized Estimates)
binregRatio | Percentage of Years Lost Due to a Cause Regression
binregStrata | Stratified Binomial Regression with cross-validation option
binregt | Binomial Regression for Censored Competing Risks Data
binregTSR | Two-Stage Randomization for Survival or Competing Risks Data
binreg_IPTW | IPTW logistic regression, Inverse Probabibilty of Treatment Weighted binreg
biprobit | Bivariate Probit model
biprobit.time | Bivariate Probit model
biprobit.vector | Bivariate Probit model
blocksample | Block sampling
bmt | The Bone Marrow Transplant Data
BootmediatorSurv | Mediation analysis in survival context
bplot | Plotting the baselines of stratified Cox
bptwin | Liability model for twin data
bptwin.time | Liability model for twin data
brier_binreg | Cross-validated Brier score for competing risks, RMST and RMTL regression using stratified leave-fold-out fits ('binregStrata')

## -- C --

calgb8923 | CALGB 8923, twostage randomization SMART design
casewise | Estimate Casewise Concordance from prodlim Objects
casewise_bin | Casewise Concordance from Concordant/Discordant Counts
cif | Cumulative Incidence with Robust Standard Errors
cif-nonpar | Non-parametric Cumulative Incidence Functions
cifreg | Cumulative Incidence Function (CIF) Regression
cifregFG | Fine-Gray Cumulative Incidence Function Regression
cif_yearslost | Restricted Mean Time Lost for Competing Risks
ClaytonOakes | Clayton-Oakes model with piece-wise constant hazards
cluster.index | Finds subjects related to same cluster
cluster_index | Finds subjects related to same cluster
coarse_clust | Coarsen Cluster Identifiers
concordance.cor | Concordance Computes concordance and casewise concordance
concordanceCor | Concordance Computes concordance and casewise concordance
concordanceTwinACE | Concordance Probability from Twostage Model
concordanceTwostage | Concordance Probability from Twostage Model
conftype | Robust Baseline Hazard Standard Errors
cor_cif | Cross-odds-ratio, OR or RR risk regression for competing risks
countID | Finds subjects related to same cluster
count_history | Compute cumulative event counts as time-dependent covariates
CPH_HPN_CRBSI | Rates for HPN program for patients of Copenhagen Cohort
cpred | Fast approximation
cumContr | Goodness-of-Fit for Cox Covariates (Linearity)
cumoddsreg | Cumulative Odds Regression for Discrete Time Data
cumsumstrata | Stratified Cumulative and Summary Operations

## -- D --

daggr | aggregating for for data frames
daggregate | aggregating for for data frames
Dbvn | Derivatives of the bivariate normal cumulative distribution function
dby | Calculate summary statistics grouped by
dby2 | Calculate summary statistics grouped by
dby2<- | Calculate summary statistics grouped by
dby<- | Calculate summary statistics grouped by
dbyr | Calculate summary statistics grouped by
dcor | summary, tables, and correlations for data frames
dcount | summary, tables, and correlations for data frames
dcut | Cutting, sorting, rm (removing), rename for data frames
dcut<- | Cutting, sorting, rm (removing), rename for data frames
ddrop | Cutting, sorting, rm (removing), rename for data frames
ddrop<- | Cutting, sorting, rm (removing), rename for data frames
dermalridges | Dermal ridges data (families)
dermalridgesMZ | Dermal ridges data (monozygotic twins)
deval | summary, tables, and correlations for data frames
deval2 | summary, tables, and correlations for data frames
dfactor | relev levels for data frames
dfactor<- | relev levels for data frames
dhead | list, head, print, tail
diabetes | The Diabetic Retinopathy Data
diffstrata | Cumulative Incidence Function (CIF) Regression
dInterval | Discrete Time-to-Event Analysis with Interval Censoring
divide_conquer | Split a data set and run function
dkeep | Cutting, sorting, rm (removing), rename for data frames
dkeep<- | Cutting, sorting, rm (removing), rename for data frames
dlag | Lag operator
dlag<- | Lag operator
dlev | relev levels for data frames
dlev<- | relev levels for data frames
dlevel | relev levels for data frames
dlevel<- | relev levels for data frames
dlevels | relev levels for data frames
dlist | list, head, print, tail
dmean | summary, tables, and correlations for data frames
dmeansd | summary, tables, and correlations for data frames
dmvn | Multivariate normal distribution function
dnames | Cutting, sorting, rm (removing), rename for data frames
dnames<- | Cutting, sorting, rm (removing), rename for data frames
dnumeric | relev levels for data frames
dnumeric<- | relev levels for data frames
dprint | list, head, print, tail
dquantile | summary, tables, and correlations for data frames
dreg | Regression for data frames with dutility call
drelev | relev levels for data frames
drelev<- | relev levels for data frames
drelevel | relev levels for data frames
drelevel<- | relev levels for data frames
drename | Cutting, sorting, rm (removing), rename for data frames
drename<- | Cutting, sorting, rm (removing), rename for data frames
dreshape | Fast reshape
drm | Cutting, sorting, rm (removing), rename for data frames
drm<- | Cutting, sorting, rm (removing), rename for data frames
drop.specials | Remove Special Terms from a Formula
dsample | Block sampling
dscalar | summary, tables, and correlations for data frames
dsd | summary, tables, and correlations for data frames
dsort | Sort data frame
dsort2 | Sort data frame
dsort<- | Sort data frame
dspline | Simple linear spline
dspline<- | Simple linear spline
dstr | summary, tables, and correlations for data frames
dsubset | summary, tables, and correlations for data frames
dsum | summary, tables, and correlations for data frames
dsummary | summary, tables, and correlations for data frames
dtab | tables for data frames
dtable | tables for data frames
dtail | list, head, print, tail
dtrans | Transform that allows condition
dtrans<- | Transform that allows condition
dtransform | Transform that allows condition
dtransform<- | Transform that allows condition
dunique | Cutting, sorting, rm (removing), rename for data frames

## -- E --

estimate.binregCV | Joint estimate across CV models for a binregCV object
Event | Event history object
eventpois | Extract survival estimates from lifetable analysis
event_split | event_split (SurvSplit).
event_split2 | Event split with two time-scales, time and gaptime
extendCums | Extend Cumulative Hazard Functions to Common Time Range

## -- F --

familyclusterWithProbands_index | Finds all pairs within a cluster (famly) with the proband (case/control)
familycluster_index | Finds all pairs within a cluster (family)
fast.approx | Fast approximation
fast.cluster | Fast Cluster Index Conversion
fast.pattern | Fast pattern
fast.reshape | Fast reshape
faster.reshape | Fast Reshape from Long to Wide Format
FGprediid | Cumulative Incidence Function (CIF) Regression
folds | Generate Random Fold Indices for Cross-Validation
force.same.cens | Force Same Censoring Within Clusters
force_same_cens | Force Same Censoring Within Clusters
format.Event | Event history object

## -- G --

GLprediid | Recurrent Events Regression with Terminal Event
gof.phreg | Goodness-of-Fit for Cox PH Regression (Proportionality)
gofFG | Cumulative Incidence Function (CIF) Regression
gofM_phreg | Goodness-of-Fit for Cox Covariates (Model Matrix)
gofZ_phreg | Goodness-of-Fit for Cox Covariates (Linearity)
Grandom.cif | Non-parametric Cumulative Incidence Functions
Grandom_cif | Additive Random effects model for competing risks data for polygenetic modelling
grouptable | Create Group Contingency Table from Clustered Data

## -- H --

haplo | haplo fun data
haplo_surv_discrete | Discrete Time-to-Event Haplotype Analysis
hfactioncpx12 | hfaction, subset of block randomized study HF-ACtion from WA package

## -- I --

IC.binreg | Influence curve components for binomial regression ATE
IC.phreg | Influence Functions for phreg objects
iidBaseline | Influence Functions or IID Decomposition of Baseline
IIDrecreg | Recurrent Events Regression with Terminal Event
iidRecurrent | Marginal mean estimation for recurrent events with a terminal event
ilap | Inverse Laplace Transform Helper
indexstrata | Fast approximation
indexstratarightR | Cumulative Incidence Function (CIF) Regression
Interval | Discrete Time-to-Event Analysis with Interval Censoring
interval_logitsurv_discrete | Discrete Time-to-Event Analysis with Interval Censoring
invsubdist | Simulation of Output from Cumulative Incidence Regression Model
ipw | Inverse Probability of Censoring Weights
ipw2 | Inverse Probability of Censoring Weights

## -- J --

jumptimes | Extract Event (Jump) Times

## -- K --

kendall.ClaytonOakes.twin.ace | Concordance Probability from Twostage Model
kendall_ClaytonOakes_twin_ace | Concordance Probability from Twostage Model
kendall_normal_twin_ace | Concordance Probability from Twostage Model
km | Kaplan-Meier with Robust Standard Errors
kmplot | Plotting the baselines of stratified Cox

## -- L --

lifecourse | Life-course plot
lifetable | Life table
lifetable.formula | Life table
lifetable.matrix | Life table
LinSpline | Simple linear spline
lin_approx | Simulation of Piecewise Constant Hazard Model (Cox)
logitATE | Average Treatment Effect for Censored Competing Risks Data using Binomial Regression
logitIPCW | Binomial Regression for Censored Competing Risks Data
logitIPCWATE | Average Treatment Effect for Censored Competing Risks Data using Binomial Regression
logitSurv | Proportional Odds Survival Model
loglikMVN | Multivariate normal distribution function
logrankRecurrentBase | Logrank-type test for comparing recurrent event marginal means between groups

## -- M --

make_pairwise_design | Concordance Probability from Twostage Model
marks | Recurrent Events Regression with Terminal Event
matdoubleindex | Stratified Cumulative and Summary Operations
matplot.mets.twostage | Survival Twostage Helpers
mdi | Stratified Cumulative and Summary Operations
mediatorSurv | Mediation analysis in survival context
medweight | Computes mediation weights
melanoma | The Melanoma Survival Data
mena | Menarche data set
mets.options | Set global options for 'mets'
migr | Migraine data
mlogit | Multinomial Regression Based on phreg
multcif | Multivariate Cumulative Incidence Function example data set
mystrata | Finds subjects related to same cluster
mystrata2index | Finds subjects related to same cluster

## -- N --

nonparcuminc | Non-parametric Cumulative Incidence Functions
normalATE | Average Treatment Effect for Censored Competing Risks Data using Binomial Regression
np | np data set
npc | Non-parametric Cumulative Incidence Functions

## -- O --

or.cif | Cross-odds-ratio, OR or RR risk regression for competing risks
or2prob | Estimate parameters from odds-ratio
or_cif | Non-parametric Cumulative Incidence Functions

## -- P --

p11.binomial.twostage.RV | Concordance Probability from Twostage Model
p11_binomial_twostage_RV | Concordance Probability from Twostage Model
pairRisk | Finds subjects related to same cluster
pbvn | Multivariate normal distribution function
pcif | Extract survival estimates from lifetable analysis
phreg | Fast Cox Proportional Hazards Regression
phreg.par | Weibull-Cox regression
phreg_IPTW | IPTW Cox Regression (Inverse Probability of Treatment Weighted)
phreg_rct | Lu-Tsiatis More Efficient Log-Rank for Randomized Studies with Baseline Covariates
phreg_weibull | Weibull-Cox regression
piecewise_data | Survival Twostage Helpers
piecewise_twostage | Survival Twostage Helpers
plack.cif2 | plack Computes concordance for or.cif based model, that is Plackett random effects model
plack_cif | plack Computes concordance for or.cif based model, that is Plackett random effects model
plot.phreg | Plotting the baselines of stratified Cox
plotConfRegion | Plotting the baselines of stratified Cox
plotConfregion | Plotting the baselines of stratified Cox
plotConfRegionSE | Plotting the baselines of stratified Cox
plotcr | Non-parametric Cumulative Incidence Functions
plotstrata | Plotting the baselines of stratified Cox
plotSurvd | Discrete Time-to-Event Analysis with Interval Censoring
plot_twin | Scatter plot function
pmvn | Multivariate normal distribution function
predict | Multinomial Regression Based on phreg
predict.mlogit | Predictions from Multinomial Regression
predict.phreg | Predictions from Proportional Hazards Model
predictCumhaz | Fast approximation
predictGLM | Reporting OR (exp(coef)) from glm with binomial link and glm predictions
predictlogitSurvd | Discrete Time-to-Event Analysis with Interval Censoring
predictPairPlack | Non-parametric Cumulative Incidence Functions
predictSurvd | Discrete Time-to-Event Analysis with Interval Censoring
print.binregCV | Summary method for binregCV objects
print.casewise | prints Concordance test
print.Event | Event history object
print.summary_binregCV_multi | Print method for summary_binregCV_multi objects
prob_exceed_recurrent | Estimate the probability of exceeding k recurrent events by time t
prt | Prostate data set

## -- R --

random.cif | Non-parametric Cumulative Incidence Functions
randomDes | Twostage Survival Model for Multivariate Survival Data
random_cif | Random effects model for competing risks data
ratioATE | Ratio of Average Treatment Effects
rbind.Event | Event history object
rchaz | Simulation of Piecewise Constant Hazard Model (Cox)
rchazl | Multiple Cause Piecewise Constant Hazard Simulation
rcrisk | Simulation of Piecewise constant hazard models with two causes (Cox).
readmargsurv | Twostage Survival Model for Multivariate Survival Data
recreg | Recurrent Events Regression with Terminal Event
recregIPCW | IPCW Estimator for Recurrent Events
recurrentMarginal | Marginal mean estimation for recurrent events with a terminal event
recurrentMarginalPhreg | Marginal mean estimation for recurrent events with a terminal event
recurrent_marginal | Marginal mean estimation for recurrent events with a terminal event
recurrent_marginalAIPCW | Marginal mean estimation for recurrent events with a terminal event
resmeanATE | Average Treatment Effect for Restricted Mean Time
resmeanIPCW | Restricted IPCW Mean for Censored Survival Data
resmean_phreg | Restricted Mean for Stratified Kaplan-Meier or Cox Model
revcumsum | Stratified Cumulative and Summary Operations
revcumsumstrata | Stratified Cumulative and Summary Operations
rmstATE | Average Treatment Effect for Restricted Mean Time
rmstIPCW | Restricted IPCW Mean for Censored Survival Data
rmst_phreg | Restricted Mean for Stratified Kaplan-Meier or Cox Model
rmtlRatio | Percentage of Years Lost Due to a Cause Regression
rmvn | Multivariate normal distribution function
robust.basehaz.phreg | Robust Baseline Hazard Standard Errors
robust_phreg | Fast Cox Proportional Hazards Regression
rr.cif | Cross-odds-ratio, OR or RR risk regression for competing risks
rr_cif | Non-parametric Cumulative Incidence Functions
rweibullcox | Simulate observations from a Weibull distribution

## -- S --

scalecumhaz | Recurrent Events Regression with Terminal Event
scoreMVN | Multivariate normal distribution function
sim_cif | Simulation of Output from Cumulative Incidence Regression Model
sim_cifs | Simulation of Output from Cumulative Incidence Regression Model
sim_ClaytonOakes | Simulate from the Clayton-Oakes frailty model
sim_ClaytonOakesLam | Simulate from the Clayton-Oakes frailty model
sim_ClaytonOakesWei | Simulate from the Clayton-Oakes frailty model
sim_GLcox | Simulation of Two-Stage Recurrent Events Data
sim_multistate | Simulation of Illness-Death Model
sim_multistateII | Illness-Death Competing Risks with Two Causes of Death
sim_phreg | Simulation of Output from Cox Model
sim_phregs | Simulation of Cause-Specific Cox Models
sim_rchaz | Simulation of Piecewise Constant Hazard Model (Cox)
sim_recurrent | Simulate recurrent events with a single event type and a terminal event
sim_recurrentII | Simulate recurrent events with two event types and a terminal event
sim_recurrentTS | Simulate recurrent events from a two-stage model with structured gamma frailties
sim_recurrent_list | Simulate recurrent events with two event types and a terminal event
sim_recurrent_ts | Simulate recurrent events from a two-stage Cox or Ghosh-Lin model
sim_subdist | Simulation of Output from Cumulative Incidence Regression Model
sTRACE | The TRACE study group of myocardial infarction
strata-numeric | Stratified Cumulative and Summary Operations
subdist | Simulation of Output from Cumulative Incidence Regression Model
summary.binregCV | Summary method for binregCV objects
summary.binregCV_list | Summary method for binregCV_list objects
summary.cor | Summary for dependence models for competing risks
summary.Event | Event history object
summarybase.phreg | Robust Baseline Hazard Standard Errors
summaryGLM | Reporting OR (exp(coef)) from glm with binomial link and glm predictions
summaryTimeobject | Summarize a Time-Varying Estimate with Confidence Bands
sumstrata | Stratified Cumulative and Summary Operations
survival-helpers | Survival Twostage Helpers
survival.twostage | Survival Twostage Helpers
survivalG | G-Estimator for Cox and Fine-Gray Models
survivalGtime | G-Estimator for Cox and Fine-Gray Models
survival_twostage | Twostage Survival Model for Multivariate Survival Data
surv_boxarea | Bivariate Survival Data on Rectangular Regions

## -- T --

test_casewise | Test for Independence Using Casewise Concordance
test_conc | Compare Two Concordance Estimates
test_logrankRecurrent | Logrank-type test for comparing recurrent event marginal means between groups
test_marginalMean | Pepe-Mori Test for Marginal Mean Comparison
tetrachoric | Estimate parameters from odds-ratio
tie_breaker | Break ties in event times for recurrent event data
TRACE | The TRACE study group of myocardial infarction
ttpd | ttpd discrete survival data on interval form
tTRACE | The TRACE study group of myocardial infarction
twin-design | Concordance Probability from Twostage Model
twin.polygen.design | Concordance Probability from Twostage Model
twinbmi | BMI data set
twinlm | Classic twin model for quantitative traits
twinlm.strata | Classic twin model for quantitative traits
twinlm.time | Liability model for twin data
twinsim | Simulate twin data
twinstut | Stutter data set
twin_polygen_design | Concordance Probability from Twostage Model
twostageMLE | Twostage Survival Model Fitted by Pseudo MLE
twostageREC | Fitting of Two-Stage Recurrent Events Random Effects Model
twostage_aalen | Twostage Survival Model for Multivariate Survival Data
twostage_cox.aalen | Twostage Survival Model for Multivariate Survival Data
twostage_coxph | Twostage Survival Model for Multivariate Survival Data
twostage_phreg | Twostage Survival Model for Multivariate Survival Data

## -- V --

vecAllStrata | Cumulative Incidence Function (CIF) Regression

## -- W --

WA_recurrent | While-Alive Estimands for Recurrent Events
WA_reg | While-Alive Regression for Recurrent Events

## -- misc --

[.Event | Event history object