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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: fitdmm
> ### Title: Fitting Dependent Mixture Models
> ### Aliases: depmix fitdmm loglike posterior computeSes bootstrap
> ###   summary.fit oneliner
> ### Keywords: models
> 
> ### ** Examples
> 
> 
> # COMBINED RT AND CORRECT/INCORRECT SCORES from a 'switching' experiment
> 
> data(speed)
> mod <- dmm(nsta=2,itemt=c(1,2)) # gaussian and binary items
> ll <- loglike(speed,mod)
> fit1 <- fitdmm(dat=speed,dmm=mod)
Initial loglikelihood:  -335.1313  
initial  value 335.131301 
iter  10 value 300.045002
iter  20 value 296.109168
final  value 296.108922 
converged
Final loglikelihood:  -296.1089 
Computing posteriors 
Computing standard errors 
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
depmix
 --- call from context --- 
computeSes(dat, mod)
 --- call from argument --- 
if (class(di) == "try-error") {
    warning("Hessian singular, ses could not be computed.")
    val = list(se = 0, hs = 0)
} else {
    ada = A %*% di %*% t(A)
    adai = try(solve(ada), silent = TRUE)
    if (class(adai) == "try-error") {
        warning("Near-singular hessian, ses may be bad.\n")
        diag(ada) = diag(ada) * 1.000001
        adai = try(solve(ada))
        if (class(adai) == "try-error") {
            warning("Corrected hessian also singular, ses computed without contraints.\n")
            se[which(mod$fixed[1:mod$npars] == 1)] = sqrt(diag(di))
        }
        else {
            ch = di - di %*% t(A) %*% adai %*% A %*% di
            se[which(mod$fixed[1:mod$npars] == 1)] = sqrt(diag(ch))
        }
    }
    else {
        ch = di - di %*% t(A) %*% adai %*% A %*% di
        se[which(mod$fixed[1:mod$npars] == 1)] = sqrt(diag(ch))
    }
}
 --- R stacktrace ---
where 1: computeSes(dat, mod)
where 2: fitdmm(dat = speed, dmm = mod)

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (dat, dmm) 
{
    if (class(dmm)[1] == "fit") 
        dmm <- dmm$mod
    cat("Computing standard errors \n")
    mod = dmm
    eps = 1e-08
    lgh = loglike(dat = dat, dmm = mod, grad = TRUE, tdcov = 0, 
        printlevel = 0)
    ll = lgh$logl
    gr = lgh$gr
    hsall = matrix(0, mod$npars, mod$npars)
    for (j in 1:mod$npars) {
        if (mod$fixed[j] != 0) {
            del = eps * max(1, mod$pars[j])
            por = mod$pars[j]
            mod$pars[j] = por + del
            alli = loglike(dat = dat, dmm = mod, grad = TRUE, 
                hess = FALSE, set = FALSE, tdcov = 0, printlevel = 0)
            grd = alli$gr
            for (i in 1:mod$npars) hsall[i, j] = (grd[i] - gr[i])/del
            mod$pars[j] = por
        }
    }
    se = rep(0, mod$npars)
    hs = -hsall[which(mod$fixed[1:mod$npars] == 1), which(mod$fixed[1:mod$npars] == 
        1)]
    if (nrow(mod$A) > 0) {
        A = matrix(mod$A[, which(mod$fixed[1:mod$npars] == 1)], 
            nrow = nrow(mod$A))
        idx = which(mod$bllin < mod$bulin)
        if (length(idx) > 0) 
            A = A[-idx, , drop = FALSE]
        idx = numeric(0)
        for (i in 1:nrow(A)) {
            if (sum(as.logical(A[i, ])) == 0) {
                idx = c(idx, i)
            }
        }
        if (length(idx) > 0) 
            A = A[-idx, , drop = FALSE]
        d = hs + t(A) %*% A
        di = try(solve(d), silent = TRUE)
        if (class(di) == "try-error") {
            warning("Hessian singular, ses could not be computed.")
            val = list(se = 0, hs = 0)
        }
        else {
            ada = A %*% di %*% t(A)
            adai = try(solve(ada), silent = TRUE)
            if (class(adai) == "try-error") {
                warning("Near-singular hessian, ses may be bad.\n")
                diag(ada) = diag(ada) * 1.000001
                adai = try(solve(ada))
                if (class(adai) == "try-error") {
                  warning("Corrected hessian also singular, ses computed without contraints.\n")
                  se[which(mod$fixed[1:mod$npars] == 1)] = sqrt(diag(di))
                }
                else {
                  ch = di - di %*% t(A) %*% adai %*% A %*% di
                  se[which(mod$fixed[1:mod$npars] == 1)] = sqrt(diag(ch))
                }
            }
            else {
                ch = di - di %*% t(A) %*% adai %*% A %*% di
                se[which(mod$fixed[1:mod$npars] == 1)] = sqrt(diag(ch))
            }
        }
    }
    else {
        se[which(mod$fixed[1:mod$npars] == 1)] = sqrt(diag(solve(hs)))
    }
    val = list(se = se, hs = hs)
    val
}
<bytecode: 0x55e8cd0b4e90>
<environment: namespace:depmix>
 --- function search by body ---
Function computeSes in namespace depmix has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1