Skip to contents

truncated_nbinom2() defines a one-response positive-count distribution with formulas for the untruncated NB2 mean mu and overdispersion scale sigma.

Usage

truncated_nbinom2()

Value

A drm_family object.

Details

Adding hu ~ predictors to the model formula fits the corresponding hurdle NB2 model: hu is the probability of a hurdle zero, and nonzero counts are drawn from the zero-truncated NB2 component.

The implemented contract is log(mu) = eta_mu, log(sigma) = eta_sigma, and the count response is distributed as NB2 conditional on being greater than zero. The untruncated NB2 variance is Var(y) = mu + sigma^2 * mu^2, with internal size = 1 / sigma^2.

Examples

truncated_nbinom2()
#> $name
#> [1] "truncated_nbinom2"
#> 
#> $family
#> [1] "truncated_nbinom2"
#> 
#> $n_response
#> [1] 1
#> 
#> $dpars
#> [1] "mu"    "sigma"
#> 
#> $links
#>    mu sigma 
#> "log" "log" 
#> 
#> attr(,"class")
#> [1] "drm_family"