Running examples in ‘Metatron-Ex.R’ failed
The error most likely occurred in:

> ### Name: imperfect.trees
> ### Title: Fit the Multinomial Tree Model 2 of Botella et al (2013)
> ### Aliases: imperfect.trees print.imperfect.trees
> ### Keywords: file
> 
> ### ** Examples
> 
> ## load data of the screening outcome of Mini Mental State Examination (MMSE) 
> data(MMSE)
> ## fit the multinomial tree model 2, imperfect reference
> imperfect.trees(TP=TP,FN=FN,TN=TN,FP=FP,study=study,data=MMSE)

 *** caught segfault ***
address ff040008, cause 'memory not mapped'

Traceback:
 1: `rownames<-`(`*tmp*`, value = c("p1", "sy", "sx", "ey", "ex", "p2", "p3", "p4"))
 2: spec$par2deriv(plogis(par))
 3: gr(par, ...)
 4: (function (par) gr(par, ...))(c(1.95611806213437, -16.3822797015739, -1.91557279515771, -1.95486733875263, -1.84959585294709, 0.630196265291618, -0.258365138764911, 3.05748359452817))
 5: (function (par, fn, gr = NULL, ..., method = c("Nelder-Mead",     "BFGS", "CG", "L-BFGS-B", "SANN", "Brent"), lower = -Inf,     upper = Inf, control = list(), hessian = FALSE) {    fn1 <- function(par) fn(par, ...)    gr1 <- if (!is.null(gr))         function(par) gr(par, ...)    method <- match.arg(method)    if ((length(lower) > 1L || length(upper) > 1L || lower[1L] !=         -Inf || upper[1L] != Inf) && !any(method == c("L-BFGS-B",         "Brent"))) {        warning("bounds can only be used with method L-BFGS-B (or Brent)")        method <- "L-BFGS-B"    }    npar <- length(par)    con <- list(trace = 0, fnscale = 1, parscale = rep.int(1,         npar), ndeps = rep.int(0.001, npar), maxit = 100L, abstol = -Inf,         reltol = sqrt(.Machine$double.eps), alpha = 1, beta = 0.5,         gamma = 2, REPORT = 10, type = 1, lmm = 5, factr = 1e+07,         pgtol = 0, tmax = 10, temp = 10)    nmsC <- names(con)    if (method == "Nelder-Mead")         con$maxit <- 500    if (method == "SANN") {        con$maxit <- 10000        con$REPORT <- 100    }    con[(namc <- names(control))] <- control    if (length(noNms <- namc[!namc %in% nmsC]))         warning("unknown names in control: ", paste(noNms, collapse = ", "))    if (con$trace < 0)         warning("read the documentation for 'trace' more carefully")    else if (method == "SANN" && con$trace && as.integer(con$REPORT) ==         0)         stop("'trace != 0' needs 'REPORT >= 1'")    if (method == "L-BFGS-B" && any(!is.na(match(c("reltol",         "abstol"), namc))))         warning("method L-BFGS-B uses 'factr' (and 'pgtol') instead of 'reltol' and 'abstol'")    if (npar == 1 && method == "Nelder-Mead")         warning("one-dimensional optimization by Nelder-Mead is unreliable:\nuse \"Brent\" or optimize() directly")    if (npar > 1 && method == "Brent")         stop("method = \"Brent\" is only available for one-dimensional optimization")    lower <- as.double(rep_len(lower, npar))    upper <- as.double(rep_len(upper, npar))    res <- if (method == "Brent") {        if (any(!is.finite(c(upper, lower))))             stop("'lower' and 'upper' must be finite values")        res <- optimize(function(par) fn(par, ...)/con$fnscale,             lower = lower, upper = upper, tol = con$reltol)        names(res)[names(res) == c("minimum", "objective")] <- c("par",             "value")        res$value <- res$value * con$fnscale        c(res, list(counts = c(`function` = NA, gradient = NA),             convergence = 0L, message = NULL))    }    else .External2(C_optim, par, fn1, gr1, method, con, lower,         upper)    if (hessian)         res$hessian <- .External2(C_optimhess, res$par, fn1,             gr1, con)    res})(par = c(0.847297860387203, 0, 0, 0, 0, 0, 0, 0), fn = function (par) -sum(y * log(spec$par2prob(plogis(par)))), gr = function (par) {    yp <- drop(y/spec$par2prob(plogis(par)))    dp <- spec$par2deriv(plogis(par))$deriv    -drop(dp %*% yp) * dlogis(par)}, method = "BFGS", control = list(reltol = 9.02333028971155e-14,     maxit = 1000))
 6: do.call(optim, optArgs)
 7: mpt(spec = eval(parse(text = formultex)), data = salida, start = c(0.7,     0.5, 0.5, 0.5, rep(0.5, length(study))))
 8: imperfect.trees(TP = TP, FN = FN, TN = TN, FP = FP, study = study,     data = MMSE)
An irrecoverable exception occurred. R is aborting now ...