One of the built in datasets in R is called InsectSprays and is accessed by writing InsectSprays.The data set consists of 72 observations of two variables from different agricultural fields. The variables are:

Fit a generalized linear model with canonical link to the data. Use count as the response and the factor spray as a covariate. Do not include an intercept term in the model. You may also need to perform additional commands (in addition to fitting the model) on your fitted GLM-object.

Based on your data analysis answer the following questions:

  1. Which type of GLM did you fit? Multiple choice: Binary, Poisson, Normal,Gamma, Other.

  2. Which link function did you use? Multiple choice: Identity, log, exp, logit, inverse, negative inverse, other.

  3. What is the estimated regression coefficient for effect of spray of category A? Numerical answer.

  4. What is the estimated variance of the regression coefficient for the effect of spray of category C? Numerical answer.

  5. Perform a deviance test and report the p-value. Numerical answer

  6. Is the conclusion from the deviance test that our model is good? True/false.

  7. Give the estimated covariance between the estimated effect of spray B and spray F. Numerical value.

  8. Perform an test with \(H_0\) stating that the regression coefficient of for spray B is equal to the regression coefficient for spray F, vs. the two-sided alternative. Report the p-value from this test. Numerical value.