appliedepi / epiRhandbook_eng

The repository for the English version of the Epidemiologist R Handbook
Other
91 stars 56 forks source link

trending fix #145

Open nsbatra opened 8 months ago

nsbatra commented 8 months ago

At very end of time series chapter: Fix by switching get_model() to get_result, then extract first list item to allow tidy() to work.

fitted_model %>%

extraia a regressão original negativa binominal

get_result() %>%

extrair o primeiro elemento da lista, consequência das alterações de pacotes de tendências.

simplify() %>% first() %>%

rfhowarth3 commented 8 months ago

Hi, I am working through the interrupted time series section of the time series analysis chapter (https://epirhandbook.com/en/time-series-and-outbreak-detection.html#interrupted-timeseries).

I am still getting an error message using this code:

fitted_model %>% get_result() %>% simplify() %>% first() %>% tidy(exponentiate = TRUE, conf.int = TRUE) ...

Error in UseMethod("tidy") : no applicable method for 'tidy' applied to an object of class "c('negbin', 'glm', 'lm')"

Any suggestions would be most appreciated!

rfhowarth3 commented 8 months ago

Worked after loading the broom package!