Skip to content

Commit 189b692

Browse files
authored
Merge pull request #19 from gamlj/Version.3.0.3
updates
2 parents ea63f23 + 25a2340 commit 189b692

21 files changed

+520
-63
lines changed

docs/book/a1dummies.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,12 @@
301301
<li class="chapter" data-level="3.6.10" data-path="gzlm.html"><a href="gzlm.html#plot-1"><i class="fa fa-check"></i><b>3.6.10</b> Plot</a></li>
302302
<li class="chapter" data-level="3.6.11" data-path="gzlm.html"><a href="gzlm.html#other-options-2"><i class="fa fa-check"></i><b>3.6.11</b> Other options</a></li>
303303
</ul></li>
304-
<li class="chapter" data-level="3.7" data-path="gzlm.html"><a href="gzlm.html#poisson-model"><i class="fa fa-check"></i><b>3.7</b> Poisson Model</a></li>
304+
<li class="chapter" data-level="3.7" data-path="gzlm.html"><a href="gzlm.html#poisson"><i class="fa fa-check"></i><b>3.7</b> The Poisson Model</a>
305+
<ul>
306+
<li class="chapter" data-level="3.7.1" data-path="gzlm.html"><a href="gzlm.html#distribution"><i class="fa fa-check"></i><b>3.7.1</b> Distribution</a></li>
307+
<li class="chapter" data-level="3.7.2" data-path="gzlm.html"><a href="gzlm.html#link-function"><i class="fa fa-check"></i><b>3.7.2</b> Link function</a></li>
308+
<li class="chapter" data-level="3.7.3" data-path="gzlm.html"><a href="gzlm.html#estimating-the-model"><i class="fa fa-check"></i><b>3.7.3</b> Estimating the model</a></li>
309+
</ul></li>
305310
</ul></li>
306311
<li class="chapter" data-level="4" data-path="mixed.html"><a href="mixed.html"><i class="fa fa-check"></i><b>4</b> Mixed Linear Models</a>
307312
<ul>

docs/book/appendixa.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,12 @@
301301
<li class="chapter" data-level="3.6.10" data-path="gzlm.html"><a href="gzlm.html#plot-1"><i class="fa fa-check"></i><b>3.6.10</b> Plot</a></li>
302302
<li class="chapter" data-level="3.6.11" data-path="gzlm.html"><a href="gzlm.html#other-options-2"><i class="fa fa-check"></i><b>3.6.11</b> Other options</a></li>
303303
</ul></li>
304-
<li class="chapter" data-level="3.7" data-path="gzlm.html"><a href="gzlm.html#poisson-model"><i class="fa fa-check"></i><b>3.7</b> Poisson Model</a></li>
304+
<li class="chapter" data-level="3.7" data-path="gzlm.html"><a href="gzlm.html#poisson"><i class="fa fa-check"></i><b>3.7</b> The Poisson Model</a>
305+
<ul>
306+
<li class="chapter" data-level="3.7.1" data-path="gzlm.html"><a href="gzlm.html#distribution"><i class="fa fa-check"></i><b>3.7.1</b> Distribution</a></li>
307+
<li class="chapter" data-level="3.7.2" data-path="gzlm.html"><a href="gzlm.html#link-function"><i class="fa fa-check"></i><b>3.7.2</b> Link function</a></li>
308+
<li class="chapter" data-level="3.7.3" data-path="gzlm.html"><a href="gzlm.html#estimating-the-model"><i class="fa fa-check"></i><b>3.7.3</b> Estimating the model</a></li>
309+
</ul></li>
305310
</ul></li>
306311
<li class="chapter" data-level="4" data-path="mixed.html"><a href="mixed.html"><i class="fa fa-check"></i><b>4</b> Mixed Linear Models</a>
307312
<ul>

docs/book/appendixb.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,12 @@
301301
<li class="chapter" data-level="3.6.10" data-path="gzlm.html"><a href="gzlm.html#plot-1"><i class="fa fa-check"></i><b>3.6.10</b> Plot</a></li>
302302
<li class="chapter" data-level="3.6.11" data-path="gzlm.html"><a href="gzlm.html#other-options-2"><i class="fa fa-check"></i><b>3.6.11</b> Other options</a></li>
303303
</ul></li>
304-
<li class="chapter" data-level="3.7" data-path="gzlm.html"><a href="gzlm.html#poisson-model"><i class="fa fa-check"></i><b>3.7</b> Poisson Model</a></li>
304+
<li class="chapter" data-level="3.7" data-path="gzlm.html"><a href="gzlm.html#poisson"><i class="fa fa-check"></i><b>3.7</b> The Poisson Model</a>
305+
<ul>
306+
<li class="chapter" data-level="3.7.1" data-path="gzlm.html"><a href="gzlm.html#distribution"><i class="fa fa-check"></i><b>3.7.1</b> Distribution</a></li>
307+
<li class="chapter" data-level="3.7.2" data-path="gzlm.html"><a href="gzlm.html#link-function"><i class="fa fa-check"></i><b>3.7.2</b> Link function</a></li>
308+
<li class="chapter" data-level="3.7.3" data-path="gzlm.html"><a href="gzlm.html#estimating-the-model"><i class="fa fa-check"></i><b>3.7.3</b> Estimating the model</a></li>
309+
</ul></li>
305310
</ul></li>
306311
<li class="chapter" data-level="4" data-path="mixed.html"><a href="mixed.html"><i class="fa fa-check"></i><b>4</b> Mixed Linear Models</a>
307312
<ul>

docs/book/booklet.html

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,12 @@
301301
<li class="chapter" data-level="3.6.10" data-path="gzlm.html"><a href="gzlm.html#plot-1"><i class="fa fa-check"></i><b>3.6.10</b> Plot</a></li>
302302
<li class="chapter" data-level="3.6.11" data-path="gzlm.html"><a href="gzlm.html#other-options-2"><i class="fa fa-check"></i><b>3.6.11</b> Other options</a></li>
303303
</ul></li>
304-
<li class="chapter" data-level="3.7" data-path="gzlm.html"><a href="gzlm.html#poisson-model"><i class="fa fa-check"></i><b>3.7</b> Poisson Model</a></li>
304+
<li class="chapter" data-level="3.7" data-path="gzlm.html"><a href="gzlm.html#poisson"><i class="fa fa-check"></i><b>3.7</b> The Poisson Model</a>
305+
<ul>
306+
<li class="chapter" data-level="3.7.1" data-path="gzlm.html"><a href="gzlm.html#distribution"><i class="fa fa-check"></i><b>3.7.1</b> Distribution</a></li>
307+
<li class="chapter" data-level="3.7.2" data-path="gzlm.html"><a href="gzlm.html#link-function"><i class="fa fa-check"></i><b>3.7.2</b> Link function</a></li>
308+
<li class="chapter" data-level="3.7.3" data-path="gzlm.html"><a href="gzlm.html#estimating-the-model"><i class="fa fa-check"></i><b>3.7.3</b> Estimating the model</a></li>
309+
</ul></li>
305310
</ul></li>
306311
<li class="chapter" data-level="4" data-path="mixed.html"><a href="mixed.html"><i class="fa fa-check"></i><b>4</b> Mixed Linear Models</a>
307312
<ul>
@@ -396,7 +401,7 @@ <h2><span class="header-section-number">1.1</span> Preface<a href="booklet.html#
396401
<li>Probit model (<a href="gzlm.html#probit">3.4</a>)</li>
397402
<li>Multinomial model (<a href="gzlm.html#multinomial">3.5</a>)</li>
398403
<li>Multinomial model (<a href="gzlm.html#ordinal">3.6</a>)</li>
399-
<li>Poisson model (<a href="#poisson"><strong>??</strong></a>)</li>
404+
<li>Poisson model (<a href="gzlm.html#poisson">3.7</a>)</li>
400405
<li>Negative binomial model (<a href="#nb"><strong>??</strong></a>)</li>
401406
</ul></li>
402407
<li>The linear mixed model (<a href="mixed.html#mixed">4</a>)
7.77 KB
Loading
21.8 KB
Loading

docs/book/gamljmodels.pdf

28.2 KB
Binary file not shown.

docs/book/gamljmodels.tex

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1549,8 +1549,11 @@ \subsection{Other options}\label{other-options-2}}
15491549

15501550
All other options, {Simple Interactions}, {Factor Coding}, {Covariates Scaling}, {Bootstrap} confidence intervals, {Model comparison} etc. are the same as in the GLM.
15511551

1552-
\hypertarget{poisson-model}{%
1553-
\section{Poisson Model}\label{poisson-model}}
1552+
\hypertarget{poisson}{%
1553+
\section{The Poisson Model}\label{poisson}}
1554+
1555+
\hypertarget{distribution}{%
1556+
\subsection{Distribution}\label{distribution}}
15541557

15551558
Very often, rather than measuring quantities we count stuff. For example, we may have a dependent variable that indicates the number of smartphones a person possesses, the count of close friends a teenager has, or the frequency of email checks per hour. These variables are referred to as count data, where the variable scores represent frequencies rather than actual quantities.''
15561559

@@ -1570,6 +1573,37 @@ \section{Poisson Model}\label{poisson-model}}
15701573

15711574
The distribution that acount for this beavhior of count data is called the \emph{Poisson distribution} and it models count data very well when events are rare, thus when the average count is low. The Possisson distribition is a probability distribution that models the number of events that occur within a fixed interval of time or space when these events occur independently and at a constant average rate. It applies to whole numbers (integers) and its shape depends on its mean, that is the average rate of occurrence of the events within the given interval.
15721575

1576+
\hypertarget{link-function}{%
1577+
\subsection{Link function}\label{link-function}}
1578+
1579+
Consider a count variable such as the one depicted in the following histogram:
1580+
1581+
\includegraphics[width=0.6\linewidth]{bookletpics/3_poisson_theory4}
1582+
1583+
Assuming a positive correlation between the count variable and a continuous variable, when we examine the relationship on a scatterplot, it becomes evident that a straight line is insufficient to capture the pattern accurately. Specifically, when the count variable is zero, the straight line would be horizontal, failing to capture the subsequent increase reflecting the positive relationship between the variables.
1584+
1585+
\includegraphics[width=0.6\linewidth]{bookletpics/3_poisson_theory5}
1586+
1587+
A more suitable approach would be to employ an exponential function to accurately describe the relationship between the variables.
1588+
1589+
\includegraphics[width=0.6\linewidth]{bookletpics/3_poisson_theory5}
1590+
1591+
This would mean defining the model
1592+
1593+
\[
1594+
\hat{y}_i=e^{(a+bx_i)}
1595+
\]
1596+
where \(e^x\) means the exponential of \(x\). However, we prefer to work with linear models, so we linearize the model by taking the logarithm of both size, which gives (recall that \(ln(e^x)=x\)):
1597+
1598+
\[
1599+
ln(\hat{y}_i)=a+bx_i
1600+
\]
1601+
1602+
The Poisson model is a generalized linear model in which the predicted values are represented as the logarithm of the counts of the dependent variable, following a Poisson distribution. The regression coefficients in this model indicate the change in the logarithm of the expected counts, and the exponentiated form (\(exp(B)\)) of these coefficients represents the rate of change in the counts as the independent variable increases by one unit
1603+
1604+
\hypertarget{estimating-the-model}{%
1605+
\subsection{Estimating the model}\label{estimating-the-model}}
1606+
15731607
{ Work in progress: incomplete version }
15741608

15751609
\hypertarget{mixed}{%

docs/book/glm.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,12 @@
301301
<li class="chapter" data-level="3.6.10" data-path="gzlm.html"><a href="gzlm.html#plot-1"><i class="fa fa-check"></i><b>3.6.10</b> Plot</a></li>
302302
<li class="chapter" data-level="3.6.11" data-path="gzlm.html"><a href="gzlm.html#other-options-2"><i class="fa fa-check"></i><b>3.6.11</b> Other options</a></li>
303303
</ul></li>
304-
<li class="chapter" data-level="3.7" data-path="gzlm.html"><a href="gzlm.html#poisson-model"><i class="fa fa-check"></i><b>3.7</b> Poisson Model</a></li>
304+
<li class="chapter" data-level="3.7" data-path="gzlm.html"><a href="gzlm.html#poisson"><i class="fa fa-check"></i><b>3.7</b> The Poisson Model</a>
305+
<ul>
306+
<li class="chapter" data-level="3.7.1" data-path="gzlm.html"><a href="gzlm.html#distribution"><i class="fa fa-check"></i><b>3.7.1</b> Distribution</a></li>
307+
<li class="chapter" data-level="3.7.2" data-path="gzlm.html"><a href="gzlm.html#link-function"><i class="fa fa-check"></i><b>3.7.2</b> Link function</a></li>
308+
<li class="chapter" data-level="3.7.3" data-path="gzlm.html"><a href="gzlm.html#estimating-the-model"><i class="fa fa-check"></i><b>3.7.3</b> Estimating the model</a></li>
309+
</ul></li>
305310
</ul></li>
306311
<li class="chapter" data-level="4" data-path="mixed.html"><a href="mixed.html"><i class="fa fa-check"></i><b>4</b> Mixed Linear Models</a>
307312
<ul>

docs/book/gmixed.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,12 @@
301301
<li class="chapter" data-level="3.6.10" data-path="gzlm.html"><a href="gzlm.html#plot-1"><i class="fa fa-check"></i><b>3.6.10</b> Plot</a></li>
302302
<li class="chapter" data-level="3.6.11" data-path="gzlm.html"><a href="gzlm.html#other-options-2"><i class="fa fa-check"></i><b>3.6.11</b> Other options</a></li>
303303
</ul></li>
304-
<li class="chapter" data-level="3.7" data-path="gzlm.html"><a href="gzlm.html#poisson-model"><i class="fa fa-check"></i><b>3.7</b> Poisson Model</a></li>
304+
<li class="chapter" data-level="3.7" data-path="gzlm.html"><a href="gzlm.html#poisson"><i class="fa fa-check"></i><b>3.7</b> The Poisson Model</a>
305+
<ul>
306+
<li class="chapter" data-level="3.7.1" data-path="gzlm.html"><a href="gzlm.html#distribution"><i class="fa fa-check"></i><b>3.7.1</b> Distribution</a></li>
307+
<li class="chapter" data-level="3.7.2" data-path="gzlm.html"><a href="gzlm.html#link-function"><i class="fa fa-check"></i><b>3.7.2</b> Link function</a></li>
308+
<li class="chapter" data-level="3.7.3" data-path="gzlm.html"><a href="gzlm.html#estimating-the-model"><i class="fa fa-check"></i><b>3.7.3</b> Estimating the model</a></li>
309+
</ul></li>
305310
</ul></li>
306311
<li class="chapter" data-level="4" data-path="mixed.html"><a href="mixed.html"><i class="fa fa-check"></i><b>4</b> Mixed Linear Models</a>
307312
<ul>

0 commit comments

Comments
 (0)