`theta.max` <-
function(x, betas){
opt <- function(theta) -sum(dbinom(x, 1, plogis(theta - betas), log = TRUE))
out <- optim(log(sum(x)/(length(x)/sum(x))), opt, method = "BFGS", hessian = TRUE)
out$par
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.