model_birds_glm | R Documentation |
Fit GLMs for one or more species based on island-wide counts.
model_birds_glm( dat, family = "poisson", species_formulas = NULL, response = "Count", choose_terms = c("Year", "Year2", "Qtr"), fix_terms = "N_Stations", depends = tibble(term = "Year2", on = "Year"), robust_se = FALSE, verbose = TRUE )
dat |
Dataframe with counts and predictors for each species to be modeled |
family |
Family of GLM to apply to data. One of "poisson", "negative binomial", or "auto". |
species_formulas |
Optional - tibble with two columns: Species_Code and formulas. Each entry of formulas should be a list of valid formula character vectors. |
response |
Optional - name of response column. Default is Count. |
choose_terms |
Optional - names of terms selected by AIC. Defaults are Year, Year2, and Qtr. |
fix_terms |
Optional - names of terms always included in model. Defaults to N_Stations. |
depends |
Optional - tibble with two columns: term and on. term is a name in choose_terms and is another name from choose_terms that term depends on. Default has term = Year2, on = Year. |
robust_se |
Flag for including HAC robust standard errors from package 'sandwich' in plots. |
verbose |
Flag for printing timing and progress updates. |
A tibble with species_code (char), models (list of glm objects), fit_plots, back_trans_plots, resid_plots, and unexp_plots (all lists of ggplots)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.