# Analysis of Multivariate Event Times

## Documentation for package ‘mets’ version 1.2.7

- 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

mets-package | Analysis of Multivariate Events

## -- A --

aalenfrailty | Aalen frailty model
ace.family.design | For internal use
addCums | Simulation of recurrent events data based on cumulative hazards
alpha2kendall | For internal use
alpha2spear | For internal use
ascertained.pairs | For internal use

## -- B --

back2timereg | Convert to timereg object
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
basecumhaz | Plotting the baslines of stratified Cox
basehazplot.phreg | Plotting the baslines of stratified Cox
bicomprisk | 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
biprobit | Bivariate Probit model
biprobit.time | Bivariate Probit model
biprobit.vector | Bivariate Probit model
blocksample | Block sampling
Bootcovariancerecurrence | Estimation of covariance for bivariate recurrent events with terminal event
BootcovariancerecurrenceS | Estimation of covariance for bivariate recurrent events with terminal event
Bootphreg | Wild bootstrap for Cox PH regression
bplot | Plotting the baslines of stratified Cox
bptwin | Liability model for twin data
bptwin.time | Liability model for twin data

## -- C --

casewise | Estimates the casewise concordance based on Concordance and marginal estimate using prodlim but no testing
casewise.bin | Estimates the casewise concordance based on Concordance and marginal estimate using timereg and performs test for independence
casewise.test | Estimates the casewise concordance based on Concordance and marginal estimate using timereg and performs test for independence
CCbinomial.twostage | For internal use
cif | Cumulative incidence with robust standard errors
cifreg | CIF regression
ClaytonOakes | Clayton-Oakes model with piece-wise constant hazards
cluster.index | Finds subjects related to same cluster
coarse.clust | For internal use
coefmat | For internal use
concordance.cor | Concordance Computes concordance and casewise concordance
concordanceCor | Concordance Computes concordance and casewise concordance
concordanceTwinACE | For internal use
concordanceTwostage | For internal use
cor.cif | Cross-odds-ratio, OR or RR risk regression for competing risks
corsim.prostate | For internal use
corsim.prostate.random | For internal use
count.history | Counts the number of previous events of two types for recurrent events processes
countID | Finds subjects related to same cluster
covarianceRecurrent | Estimation of covariance for bivariate recurrent events with terminal event
covarianceRecurrentS | Estimation of covariance for bivariate recurrent events with terminal event
covfr | Predictions from proportional hazards model
covfridstrata | Predictions from proportional hazards model
covfridstrataCov | Predictions from proportional hazards model
covIntH1dM1IntH2dM2 | Simulation of recurrent events data based on cumulative hazards
cumContr | GOF for Cox covariates in PH regression
cumsumidstratasum | Predictions from proportional hazards model
cumsumidstratasumCov | Predictions from proportional hazards model
cumsumstrata | Predictions from proportional hazards model
cumsumstratasum | Predictions from proportional hazards model

## -- 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
dInterval | ## uses HaploSurvival package of github install via devtools ## devtools::install_github("scheike/HaploSurvival") ## this is only used for simulations ## out <- simHaplo(1,100,tcoef,hapfreqs) Discrete time to event interval censored data
divide.conquer | Split a data set and run function
divide.conquer.timereg | Split a data set and run function from timereg and aggregate
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
drcumhaz | Rate for leaving HPN program for patients of Copenhagen
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
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 --

easy.binomial.twostage | 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.survival.twostage | Wrapper for easy fitting of Clayton-Oakes or bivariate Plackett models for bivariate survival data
EVaddGam | Relative risk for additive gamma model
eventpois | Extract survival estimates from lifetable analysis
extendCums | Simulation of illness-death model

## -- F --

familycluster.index | Finds all pairs within a cluster (family)
familyclusterWithProbands.index | Finds all pairs within a cluster (famly) with the proband (case/control)
fast.approx | Fast approximation
fast.cluster | For internal use
fast.pattern | Fast pattern
fast.reshape | Fast reshape
FastCoxPLstrataR | Fast Cox PH regression and calculations done in R to make play and adjustments easy
faster.reshape | For internal use
folds | For internal use
force.same.cens | For internal use

## -- G --

ghaplos | ghaplos haplo-types for subjects of haploX data
gof.phreg | GOF for Cox PH regression
gofG.phreg | Stratified baseline graphical GOF test for Cox covariates in PH regression
gofM.phreg | GOF for Cox covariates in PH regression
gofZ.phreg | GOF for Cox covariates in PH regression
Grandom.cif | Additive Random effects model for competing risks data for polygenetic modelling
grouptable | For internal use

## -- H --

hapfreqs | hapfreqs data set
haplo.surv.discrete | Discrete time to event haplo type analysis
haploX | haploX covariates and response for haplo survival discrete survival

## -- I --

ilap | For internal use
Interval | ## uses HaploSurvival package of github install via devtools ## devtools::install_github("scheike/HaploSurvival") ## this is only used for simulations ## out <- simHaplo(1,100,tcoef,hapfreqs) Discrete time to event interval censored data
interval.logitsurv.discrete | ## uses HaploSurvival package of github install via devtools ## devtools::install_github("scheike/HaploSurvival") ## this is only used for simulations ## out <- simHaplo(1,100,tcoef,hapfreqs) Discrete time to event interval censored data
ipw | Inverse Probability of Censoring Weights
ipw2 | Inverse Probability of Censoring Weights

## -- J --

jumptimes | For internal use

## -- K --

kendall.ClaytonOakes.twin.ace | For internal use
kendall.normal.twin.ace | For internal use
km | Kaplan-Meier with robust standard errors

## -- L --

lifecourse | Life-course plot
lifetable | Life table
lifetable.formula | Life table
lifetable.matrix | Life table
LinSpline | Simple linear spline
logitSurv | Proportional odds survival model
loglikMVN | Multivariate normal distribution function

## -- M --

make.pairwise.design | For internal use
make.pairwise.design.competing | For internal use
matdoubleindex | Predictions from proportional hazards model
matplot.mets.twostage | For internal use
mdi | Predictions from proportional hazards model
mena | Menarche data set
mets.options | Set global options for 'mets'
migr | Migraine data
mlogit | Multinomial regression based on phreg regression
multcif | Multivariate Cumulative Incidence Function example data set
mystrata | Finds subjects related to same cluster

## -- N --

nonparcuminc | For internal use
np | np data set
npc | For internal use

## -- O --

object.defined | For internal use
or.cif | Cross-odds-ratio, OR or RR risk regression for competing risks
or2prob | Estimate parameters from odds-ratio

## -- P --

p11.binomial.twostage.RV | For internal use
pairRisk | Finds subjects related to same cluster
pbvn | Multivariate normal distribution function
pcif | Extract survival estimates from lifetable analysis
phreg | Fast Cox PH regression
phreg.par | Fast Cox PH regression
phregR | Fast Cox PH regression and calculations done in R to make play and adjustments easy
piecewise.data | For internal use
piecewise.twostage | For internal use
plack.cif | plack Computes concordance for or.cif based model, that is Plackett random effects model
plack.cif2 | plack Computes concordance for or.cif based model, that is Plackett random effects model
plot.covariace.recurrent | Estimation of covariance for bivariate recurrent events with terminal event
plotConfRegion | Plotting the baslines of stratified Cox
plotcr | For internal use
plotSurvd | Discrete time to event haplo type analysis
pmvn | Multivariate normal distribution function
ppch | Piecewise constant hazard distribution
pred.cif.boot | Wild bootstrap for Cox PH regression
predict.phreg | Predictions from proportional hazards model
predictlogitSurvd | ## uses HaploSurvival package of github install via devtools ## devtools::install_github("scheike/HaploSurvival") ## this is only used for simulations ## out <- simHaplo(1,100,tcoef,hapfreqs) Discrete time to event interval censored data
predictPairPlack | For internal use
predictSurvd | Discrete time to event haplo type analysis
print.casewise | prints Concordance test
prob.exceed.recurrent | Estimation of probability of more that k events for recurrent events process
prob.exceedBiRecurrent | Estimation of probability of more that k events for recurrent events process
prob.exceedBiRecurrentStrata | Estimation of probability of more that k events for recurrent events process
prob.exceedRecurrent | Estimation of probability of more that k events for recurrent events process
prob.exceedRecurrentStrata | Estimation of probability of more that k events for recurrent events process
procform | For internal use
procform3 | For internal use
procformdata | For internal use
prt | Prostate data set

## -- R --

random.cif | Random effects model for competing risks data
randomDes | Twostage survival model for multivariate survival data
readPhreg | Fast Cox PH regression
recmarg | Fast recurrent marginal mean when death is possible
recurrentMarginal | Fast recurrent marginal mean when death is possible
recurrentMarginalgam | Simulation of recurrent events data based on cumulative hazards
recurrentMarginalIPCW | Fast recurrent marginal mean when death is possible
revcumsum | Predictions from proportional hazards model
revcumsumidstratasum | Predictions from proportional hazards model
revcumsumidstratasumCov | Predictions from proportional hazards model
revcumsumstrata | Predictions from proportional hazards model
revcumsumstratasum | Predictions from proportional hazards model
rmvn | Multivariate normal distribution function
robust.basehaz.phreg | Predictions from proportional hazards model
robust.phreg | Fast Cox PH regression
rpch | Piecewise constant hazard distribution
rr.cif | Cross-odds-ratio, OR or RR risk regression for competing risks

## -- S --

scoreMVN | Multivariate normal distribution function
showfitsim | Simulation of recurrent events data based on cumulative hazards
sim | For internal use
simAalenFrailty | Simulate from the Aalen Frailty model
simbinClaytonOakes.family.ace | For internal use
simbinClaytonOakes.pairs | For internal use
simbinClaytonOakes.twin.ace | For internal use
simBinFam | For internal use
simBinFam2 | For internal use
simBinPlack | For internal use
simClaytonOakes | Simulate from the Clayton-Oakes frailty model
simClaytonOakes.family.ace | For internal use
simClaytonOakes.twin.ace | For internal use
simClaytonOakesLam | Simulate from the Clayton-Oakes frailty model
simClaytonOakesWei | Simulate from the Clayton-Oakes frailty model
simCompete.simple | For internal use
simCompete.twin.ace | For internal use
simCox | For internal use
simFrailty.simple | For internal use
simlogitSurvd | ## uses HaploSurvival package of github install via devtools ## devtools::install_github("scheike/HaploSurvival") ## this is only used for simulations ## out <- simHaplo(1,100,tcoef,hapfreqs) Discrete time to event interval censored data
simMultistate | Simulation of illness-death model
simnordic | For internal use
simnordic.random | For internal use
simRecurrent | Simulation of recurrent events data based on cumulative hazards
simRecurrentGamma | Simulation of recurrent events data based on cumulative hazards
simRecurrentII | Simulation of recurrent events data based on cumulative hazards II
simRecurrentTS | Simulation of recurrent events data based on cumulative hazards: Two-stage model
simSurvFam | For internal use
simTTP | Discrete time to event haplo type analysis
slope.process | Estimates the casewise concordance based on Concordance and marginal estimate using timereg and performs test for independence
squareintHdM | Simulation of recurrent events data based on cumulative hazards
summary.cor | Summary for dependence models for competing risks
sumstrata | Predictions from proportional hazards model
surv.boxarea | For internal use
survival.iterative | Survival model for multivariate survival data
survival.twostage | Twostage survival model for multivariate survival data
survival.twostage.fullse | Twostage survival model for multivariate survival data

## -- T --

tailstrata | Predictions from proportional hazards model
test.conc | Concordance test Compares two concordance estimates
tetrachoric | Estimate parameters from odds-ratio
tie.breaker | Fast recurrent marginal mean when death is possible
ttpd | ttpd discrete survival data on interval form
twin.clustertrunc | Estimation of twostage model with cluster truncation in bivariate situation
twin.polygen.design | For internal use
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
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.fullse | For internal use
twostage.phreg | Twostage survival model for multivariate survival data
twostageMLE | Twostage survival model fitted by pseudo MLE