We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
With the new tidymodels offsets package (offsetreg), I realize that we have not documented that this can already be done:
library(tidymodels) library(offsetreg) library(poissonreg) us_deaths$offset <- log(us_deaths$population) fit <- poisson_reg() %>% fit(deaths ~ gender + age_group + year + offset(offset), data = us_deaths) tidy(fit) #> # A tibble: 9 × 5 #> term estimate std.error statistic p.value #> <chr> <dbl> <dbl> <dbl> <dbl> #> 1 (Intercept) -18.3 0.136 -135. 0 #> 2 genderMale 0.328 0.000388 845. 0 #> 3 age_group35-44 0.443 0.00177 250. 0 #> 4 age_group45-54 1.21 0.00155 780. 0 #> 5 age_group55-64 1.99 0.00146 1367. 0 #> 6 age_group65-74 2.71 0.00143 1899. 0 #> 7 age_group75-84 3.65 0.00141 2579. 0 #> 8 age_group85+ 4.77 0.00140 3402. 0 #> 9 year 0.00568 0.0000672 84.5 0``` <sup>Created on 2024-01-23 with [reprex v2.0.2](https://reprex.tidyverse.org)</sup>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
With the new tidymodels offsets package (offsetreg), I realize that we have not documented that this can already be done:
The text was updated successfully, but these errors were encountered: