R/likelihood_ratio_p.R

Defines functions likelihood_ratio_p

Documented in likelihood_ratio_p

likelihood_ratio_p <- function(p, num, data, crit, closed_form) {
  if(p < 0) p <- .Machine$double.eps
  if(closed_form) denom <- likelihood_p_closed(p, data)
  else denom <- likelihood_p(p, data)
  2 * (log(num) - log(denom)) - crit
}
BriceonWiley/IntegratedLikelihood.R documentation built on Aug. 21, 2020, 11 p.m.