How to conduct quasi poisson regression on count data by quarter in R

by user11992613   Last Updated September 12, 2019 04:19 AM

Given the following table/data with count data for 'local' across 6 quarters

      Var1  Var2 Freq
1  2015 Q3 Local 26
2  2015 Q4 Local 81
3  2016 Q1 Local 81
4  2016 Q2 Local 62
5  2016 Q3 Local 112
6  2016 Q4 Local 96

how do I run a quasi-poisson regression in R that shows me whether there is a trend in Freq across quarters? I have tried the following, which does not work as I want as it gives me one slope for each quarter included rather than 1 1 slope across all quarters.

frequency_UPA1_LG_glm = glm(Freq ~ Var1, family = "quasipoisson", data = frequency_UPA1_LG)
summary(frequency_UPA1_LG_glm)

partial output obtained:

Coefficients:
            Estimate Std. Error t value Pr(>|t|)
(Intercept)    3.258         NA      NA       NA
Var12015 Q4    1.136         NA      NA       NA
Var12016 Q1    1.136         NA      NA       NA
Var12016 Q2    0.869         NA      NA       NA
Var12016 Q3    1.460         NA      NA       NA


Related Questions


Correcting data using poisson-regression

Updated December 12, 2018 18:19 PM