Skip to contents

fitted() returns fitted response values from a drmTMB model. For univariate Gaussian, Student-t, Gamma, beta, beta-binomial, ordinary Poisson, ordinary negative-binomial, and cumulative-logit ordinal fits this is the fitted response summary. 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. For lognormal fits this is the arithmetic response mean, exp(mu + sigma^2 / 2).

Usage

# S3 method for class 'drmTMB'
fitted(object, ...)

Arguments

object

A drmTMB fit.

...

Reserved for future fitted-value options.

Value

A numeric vector for univariate fits, or a two-column matrix for bivariate Gaussian 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.