Skip to main content
Statistics LibreTexts

17.7: End-of-Chapter Materials

  • Page ID
    57800
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\dsum}{\displaystyle\sum\limits} \)

    \( \newcommand{\dint}{\displaystyle\int\limits} \)

    \( \newcommand{\dlim}{\displaystyle\lim\limits} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \(\newcommand{\longvect}{\overrightarrow}\)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    R Functions

    In this chapter, we were introduced to several R functions that will be useful in the future. These are listed here.

    Packages

    • MASS
      This package is another "book package –- a package created for a specific book. Here, that book is "Modern Applied Statistics with S," by William N. Venables and Brian D. Ripley (2004).

    Statistics

    • glm(formula)
      This function performs generalized linear model estimation on the given formula. There are three additional parameters that can (and often should) be specified.
      • The family parameter specifies the distributional family of the dependent variable. This chapter we looked at poisson and quasipoisson.
      • The link parameter specifies the link function for the distribution. If none is specified, the canonical link is assumed. For the Poisson, that canonical link is the logarithm
      • Finally, the data parameter specifies the data from which the formula variables come.
    • glm.nb(formula)
      As Negative Binomial regression is fit using different methods, it cannot be included in the base glm command. To use the glm.nb command, you must include the (very helpful) MASS package in your script, library(MASS). The output of the glm.nb function is similar to that of the normal glm command, with the inclusion of an estimate for \(\theta\) and its standard error. If \(\theta = 1\), then the Poisson model may be appropriate.
      • offset
        The offset function (or function parameter) allows us to include known varying values in our regression. The variable included as an offset will not have an effect parameter estimated for it.
    • predict(model, newdata)
      As with almost all statistical packages, R has a predict function. It takes two parameters, the model, and a dataframe of the independent values from which you want to predict. If you omit newdata, then it will predict based on the independent variables of the data itself, which can be used to calculate residuals. The dataframe must list all independent variables with their associate new values. You can specify multiple new values for a single independent variable.

    Exercises

    1. Show that \(E[Y]=\lambda\) and \(V[Y]=\lambda\) using the methods of Section 14.2: The Requirements for GLMs.
    2. The citizens' initiaitive example mentioned that California was an outlier in this model. First, plot the initiative data with California included. Second, appropriately fit the model with California included and interpret the coefficients. Finally, predict the number of initiatives Utah would have (a population of 1,722,850).
    3. In Section 17.3: Overdispersion, we fit the initiative data using the Negative Binomial distribution. I made the statement that this model predicted 7.9 initiatives for Utah in the 1990s. Please graph the data, plot the prediction curve, and predict the number of initiatives Utah will have in the 1990s. Finally compare the results between the model with California and the model without California.
    4. Estimate the number of initiatives that Utah had during the 1990s.
    5. Given the probability mass function in Section 17.3: Overdispersion , prove \(\E[Y] = \mu\) and \(V[Y]=\mu + \mu^2/\theta\).
    6. Given the definition of the Negative Binomial distribution, prove that an overdispersion of \(\theta = \infty\) reduces the Negative Binomial to a Poisson.

    Applied Readings

    • Richard Berk and John M. MacDonald (2008). "Overdispersion and Poisson Regression ." Journal of Quantitative Criminology. 24(3): 269–284.
    • M. Katherine Hutchinson and Matthew C. Holtman (2005). "Analysis of Count Data using Poisson Regression." Research in Nursing & Health. 28(5): 408–418.
    • Dana Loomis, David B. Richardson, and L. Elliott (2005). "Poisson Regression Analysis of Ungrouped Data." Occupational and Environmental Medicine. 62(5): 325–329.
    • Katarina A. McDonnell and Neil J. Holbrook (2004). "A Poisson Regression Model of Tropical Cyclogenesis for the Australian–Southwest Pacific Ocean Region." Weather & Forecasting. 19(2): 440–455.
    • Ron Michener and Carla Tighe (1992). "A Poisson Regression Model of Highway Fatalities." American Economic Review. 82(2): 452–456.
    • Marta N. Vacchino (1999). "Poisson Regression in Mapping Cancer Mortality." Environmental Research. 81(1): 1–17.
    • Weiren Wang and Felix Famoye (1997). "Modeling Household Fertility Decisions with Generalized Poisson Regression." Journal of Population Economics. 10(3): 273–283.
    • Lisa A. White (2009). Predicting Hospital Admissions with Poisson Regression Analysis. Masters Thesis. Naval Post-Graduate School.

    Theory Readings

    • Kurt Brannas (1992). "Limited Dependent Poisson Regression." Journal of the Royal Statistical Society, Series D (The Statistician). 41(4): 413–423.
    • A. Colin Cameron and Pravin K. Trivedi. (1998) Regression Analysis of Count Data. New York: Cambridge University Press.
    • Edward L. Frome (1981). "Poisson Regression Analysis." The American Statistician. 35(4): 262–263.
    • Jie Q. Guoa and Tong Li (2002). "Poisson Regression Models with Errors-in-Variables: Implication and treatment." Journal of Statistical Planning and Inference. 104(2): 391–401.
    • Alexander Kukush, Hans Schneeweis, and Roland Wolf (2004). "Three Estimators for the Poisson Regression Model with Measurement Errors." Statistical Papers. 45(3): 351–368.
    • Alfonso Palmer, J. M. Losilla, J. Vives, and R. Jiménez (2007). "Overdispersion in the Poisson Regression Model: A comparative simulation study." Methodology: European Journal of Research Methods for the Behavioral and Social Sciences. 3(3): 89–99.
    • Tsung-Shan Tsou (2006). "Robust Poisson Regression." Journal of Statistical Planning and Inference. 136(9): 3173–3186.
    • William N. Venables and Brian D. Ripley (2004). Modern Applied Statistics with S, 4th edition. New York: Springer.
    • Rainer Winkelmann (2000). Econometric Analysis of Count Data. New York: Springer.
    • Liming Xiang and Andy H. Lee (2005). "Sensitivity of Test for Overdispersion in Poisson Regression." Biometrical Journal. 47(2): 167–176.
    • Feng-Chang Xie and Bo-Cheng Wei (2009). "Diagnostics for generalized Poisson regression models with errors in variables." Journal of Statistical Computation & Simulation. 79(7): 909–922.

    This page titled 17.7: End-of-Chapter Materials is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Ole Forsberg.

    • Was this article helpful?