Skip to contents

\(S(t_1, t_2) = C(S_1(t_1), S_2(t_2))\) with Kaplan-Meier margins – Sklar's theorem on the survival scale. The family choice says where in time the association acts: Clayton lower-tail (early events), Gumbel upper-tail (late), Frank neither. Mirrors morie.fn.copfr and, with family = "clayton", morie.fn.clyfr.

Usage

morie_copula_survival(
  time1,
  event1,
  time2,
  event2,
  family = "clayton",
  theta = NULL
)

Arguments

time1, time2

numeric observed times.

event1, event2

binary event indicators.

family

copula family.

theta

parameter; inverted from the sample tau if NULL.

Value

list: family, theta, tau_sample, joint_survival, s1, s2, n_pairs, method.

References

Clayton, D. G. (1978). Biometrika 65(1), 141-151. Sklar, A. (1959). Publ. Inst. Statist. Univ. Paris 8, 229-231.

Examples

set.seed(1)
t1 <- rexp(30)
t2 <- t1 + rexp(30, 5)
morie_copula_survival(t1, rep(1, 30), t2, rep(1, 30))$tau_sample
#> [1] 0.8758621