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

> ### Name: anova.jmdem
> ### Title: Analysis of Deviance for Joint Mean and Dispersion Effect Models
> ###   Fits
> ### Aliases: anova.jmdem
> 
> ### ** Examples
> 
> ## Example in jmdem(...)
> MyData <- simdata.jmdem.sim(mformula = y ~ x, dformula = ~ z, 
+                             mfamily = poisson(), 
+                             dfamily = Gamma(link = "log"), 
+                             beta.true = c(0.5, 4), 
+                             lambda.true = c(2.5, 3), n = 100)
>                             
> fit <- jmdem(mformula = y ~ x, dformula = ~ z, data = MyData, 
+              mfamily = poisson, dfamily = Gamma(link = "log"), 
+              dev.type = "deviance", method = "CG")
>               
> ## Run a partial analysis (type 3) with Wald test
> anova(fit, test = "Wald", type = 3)
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
jmdem
 --- call from context --- 
minv(object2$info.matrix)
 --- call from argument --- 
if (!class(ans) == "try-error") {
    not.ok <- any(diag(ans) < 0) | any(eigen(ans)$values < 0)
} else {
    not.ok <- TRUE
}
 --- R stacktrace ---
where 1: minv(object2$info.matrix)
where 2: solve(m)
where 3: doTryCatch(return(expr), name, parentenv, handler)
where 4: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 5: tryCatchList(expr, classes, parentenv, handlers)
where 6: tryCatch(expr, error = function(e) {
    call <- conditionCall(e)
    if (!is.null(call)) {
        if (identical(call[[1L]], quote(doTryCatch))) 
            call <- sys.call(-4L)
        dcall <- deparse(call)[1L]
        prefix <- paste("Error in", dcall, ": ")
        LONG <- 75L
        sm <- strsplit(conditionMessage(e), "\n")[[1L]]
        w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")
        if (is.na(w)) 
            w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], 
                type = "b")
        if (w > LONG) 
            prefix <- paste0(prefix, "\n  ")
    }
    else prefix <- "Error : "
    msg <- paste0(prefix, conditionMessage(e), "\n")
    .Internal(seterrmessage(msg[1L]))
    if (!silent && isTRUE(getOption("show.error.messages"))) {
        cat(msg, file = outFile)
        .Internal(printDeferredWarnings())
    }
    invisible(structure(msg, class = "try-error", condition = e))
})
where 7: try(solve(m), silent = TRUE)
where 8: minv(t(par0) %*% minv(object2$info.matrix)$inv %*% par0)
where 9: wald.jmdem(test.list)
where 10: anova.jmdem(fit, test = "Wald", type = 3)
where 11: anova(fit, test = "Wald", type = 3)

 --- value of length: 2 type: logical ---
[1] TRUE TRUE
 --- function from context --- 
function (m, minv.method = NULL, tol = sqrt(.Machine$double.eps)) 
{
    if (!is.null(minv.method)) {
        ans <- try(do.call(minv.method, list(m)), silent = TRUE)
        if (minv.method == "solve") {
            ansnam <- "inverse"
        }
        else if (minv.method == "chol2inv") {
            ansnam <- "inverse from Choleski decomposition"
        }
        else {
            ansnam <- "generalised inverse"
        }
    }
    else {
        ans <- try(solve(m), silent = TRUE)
        ansnam <- "inverse"
        if (!class(ans) == "try-error") {
            not.ok <- any(diag(ans) < 0) | any(eigen(ans)$values < 
                0)
        }
        else {
            not.ok <- TRUE
        }
        if (not.ok) {
            ans <- try(chol2inv(m), silent = TRUE)
            ansnam <- "inverse from Choleski decomposition"
            if (!class(ans) == "try-error") {
                not.ok <- any(diag(ans) < 0) | any(eigen(ans)$values < 
                  0)
            }
            else {
                not.ok <- TRUE
            }
            if (not.ok) {
                ans <- try(ginv(m), silent = TRUE)
                ansnam <- "generalised inverse"
            }
        }
    }
    return(list(inv = ans, inv.nam = ansnam))
}
<bytecode: 0x64e6258>
<environment: namespace:jmdem>
 --- function search by body ---
Function minv in namespace jmdem has this body.
 ----------- END OF FAILURE REPORT -------------- 
Warning in chol2inv(m) : restarting interrupted promise evaluation
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
jmdem
 --- call from context --- 
minv(object2$info.matrix)
 --- call from argument --- 
if (!class(ans) == "try-error") {
    not.ok <- any(diag(ans) < 0) | any(eigen(ans)$values < 0)
} else {
    not.ok <- TRUE
}
 --- R stacktrace ---
where 1: minv(object2$info.matrix)
where 2: chol2inv(m)
where 3: doTryCatch(return(expr), name, parentenv, handler)
where 4: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 5: tryCatchList(expr, classes, parentenv, handlers)
where 6: tryCatch(expr, error = function(e) {
    call <- conditionCall(e)
    if (!is.null(call)) {
        if (identical(call[[1L]], quote(doTryCatch))) 
            call <- sys.call(-4L)
        dcall <- deparse(call)[1L]
        prefix <- paste("Error in", dcall, ": ")
        LONG <- 75L
        sm <- strsplit(conditionMessage(e), "\n")[[1L]]
        w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")
        if (is.na(w)) 
            w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], 
                type = "b")
        if (w > LONG) 
            prefix <- paste0(prefix, "\n  ")
    }
    else prefix <- "Error : "
    msg <- paste0(prefix, conditionMessage(e), "\n")
    .Internal(seterrmessage(msg[1L]))
    if (!silent && isTRUE(getOption("show.error.messages"))) {
        cat(msg, file = outFile)
        .Internal(printDeferredWarnings())
    }
    invisible(structure(msg, class = "try-error", condition = e))
})
where 7: try(chol2inv(m), silent = TRUE)
where 8: minv(t(par0) %*% minv(object2$info.matrix)$inv %*% par0)
where 9: wald.jmdem(test.list)
where 10: anova.jmdem(fit, test = "Wald", type = 3)
where 11: anova(fit, test = "Wald", type = 3)

 --- value of length: 2 type: logical ---
[1] TRUE TRUE
 --- function from context --- 
function (m, minv.method = NULL, tol = sqrt(.Machine$double.eps)) 
{
    if (!is.null(minv.method)) {
        ans <- try(do.call(minv.method, list(m)), silent = TRUE)
        if (minv.method == "solve") {
            ansnam <- "inverse"
        }
        else if (minv.method == "chol2inv") {
            ansnam <- "inverse from Choleski decomposition"
        }
        else {
            ansnam <- "generalised inverse"
        }
    }
    else {
        ans <- try(solve(m), silent = TRUE)
        ansnam <- "inverse"
        if (!class(ans) == "try-error") {
            not.ok <- any(diag(ans) < 0) | any(eigen(ans)$values < 
                0)
        }
        else {
            not.ok <- TRUE
        }
        if (not.ok) {
            ans <- try(chol2inv(m), silent = TRUE)
            ansnam <- "inverse from Choleski decomposition"
            if (!class(ans) == "try-error") {
                not.ok <- any(diag(ans) < 0) | any(eigen(ans)$values < 
                  0)
            }
            else {
                not.ok <- TRUE
            }
            if (not.ok) {
                ans <- try(ginv(m), silent = TRUE)
                ansnam <- "generalised inverse"
            }
        }
    }
    return(list(inv = ans, inv.nam = ansnam))
}
<bytecode: 0x64e6258>
<environment: namespace:jmdem>
 --- function search by body ---
Function minv in namespace jmdem has this body.
 ----------- END OF FAILURE REPORT -------------- 
Warning in ginv(m) : restarting interrupted promise evaluation
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
jmdem
 --- call from context --- 
minv(object2$info.matrix)
 --- call from argument --- 
if (!class(ans) == "try-error") {
    not.ok <- any(diag(ans) < 0) | any(eigen(ans)$values < 0)
} else {
    not.ok <- TRUE
}
 --- R stacktrace ---
where 1: minv(object2$info.matrix)
where 2: ginv(m)
where 3: doTryCatch(return(expr), name, parentenv, handler)
where 4: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 5: tryCatchList(expr, classes, parentenv, handlers)
where 6: tryCatch(expr, error = function(e) {
    call <- conditionCall(e)
    if (!is.null(call)) {
        if (identical(call[[1L]], quote(doTryCatch))) 
            call <- sys.call(-4L)
        dcall <- deparse(call)[1L]
        prefix <- paste("Error in", dcall, ": ")
        LONG <- 75L
        sm <- strsplit(conditionMessage(e), "\n")[[1L]]
        w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")
        if (is.na(w)) 
            w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], 
                type = "b")
        if (w > LONG) 
            prefix <- paste0(prefix, "\n  ")
    }
    else prefix <- "Error : "
    msg <- paste0(prefix, conditionMessage(e), "\n")
    .Internal(seterrmessage(msg[1L]))
    if (!silent && isTRUE(getOption("show.error.messages"))) {
        cat(msg, file = outFile)
        .Internal(printDeferredWarnings())
    }
    invisible(structure(msg, class = "try-error", condition = e))
})
where 7: try(ginv(m), silent = TRUE)
where 8: minv(t(par0) %*% minv(object2$info.matrix)$inv %*% par0)
where 9: wald.jmdem(test.list)
where 10: anova.jmdem(fit, test = "Wald", type = 3)
where 11: anova(fit, test = "Wald", type = 3)

 --- value of length: 2 type: logical ---
[1] TRUE TRUE
 --- function from context --- 
function (m, minv.method = NULL, tol = sqrt(.Machine$double.eps)) 
{
    if (!is.null(minv.method)) {
        ans <- try(do.call(minv.method, list(m)), silent = TRUE)
        if (minv.method == "solve") {
            ansnam <- "inverse"
        }
        else if (minv.method == "chol2inv") {
            ansnam <- "inverse from Choleski decomposition"
        }
        else {
            ansnam <- "generalised inverse"
        }
    }
    else {
        ans <- try(solve(m), silent = TRUE)
        ansnam <- "inverse"
        if (!class(ans) == "try-error") {
            not.ok <- any(diag(ans) < 0) | any(eigen(ans)$values < 
                0)
        }
        else {
            not.ok <- TRUE
        }
        if (not.ok) {
            ans <- try(chol2inv(m), silent = TRUE)
            ansnam <- "inverse from Choleski decomposition"
            if (!class(ans) == "try-error") {
                not.ok <- any(diag(ans) < 0) | any(eigen(ans)$values < 
                  0)
            }
            else {
                not.ok <- TRUE
            }
            if (not.ok) {
                ans <- try(ginv(m), silent = TRUE)
                ansnam <- "generalised inverse"
            }
        }
    }
    return(list(inv = ans, inv.nam = ansnam))
}
<bytecode: 0x64e6258>
<environment: namespace:jmdem>
 --- function search by body ---
Function minv in namespace jmdem has this body.
 ----------- END OF FAILURE REPORT -------------- 
Error in t(g0) %*% i0 : requires numeric/complex matrix/vector arguments
Calls: anova -> anova.jmdem -> wald.jmdem
Execution halted