cotram: Count Transformation Models

Description Usage Arguments Details Value References Examples

View source: R/models.R


Likelihood-based count transformation models for fully parameterised discrete conditional distribution functions. The link function governing the interpretation of the predictor can be chosen and results in discrete hazard ratios, odds ratios, reverse time hazard ratios or conditional expectation of transformed counts.


cotram(formula, data, method = c("logit", "cloglog", "loglog", "probit"),
       log_first = TRUE, plus_one = log_first, prob = 0.9,	
       subset, weights, offset, cluster, na.action = na.omit, ...)



an object of class "formula": a symbolic description of the model structure to be fitted. The details of model specification are given under tram and in the package vignette.


an optional data frame, list or environment (or object coercible by to a data frame) containing the variables in the model. If not found in data, the variables are taken from environment(formula).


character specifying the choice of the link function, mapping the transformation function into probabilities. Available choices include the logit, complementary log-log, log-log or probit link. The different link functions govern the interpretation of the linear predictor. Details of the interpretation can be found in the package vignette.


probability giving the quantile of the response defining the upper limit of the support of a smooth Bernstein polynomial.


logical; if TRUE, a Bernstein polynomial is defined on the log-scale.


logical; if TRUE, a Bernstein polynomial of (y + 1) is defined.


an optional vector specifying a subset of observations to be used in the fitting process.


an optional vector of weights to be used in the fitting process. Should be NULL or a numeric vector. If present, the weighted log-likelihood is maximised.


this can be used to specify an _a priori_ known component to be included in the linear predictor during fitting. This should be NULL or a numeric vector of length equal to the number of cases.


optional factor with a cluster ID employed for computing clustered covariances.


a function which indicates what should happen when the data contain NAs. The default is set to na.omit.


additional arguments to tram.


Likelihood-based estimation of a fully parameterised conditional discrete distribution function for count data, while ensuring interpretability of the linear predictors. The models are defined with a negative shift term relating positive predictors to larger values of the conditional mean. For the model with logistic or cloglog link exp(-coef()) is the multiplicative change of discrete odds-ratios or hazard ratios. For the model with loglog link exp(coef()) is the multiplicative change of the reverse time hazard ratios. Applying a transformation model with probit link coef() gives the conditional expectation of the transformed link, with transformation function estimated from data.


An object of class cotram and tram, with corresponding coef, vcov, logLik, summary, print, plot and predict methods.


Sandra Siegfried, Torsten Hothorn (2020), Count Transformation Models, Methods in Ecology and Evolution, doi: 10.1111/2041-210X.13383.

Torsten Hothorn, Lisa Moest, Peter Buehlmann (2018), Most Likely Transformations, Scandinavian Journal of Statistics, 45(1), 110–134, doi: 10.1111/sjos.12291.

Torsten Hothorn (2020), Most Likely Transformations: The mlt Package, Journal of Statistical Software, 92(1), 1–68, doi: 10.18637/jss.v092.i01.


  data("birds", package = "")
  cotram(SG5 ~ AOT + AFS + GST + DBH + DWC + LOG, data = birds)

cotram documentation built on Feb. 24, 2021, 5:08 p.m.