cotram {cotram} | R Documentation |
Count Transformation Models
Description
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.
Usage
cotram(formula, data, method = c("logit", "cloglog", "loglog", "probit"),
log_first = TRUE, prob = 0.9, subset, weights, offset, cluster,
na.action = na.omit, ...)
Arguments
formula |
an object of class |
data |
an optional data frame, list or environment (or object
coercible by |
method |
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. |
prob |
probability giving the quantile of the response defining the upper limit of the support of a smooth Bernstein polynomial (with the lower limit being set to 0). If a vector of two probabilites is specified, the corresponding quantiles of the response define the lower and upper limit of the support, respectively. Note, that the support is rounded to integer values. |
log_first |
logical; if |
subset |
an optional vector specifying a subset of observations to be used in the fitting process. |
weights |
an optional vector of weights to be used in the fitting
process. Should be |
offset |
this can be used to specify an _a priori_ known component to
be included in the linear predictor during fitting. This
should be |
cluster |
optional factor with a cluster ID employed for computing clustered covariances. |
na.action |
a function which indicates what should happen when the data
contain |
... |
additional arguments to |
Details
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 counts,
with transformation function estimated from data.
Value
An object of class cotram
and tram
, with corresponding coef
,
vcov
, logLik
, summary
,
print
, plot
and predict
methods.
References
Sandra Siegfried, Torsten Hothorn (2020), Count Transformation Models, Methods in Ecology and Evolution, 11(7), 818–827, doi:10.1111/2041-210X.13383.
Torsten Hothorn, Lisa Möst, Peter Bühlmann (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.
Examples
op <- options(digits = 2)
data("birds", package = "TH.data")
cotram(SG5 ~ AOT + AFS + GST + DBH + DWC + LOG, data = birds)
options(op)