fitted() returns fitted response values from a drmTMB model. For
univariate Gaussian, Student-t, Gamma, Tweedie, beta, beta-binomial,
ordinary Poisson, ordinary negative-binomial, and cumulative-logit ordinal
fits this is the fitted response summary. For Tweedie fits, that summary is
the unconditional response mean mu. For beta-binomial fits, that summary is
the fitted success probability mu. For ordinal fits, that summary is the expected
ordered category score, sum_k k * Pr(y_i = k). For zero-truncated
negative-binomial 2 fits this is the positive-count mean
mu / (1 - Pr_NB2(0)), where mu is the untruncated NB2 component mean.
For hurdle negative-binomial 2 fits this is the unconditional response mean
(1 - hu) * mu / (1 - Pr_NB2(0)).
For zero-inflated Poisson and zero-inflated negative-binomial 2 fits this is
the unconditional response mean (1 - zi) * mu, where mu is the
conditional count mean. For bivariate Gaussian fits this is a two-column
matrix with mu1 and mu2. The same two-column marginal-mean contract
applies to bivariate Student-t fits because their shared nu is greater
than 2. For bivariate lognormal fits it is a two-column matrix of arithmetic
marginal means. For lognormal fits this is the arithmetic response mean,
exp(mu + sigma^2 / 2).
Usage
# S3 method for class 'drmTMB'
fitted(object, ...)Value
A numeric vector for univariate fits, or a two-column matrix for bivariate Gaussian, bivariate lognormal, or bivariate Student-t fits.
Details
Fitted values are returned for the original fitted rows. Use predict() for
new data or for non-location distributional parameters such as sigma or
rho12.