| mle_competing_risks | R Documentation |
Maximum Likelihood Estimation for Competing Risks Analysis
mle_competing_risks(data, pdf1, cdf1, pdf2, cdf2, init_par, method = "BFGS")
data |
Object of class |
pdf1 |
Density function for Cause 1. |
cdf1 |
CDF function for Cause 1. |
pdf2 |
Density function for Cause 2. |
cdf2 |
CDF function for Cause 2. |
init_par |
Vector of initial parameter values for both causes c(theta1, theta2). |
method |
Optimization method. |
S3 object of class mle_fit.
dat <- gen_competing_risks(
pdf1 = function(x) dexp(x, rate = 1),
cdf1 = function(x) pexp(x, rate = 1),
pdf2 = function(x) dexp(x, rate = 1.5),
cdf2 = function(x) pexp(x, rate = 1.5),
lower = 0, upper = 10, n = 25,
censoring_type = "type1_hybrid",
r = 15, T_star = 1.0, seed = 123
)
mle_competing_risks(
data = dat,
pdf1 = function(x, th) dexp(x, rate = th[1]),
cdf1 = function(x, th) pexp(x, rate = th[1]),
pdf2 = function(x, th) dexp(x, rate = th[2]),
cdf2 = function(x, th) pexp(x, rate = th[2]),
init_par = c(0.8, 1.2), method = "BFGS"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.