Running examples in 'intccr-Ex.R' failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: waldtest
> ### Title: Wald test for 'ciregic' and 'ciregic_lt'
> ### Aliases: waldtest
> 
> ### ** Examples
> 
> ## Continuing the ciregic(...) example
> waldtest(obj1 = fit)
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
intccr
 --- call from context --- 
waldtest(obj1 = fit)
 --- call from argument --- 
if ((class(try(solve(vcov), silent = TRUE)) != "matrix")) {
    stop("Variance-covariance matrix is sigular.")
}
 --- R stacktrace ---
where 1: waldtest(obj1 = fit)

 --- value of length: 2 type: logical ---
[1] FALSE  TRUE
 --- function from context --- 
function (obj1, obj2 = NULL, ...) 
{
    if (!is.null(obj2)) {
        if (which.max(c(length(obj1$varnames), length(obj2$varnames))) == 
            1) {
            full <- obj1
            nested <- obj2
        }
        else {
            full <- obj2
            nested <- obj1
        }
    }
    else {
        full <- obj1
        nested <- obj2
    }
    if (full$convergence != "Converged") {
        stop("The fitted model did not converge.")
    }
    if (length(full$varnames) == 1 && full$varnames == "(intercept)") {
        stop("The fitted model requires at least one covariate.")
    }
    if (!is.null(nested) && nested$convergence != "Converged") {
        stop("The nested model did not converge.")
    }
    if (sum(full$varnames %in% nested$varnames) == length(full$varnames)) {
        stop("The full model and nested model have the same number of covariate(s).")
    }
    q <- length(full$varnames)
    coef.full <- as.matrix(full$coefficients, nrow = q * 2)
    rownames(coef.full) <- rep(full$varnames, 2)
    vcov <- full$vcov
    if (is.null(nested)) {
        coef.nested <- as.matrix(rep(0, 2 * q), nrow = 2 * q)
        df.nested <- 0
        covnames <- rep(!(full$varnames %in% nested$varnames), 
            2)
    }
    else {
        coef.nested <- coef.full * rep((full$varnames %in% nested$varnames), 
            2)
        df.nested <- sum(full$varnames %in% nested$varnames)
        covnames <- rep(!(full$varnames %in% nested$varnames), 
            2)
    }
    diff.coef <- coef.full - coef.nested
    if ((class(try(solve(vcov), silent = TRUE)) != "matrix")) {
        stop("Variance-covariance matrix is sigular.")
    }
    stat <- pval <- rep(NA, 3)
    df <- rep(NA, 2)
    stat[1] <- t(diff.coef[which(diff.coef != 0)]) %*% solve(vcov[covnames, 
        covnames]) %*% diff.coef[which(diff.coef != 0)]
    df[1] <- 2 * (q - df.nested)
    pval[1] <- pchisq(stat[1], df[1], lower.tail = FALSE)
    stat[2] <- t(diff.coef[which(diff.coef[1:q] != 0)]) %*% solve(vcov[which(covnames[1:q]), 
        which(covnames[1:q])]) %*% diff.coef[which(diff.coef[1:q] != 
        0)]
    stat[3] <- t(diff.coef[which(diff.coef[(q + 1):(2 * q)] != 
        0) + q]) %*% solve(vcov[which(covnames[1:q]) + q, which(covnames[1:q]) + 
        q]) %*% diff.coef[which(diff.coef[(q + 1):(2 * q)] != 
        0) + q]
    df[2] <- q - df.nested
    pval[2] <- pchisq(stat[2], df[2], lower.tail = FALSE)
    pval[3] <- pchisq(stat[3], df[2], lower.tail = FALSE)
    tbl <- as.data.frame(rbind(cbind(format(stat[1], digits = 1, 
        nsmall = 4), df[1], format.pval(pval[1], digits = 1, 
        nsmall = 4)), cbind(format(stat[2], digits = 1, nsmall = 4), 
        df[2], format.pval(pval[2], digits = 1, nsmall = 4)), 
        cbind(format(stat[3], digits = 1, nsmall = 4), df[2], 
            format.pval(pval[3], digits = 1, nsmall = 4))))
    colnames(tbl) <- c("Chisq", "df", "P(> Chisq)")
    tbl
    res <- list(varnames.full = obj1$varnames, varnames.nested = obj2$varnames, 
        vcov = vcov, vcov.event1 = vcov[which(covnames[1:q]), 
            which(covnames[1:q])], vcov.event2 = vcov[which(covnames[1:q]) + 
            q, which(covnames[1:q]) + q], table = tbl)
    class(res) <- "waldtest"
    res
}
<bytecode: 0x46b5430>
<environment: namespace:intccr>
 --- function search by body ---
Function waldtest in namespace intccr has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1