Is it possible there is a typo in your attached code? You wrote...
loglik <- function(theta, param) {
sum(d1*log(hazard1(x1, param)) - chazard1(x1,param) +
d2*log(hazard2(x2, theta, param)) - chazard2(x2, theta, param))
} / 10000
Confidentiality Notice: This e-mail message, including any a...{{dropped}}