Running ‘Coxph-Ex.R’ [10s/14s]
  Comparing ‘Coxph-Ex.Rout’ to ‘Coxph-Ex.Rout.save’ ... OK
  Running ‘KaplanMeier-Ex.R’ [2s/2s]
  Running ‘PI_OVL-Ex.R’ [2s/3s]
  Running ‘Polr-Ex.R’ [2s/2s]
  Comparing ‘Polr-Ex.Rout’ to ‘Polr-Ex.Rout.save’ ... OK
  Running ‘Survreg-Ex.R’ [4s/5s]
  Comparing ‘Survreg-Ex.Rout’ to ‘Survreg-Ex.Rout.save’ ... OK
  Running ‘bugfixes.R’ [10s/13s]
  Running ‘intercepts-Ex.R’ [3s/4s]
  Comparing ‘intercepts-Ex.Rout’ to ‘intercepts-Ex.Rout.save’ ... OK
  Running ‘mmlt-Ex.R’ [79s/89s]
  Comparing ‘mmlt-Ex.Rout’ to ‘mmlt-Ex.Rout.save’ ... OK
  Running ‘mmlt-interface.R’ [28s/35s]
  Running ‘mtram-Ex.R’ [9s/12s]
  Comparing ‘mtram-Ex.Rout’ to ‘mtram-Ex.Rout.save’ ... OK
  Running ‘stram-Ex.R’ [10s/11s]
  Comparing ‘stram-Ex.Rout’ to ‘stram-Ex.Rout.save’ ... OK
Running the tests in ‘tests/bugfixes.R’ failed.
Complete output:
  > 
  > library("tram")
  Loading required package: mlt
  Loading required package: basefun
  Loading required package: variables
  Loading required package: mvtnorm
  > library("sandwich")
  > library("survival")
  > library("numDeriv")
  > 
  > ### scores for fixed parameters
  > cars$int <- 1
  > a0 <- Lm(dist ~ speed, data = cars)
  > a1 <- Lm(dist ~ speed + int, data = cars, fixed = c("int" = 0))
  > 
  > s0 <- estfun(a0)
  > s1 <- estfun(a1)
  > s2 <- estfun(a1, parm = coef(as.mlt(a1), fixed = TRUE))
  > 
  > stopifnot(all.equal(s0[,"(Intercept)"], -s2[,"int"]))
  > stopifnot(all.equal(s1[,"(Intercept)"], -s2[,"int"]))
  > stopifnot(all.equal(s2[,"(Intercept)"], -s2[,"int"]))
  > 
  > ### log_first for count data (by Sandra Siegfried)
  > ### use: y + 1; log_first = TRUE, support = c(1, ...), bounds = c(1, ...)
  > set.seed(29)
  > 
  > Nsim <- 100
  > n <- 4000
  > b1 <- -4.5
  > b0 <- 5
  > theta <- 2
  > 
  > h <- qlogis(ppois(0:100, lambda = 5))
  > 
  > x <- runif(n, min = 0, max = 1) 
  > log.mu <- b0 + b1 * x
  > 
  > h.m <- matrix(h, nrow = length(h), ncol = length(x)) 
  > p <- (plogis(t(h.m) - b1 * x) - runif(n))^2
  > y <- max.col(-p) - 1
  > 
  > d <- data.frame(x = x, y = as.integer(y))
  > d$y.p1 <- d$y + 1L
  > 
  > m1 <- Colr(y ~ x, data = d,
  +                   support = c(0L, as.numeric(max(d$y))),
  +                   bounds = c(0L, Inf),
  +                   order = 10)
  > 
  > try(m2a <- Colr(y ~ x, data = d,
  +                   support = c(1L, as.numeric(max(d$y))),
  +                   bounds = c(1L, Inf),
  +                   log_first = TRUE,
  +                   order = 10))
  Error in mlt(model = structure(list(model = structure(list(bresponse = structure(function (data,  : 
    check(responsevar, data) is not TRUE
  > 
  > try(m2b <- Colr(y ~ x, data = d,
  +                   support = c(1L, as.numeric(max(d$y))),
  +                   bounds = c(0L, Inf),
  +                   log_first = TRUE,
  +                   order = 10))
  Error in mlt(model = structure(list(model = structure(list(bresponse = structure(function (data,  : 
    check(responsevar, data) is not TRUE
  > 
  > m3 <- Colr(y.p1 ~ x, data = d,
  +                   support = c(1L, as.numeric(max(d$y.p1))),
  +                   bounds = c(1L, Inf),
  +                   log_first = TRUE,
  +                   order = 10)
  > 
  > l1 <- m1$logliki(coef(as.mlt(m1)), rep(1, nrow(d)))
  > l3 <- m3$logliki(coef(as.mlt(m3)), rep(1, nrow(d)))
  > stopifnot(cor(l1, l3) > .96)
  > 
  > ### 0.3-0
  > data("GBSG2", package = "TH.data")
  > ### this model included an additional intercept
  > m1 <- Coxph(Surv(time, cens) | menostat:tgrade ~ horTh, data = GBSG2)
  > m2 <- Coxph(Surv(time, cens) | 0 + menostat:tgrade ~ horTh, data = GBSG2)
  > stopifnot(max(abs(coef(as.mlt(m1)) - coef(as.mlt(m2)))) < 
  +           sqrt(.Machine$double.eps))
  > ### interaction term with stratum
  > m3 <- Coxph(Surv(time, cens) | horTh ~ menostat + menostat:horTh, 
  +             data = GBSG2)
  > ci <- confint(m3)["menostatPre:horThyes",]
  > stopifnot(all(!is.finite(ci)))
  Error: all(!is.finite(ci)) is not TRUE
  Execution halted