Skip to content

tram

Transformation Models

v1.4-1 · Mar 7, 2026 · GPL-2

Description

Formula-based user-interfaces to specific transformation models implemented in package 'mlt' (<DOI:10.32614/CRAN.package.mlt>, <DOI:10.32614/CRAN.package.mlt.docreg>). Available models include Cox models, some parametric survival models (Weibull, etc.), models for ordered categorical variables, normal and non-normal (Box-Cox type) linear models, and continuous outcome logistic regression (Lohse et al., 2017, <DOI:10.12688/f1000research.12934.1>). The underlying theory is described in Hothorn et al. (2018) <DOI:10.1111/sjos.12291>. An extension to transformation models for clustered data is provided (Barbanti and Hothorn, 2022, <DOI:10.1093/biostatistics/kxac048>) and a tutorial explains applications in survival analysis (Siegfried et al., 2025, <DOI:10.48550/arXiv.2402.06428>). Multivariate conditional transformation models (Klein et al, 2022, <DOI:10.1111/sjos.12501>) and shift-scale transformation models (Siegfried et al, 2023, <DOI:10.1080/00031305.2023.2203177>) can be fitted as well. The package contains an implementation of a doubly robust score test, described in Kook et al. (2024, <DOI:10.1080/01621459.2024.2395588>).

Downloads

4.3K

Last 30 days

1809th

4.3K

Last 90 days

4.3K

Last year

CRAN Check Status

2 ERROR
12 OK
Show all 14 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc ERROR
r-devel-macos-arm64 OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 ERROR
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK
Check details (15 non-OK)
OK r-devel-linux-x86_64-debian-clang

*


            
OK r-devel-linux-x86_64-debian-gcc

*


            
OK r-devel-linux-x86_64-fedora-clang

*


            
ERROR r-devel-linux-x86_64-fedora-gcc

re-building of vignette outputs

Error(s) in re-building vignettes:
--- re-building ‘NAMI.Rnw’ using knitr
--- finished re-building ‘NAMI.Rnw’

--- re-building ‘mtram.Rnw’ using knitr
--- finished re-building ‘mtram.Rnw’

+-+mtram.pdf

 *** caught segfault ***
address 0x2070, cause 'memory not mapped'
An irrecoverable exception occurred. R is aborting now ...
--- re-building ‘survtram.Rnw’ using knitr
Warning in doTryCatch(return(expr), name, parentenv, handler) :
  semi-transparency is not supported on this device: reported only once per page
Warning in doTryCatch(return(expr), name, parentenv, handler) :
  semi-transparency is not supported on this device: reported only once per page
Warning in doTryCatch(return(expr), name, parentenv, handler) :
  semi-transparency is not supported on this device: reported only once per page
--- finished re-building ‘survtram.Rnw’

--- re-building ‘tram.Rnw’ using knitr
--- finished re-building ‘tram.Rnw’

SUMMARY: processing the following file failed:
  ‘mtram.Rnw’

Error: Vignette re-building failed.
Execution halted
OK r-devel-macos-arm64

*


            
OK r-devel-windows-x86_64

*


            
OK r-oldrel-macos-arm64

*


            
OK r-oldrel-macos-x86_64

*


            
OK r-oldrel-windows-x86_64

*


            
OK r-patched-linux-x86_64

*


            
WARNING r-release-linux-x86_64

Rd files

prepare_Rd: ./man/Aareg.Rd:55: unknown macro '\bibcitet'
prepare_Rd: ./man/Aareg.Rd:56: unknown macro '\bibcitet'
checkRd: (-1) Aareg.Rd:55: Lost braces
    55 | can be found in \bibcitet{tram::Hothorn:Moest:Buehlmann:2017} and
       |                          ^
checkRd: (-1) Aareg.Rd:56: Lost braces
    56 | \bibcitet{tram::Hothorn:2018}.
       |          ^
prepare_Rd: ./man/BoxCox.Rd:46: unknown macro '\bibcitep'
prepare_Rd: ./man/BoxCox.Rd:54: unknown macro '\bibcitet'
prepare_Rd: ./man/BoxCox.Rd:55: unknown macro '\bibcitet'
checkRd: (-1) BoxCox.Rd:46: Lost braces
    46 | This is similar to a Box-Cox transformation \bibcitep{tram::BoxCox:1964}, but the technical details
       |                                                      ^
checkRd: (-1) BoxCox.Rd:54: Lost braces
    54 | can be found in \bibcitet{tram::Hothorn:Moest:Buehlmann:2017} and
       |                          ^
checkRd: (-1) BoxCox.Rd:55: Lost braces
    55 | \bibcitet{tram::Hothorn:2018}.
       |          ^
prepare_Rd: ./man/Colr.Rd:58: unknown macro '\bibcitet'
prepare_Rd: ./man/Colr.Rd:59: unknown macro '\bibcitet'
checkRd: (-1) Colr.Rd:58: Lost braces
    58 | \bibcitet{tram::Lohse:Rohrmann:Faeh:2017} and
       |          ^
checkRd: (-1) Colr.Rd:59: Lost braces
    59 | \bibcitet{tram::Hothorn:Moest:Buehlmann:2017}.
       |          ^
prepare_Rd: ./man/Compris.Rd:77: unknown macro '\bibcitet'
prepare_Rd: ./man/Compris.Rd:78: unknown macro '\bibcitet'
prepare_Rd: ./man/Compris.Rd:79: unknown macro '\bibcitet'
checkRd: (-1) Compris.Rd:77: Lost braces
    77 | regression framework described by \bibcitet{tram::Czado:Keilegom:2022} and 
       |                                            ^
checkRd: (-1) Compris.Rd:78: Lost braces
    78 | \bibcitet{tram::Deresa:Keilegom:2023}, the implementation here is discussed
       |          ^
checkRd: (-1) Compris.Rd:79: Lost braces
    79 | in \bibcitet{tram::Siegfried:Tamasi:Hothorn:2026}.
       |             ^
prepare_Rd: ./man/Coxph.Rd:52: unknown macro '\bibcitet'
prepare_Rd: ./man/Coxph.Rd:62: unknown macro '\bibcitet'
prepare_Rd: ./man/Coxph.Rd:63: unknown macro '\bibcitet'
prepare_Rd: ./man/Coxph.Rd:64: unknown macro '\bibcitet'
checkRd: (-1) Coxph.Rd:52: Lost braces
    52 | \bibcitet{tram::McLain:Ghosh:2013}.
       |          ^
checkRd: (-1) Coxph.Rd:62: Lost braces
    62 | can be found in \bibcitet{tram::Hothorn:Moest:Buehlmann:2017},
       |                          ^
checkRd: (-1) Coxph.Rd:63: Lost braces
    63 | \bibcitet{tram::Siegfried:Tamasi:Hothorn:2026}, and
       |          ^
checkRd: (-1) Coxph.Rd:64: Lost braces
    64 | \bibcitet{tram::Hothorn:2018}.
       |          ^
prepare_Rd: ./man/Lehmann.Rd:44: unknown macro '\bibcitet'
checkRd: (-1) Lehmann.Rd:44: Lost braces
    44 | This transformation model, introduced by \bibcitet{tram::Lehmann:1953}, uses the cumulative distribution function for the
       |                                                   ^
prepare_Rd: ./man/Lm.Rd:60: unknown macro '\bibcitet'
prepare_Rd: ./man/Lm.Rd:61: unknown macro '\bibcitet'
checkRd: (-1) Lm.Rd:60: Lost braces
    60 | can be found in \bibcitet{tram::Hothorn:Moest:Buehlmann:2017} and
       |                          ^
checkRd: (-1) Lm.Rd:61: Lost braces
    61 | \bibcitet{tram::Hothorn:2018}.
       |          ^
prepare_Rd: ./man/Polr.Rd:60: unknown macro '\bibcitet'
prepare_Rd: ./man/Polr.Rd:61: unknown macro '\bibcitet'
checkRd: (-1) Polr.Rd:60: Lost braces
    60 | can be found in \bibcitet{tram::Hothorn:Moest:Buehlmann:2017} and
       |                          ^
checkRd: (-1) Polr.Rd:61: Lost braces
    61 | \bibcitet{tram::Hothorn:2018}.
       |          ^
prepare_Rd: ./man/Survreg.Rd:66: unknown macro '\bibcitet'
prepare_Rd: ./man/Survreg.Rd:67: unknown macro '\bibcitet'
prepare_Rd: ./man/Survreg.Rd:68: unknown macro '\bibcitet'
checkRd: (-1) Survreg.Rd:66: Lost braces
    66 | can be found in \bibcitet{tram::Hothorn:Moest:Buehlmann:2017},
       |                          ^
checkRd: (-1) Survreg.Rd:67: Lost braces
    67 | \bibcitet{tram::Siegfried:Tamasi:Hothorn:2026}, and
       |          ^
checkRd: (-1) Survreg.Rd:68: Lost braces
    68 | \bibcitet{tram::Hothorn:2018}.
       |          ^
prepare_Rd: ./man/mmlt.Rd:29: unknown macro '\bibcitet'
prepare_Rd: ./man/mmlt.Rd:31: unknown macro '\bibcitet'
prepare_Rd: ./man/mmlt.Rd:59: unknown macro '\bibcitet'
checkRd: (-1) mmlt.Rd:29: Lost braces
    29 | described by \bibcitet{tram::Klein:Hothorn:Barbanti:2020}. If \code{FALSE}, parameters can be
       |                       ^
checkRd: (-1) mmlt.Rd:31: Lost braces
    31 | \bibcitet{tram::Klein:Hothorn:Barbanti:2020}. Using \code{conditional = FALSE} with probit-only models
       |          ^
checkRd: (-1) mmlt.Rd:59: Lost braces
    59 |   as described by \bibcitet{tram::Klein:Hothorn:Barbanti:2020}. 
       |                            ^
prepare_Rd: ./man/mtram.Rd:43: unknown macro '\bibcitet'
checkRd: (-1) mtram.Rd:43: Lost braces
    43 |   \bibcitet{tram::Barbanti:Hothorn:2023} and examples are given in the \code{mtram} package vignette.
       |            ^
prepare_Rd: ./man/robust_score_test.Rd:60: unknown macro '\bibcitet'
checkRd: (-1) robust_score_test.Rd:60: Lost braces
    60 | see \bibcitet{tram::Kook:Saengkyongam:Lundborg:2024}.
       |              ^
prepare_Rd: ./man/score_test.Rd:45: unknown macro '\bibcitet'
checkRd: (-1) score_test.Rd:45: Lost braces
    45 |   Model scores are available from \bibcitet{tram::Hothorn:Moest:Buehlmann:2017}.
       |                                            ^
prepare_Rd: ./man/tram-methods.Rd:161: unknown macro '\bibcitet'
checkRd: (-1) tram-methods.Rd:161: Lost braces
   161 |   \bibcitet{tram::Sewak:Hothorn:2023}.
       |            ^
prepare_Rd: ./man/tram.Rd:156: unknown macro '\bibcitet'
prepare_Rd: ./man/tram.Rd:158: unknown macro '\bibcitet'
prepare_Rd: ./man/tram.Rd:159: unknown macro '\bibcitet'
checkRd: (-1) tram.Rd:156: Lost braces
   156 | is presented in \bibcitet{tram::Hothorn:Moest:Buehlmann:2017}, computational
       |                          ^
checkRd: (-1) tram.Rd:158: Lost braces
   158 | are discussed by \bibcitet{Hothorn:2018}. Location-scale transformation 
       |                           ^
checkRd: (-1) tram.Rd:159: Lost braces
   159 | models have been introduced by \bibcitet{tram::Siegfried:Kook:Hothorn:2023}.
       |                                         ^
ERROR r-release-linux-x86_64

tests

  Running ‘Coxph-Ex.R’ [10s/13s]
  Comparing ‘Coxph-Ex.Rout’ to ‘Coxph-Ex.Rout.save’ ... OK
  Running ‘KaplanMeier-Ex.R’ [2s/3s]
  Running ‘PI_OVL-Ex.R’ [4s/5s]
  Running ‘Polr-Ex.R’ [10s/12s]
  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’ [71s/87s]
  Running ‘intercepts-Ex.R’ [4s/5s]
  Comparing ‘intercepts-Ex.Rout’ to ‘intercepts-Ex.Rout.save’ ... OK
  Running ‘mmlt-Ex.R’ [144s/191s]
  Comparing ‘mmlt-Ex.Rout’ to ‘mmlt-Ex.Rout.save’ ...931c931
< [1] "Mean relative difference: 3.3"
---
> [1] TRUE
  Running ‘mmlt-interface.R’ [9s/12s]
  Running ‘mtram-Ex.R’ [10s/12s]
  Comparing ‘mtram-Ex.Rout’ to ‘mtram-Ex.Rout.save’ ...63,64d62
< attr(,"class")
< [1] "vcmat_us" "matrix"   "array"   
  Running ‘stram-Ex.R’ [27s/35s]
  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
OK r-release-macos-arm64

*


            
OK r-release-macos-x86_64

*


            
OK r-release-windows-x86_64

*


            

Check History

ERROR 12 OK · 0 NOTE · 0 WARNING · 2 ERROR · 0 FAILURE Mar 9, 2026
ERROR r-devel-linux-x86_64-fedora-gcc

re-building of vignette outputs

Error(s) in re-building vignettes:
--- re-building ‘NAMI.Rnw’ using knitr
--- finished re-building ‘NAMI.Rnw’

--- re-building ‘mtram.Rnw’ using knitr
--- finished re-building ‘mtram.Rnw’

+-+mtram.pdf

 *** caught segfault ***
address 0x2070, cause 'memory not mapped'
An irrecoverable exception occurred. R is aborting now ...
--- re-building ‘survtram.Rnw’ using knitr
Warning in doTryCatch(return(expr), name, parentenv, handler) :
  semi-transparency is not supported on this device: reported on
ERROR r-release-linux-x86_64

Rd files

prepare_Rd: ./man/Aareg.Rd:55: unknown macro '\bibcitet'
prepare_Rd: ./man/Aareg.Rd:56: unknown macro '\bibcitet'
checkRd: (-1) Aareg.Rd:55: Lost braces
    55 | can be found in \bibcitet{tram::Hothorn:Moest:Buehlmann:2017} and
       |                          ^
checkRd: (-1) Aareg.Rd:56: Lost braces
    56 | \bibcitet{tram::Hothorn:2018}.
       |          ^
prepare_Rd: ./man/BoxCox.Rd:46: unknown macro '\bibcitep'
prepare_Rd: ./man/BoxCox.Rd:54: unknown macro '\bibcitet'
prepare_Rd: ./man/Box

Reverse Dependencies (10)

imports

Dependency Network

Dependencies Reverse dependencies mlt mvtnorm Formula multcomp variables basefun sandwich survival Matrix cotram tramME tramnet tramvs trtf tramicp TH.data mlt.docreg multcomp tbm tram

Version History

new 1.4-1 Mar 9, 2026