Skip to content

Latest commit

 

History

History
27 lines (21 loc) · 620 Bytes

README.md

File metadata and controls

27 lines (21 loc) · 620 Bytes

hurdleNB

R-CMD-check

Hurdle negative binomial family for mgcv.

Install

# using remotes
# install.packages("remotes")
remotes::install_github("muskuloes/hurdleNB")

Example

library(mgcv)
library(hurdleNB)

set.seed(1)
n <- 400
dat <- gamSim(1, n = n)
dat$y <- rhurdleNB(dat$f / 4 - 1)

m <- gam(y ~ s(x0) + s(x1) + s(x2) + s(x3),
  data = dat, family = hurdleNB()
)