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
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.