Description Usage Arguments Value Examples
This function is not actually used. It is a R replicate of the C++ function compute_logLikC
that is actually used. It computes the log-likelihood.
1 | compute_logLik(pred_prob, surv_bin, scale = 1L)
|
pred_prob |
The predicted probability of death computed by |
surv_bin |
The binary response variable taking 1 for alive and 0 for death |
scale |
The scaling parameter (useful if the optimisation function can only minimise) |
The scaled log-likelihood.
1 2 3 4 5 | pmat <- build_param_matrix(param_values = c(0.1, 0.2), param_str = c("w1" = "s"))
dmat <- build_design_matrix(data = SurvEles_small, param_matrix = pmat)
p <- predictor(data = SurvEles_small, design_matrix = dmat)
compute_logLik(pred_prob = p, surv_bin = SurvEles_small$Alive, scale = 1L)
compute_logLikC(pred_prob = p, surv_bin = SurvEles_small$Alive, scale = 1L)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.