Package check result: OK Changes to worse in reverse depends: Package: tram Check: tests New result: ERROR Running ‘Coxph-Ex.R’ [5s/5s] Comparing ‘Coxph-Ex.Rout’ to ‘Coxph-Ex.Rout.save’ ... OK Running ‘KaplanMeier-Ex.R’ [1s/1s] Running ‘PI_OVL-Ex.R’ [2s/2s] Running ‘Polr-Ex.R’ [6s/6s] Comparing ‘Polr-Ex.Rout’ to ‘Polr-Ex.Rout.save’ ... OK Running ‘Survreg-Ex.R’ [2s/2s] Comparing ‘Survreg-Ex.Rout’ to ‘Survreg-Ex.Rout.save’ ... OK Running ‘bugfixes.R’ [40s/40s] Running ‘intercepts-Ex.R’ [2s/2s] Comparing ‘intercepts-Ex.Rout’ to ‘intercepts-Ex.Rout.save’ ... OK Running ‘mmlt-Ex.R’ [72s/72s] Comparing ‘mmlt-Ex.Rout’ to ‘mmlt-Ex.Rout.save’ ... 931c931 < [1] "Mean relative difference: 3.3" --- > [1] TRUE Running ‘mmlt-interface.R’ [4s/4s] Running ‘mtram-Ex.R’ [5s/5s] Comparing ‘mtram-Ex.Rout’ to ‘mtram-Ex.Rout.save’ ... 63,64d62 < attr(,"class") < [1] "vcmat_us" "matrix" "array" Running ‘stram-Ex.R’ [15s/15s] Comparing ‘stram-Ex.Rout’ to ‘stram-Ex.Rout.save’ ... OK Running the tests in ‘tests/mmlt-interface.R’ failed. Complete output: > > library("tram") Loading required package: mlt Loading required package: basefun Loading required package: variables Loading required package: mvtnorm > library("survival") > library("sandwich") > library("numDeriv") > library("mvtnorm") > > ### check mmlt for wild model combinations and weights > > set.seed(290875) > > chk <- function(x, y, tol = 1e-2) stopifnot(all.equal(x, y, tol = tol)) > > N <- 100 > J <- 3 > > ### weights > w <- as.double(sample(0:5, size = N, replace = TRUE)) > ### X1, X2, X3 correlated > z <- matrix(rnorm(N * J), nrow = J) > L <- ltMatrices(runif(J * (J - 1) / 2)) > y <- t(solve(standardize(L), z)) > ### uncorrelated ordered > x <- sample(gl(5, N / 5, ordered = TRUE)) > ### X3 right censored > e <- sample(c(TRUE, FALSE), size = N, replace = TRUE) > X3 <- exp(y[,3]) > X3 <- Surv(X3, event = e) > d <- data.frame(y[,1:2], X3, x, e) > dw <- d[rep(1:nrow(d), w),,drop = FALSE] > idx <- sample(1:N, size = N / 2) > > ### global options (speed-up estimation) > M <- 200 > args <- list(type = "ghalton", M = M) > op <- mltoptim() ### no hessian > > ### marginal models (use Lm to reduce number of parameters) > m1 <- Lm(X1 ~ 1, data = d) > m2 <- Lm(X2 ~ 1, data = d) > m3 <- Lm(X3 ~ 1, data = d) > m4 <- Polr(x ~ 1, data = d, method = "probit") > > ### joint distribution of X1, X2 (continuous), X3 (continuous and > ### right-censored) and x (discrete) > m <- mmlt(m1, m2, m3, m4, data = d, args = args, optim = op) > l1 <- logLik(m) > ## check gradient > s1 <- -colSums(estfun(m)) > s2 <- grad(function(parm) logLik(m, parm = parm), coef(m)) > chk(s2, unname(s1)) > L1 <- aperm(coef(m, type = "Lambda"), perm = c("X1", "X2", "X3", "x")) Error in aperm.ltMatrices(coef(m, type = "Lambda"), perm = c("X1", "X2", : Cannot permute objects of class ltMatrices, consider calling as.chol() or as.invchol() first Calls: aperm -> aperm.ltMatrices Execution halted