Learn R Programming

gratia (version 0.9.0)

nb_theta: Negative binomial parameter theta

Description

Negative binomial parameter theta

Usage

nb_theta(model)

# S3 method for gam nb_theta(model)

Value

A numeric vector of length 1 containing the estimated value of theta.

Arguments

model

a fitted model.

Methods (by class)

  • nb_theta(gam): Method for class "gam"

Examples

Run this code
load_mgcv()
df <- data_sim("eg1", n = 500, dist = "poisson", scale = 0.1, seed = 6)

m <- gam(y ~ s(x0, bs = "cr") + s(x1, bs = "cr") + s(x2, bs = "cr") +
  s(x3, bs = "cr"), family = nb, data = df, method = "REML")
## IGNORE_RDIFF_BEGIN
nb_theta(m)
## IGNORE_RDIFF_END

Run the code above in your browser using DataLab