R/fun_bic.R

Defines functions fun_bic

Documented in fun_bic

fun_bic <- function(x, tilde_b, arglist, tol) {

  if(missing(tol)) tol <- arglist$tol

  can_results <- fun_penSurvIC(theta = x, tilde_b, arglist, tol)
  can_b <- can_results$b
  can_convergence <- can_results$convergence
  log_pen <- log_penlikelihood(can_b, arglist)
  n <- arglist$n
  bic_value <- -2 * log_pen + log(n) * sum(can_b != 0)

  return(c(bic_value, can_convergence, can_b))
}

Try the ALassoSurvIC package in your browser

Any scripts or data that you put into this service are public.

ALassoSurvIC documentation built on Dec. 1, 2022, 5:12 p.m.