bbmle
bbmle copied to clipboard
be smarter about recognizing formulas
Something like
mu_expr <- ~settlers*exp(-exp(alpha_log)*t)/
(1+(exp(beta_log)*settlers*(1-exp(-exp(alpha_log)*t))/exp(alpha_log)))
mle_form <- as.formula(substitute(recruits~dnorm(mu,sd=exp(sd_log)),
list(mu=mu_expr[[2]])))
m <- mle2(mle_form, data=subdat, start=subpar1, method="BFGS")
(not reproducible!) doesn't work because the test (in bbmle:::gfun()
) is
class(try(form <- as.formula(object@call$minuslogl)) != "formula"