Example

Let's fit a model to the data from Agresti (2007) Table 7.6:

library(poissonreg)
library(tidymodels)
tidymodels_prefer()

log_lin_fit <-
  # Define the model
  poisson_reg() %>%
  # Choose an engine for fitting. The default is 'glm' so
  # this next line is not strictly needed:
  set_engine("glm") %>%
  # Fit the model to the data:
  fit(count ~ (.)^2, data = seniors)

log_lin_fit

The different engines for the model that are provided by this package are:

show_engines("poisson_reg")


Try the poissonreg package in your browser

Any scripts or data that you put into this service are public.

poissonreg documentation built on Aug. 22, 2022, 5:07 p.m.