Skip to content

Commit

Permalink
Clean up appendix
Browse files Browse the repository at this point in the history
- Remove old appendix and notes
- Put diversity derivation in its own section
- Create stubs for some missing sections
  • Loading branch information
mikemc committed Jun 5, 2022
1 parent c17aa95 commit 0d63746
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 44 deletions.
4 changes: 2 additions & 2 deletions _bookdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ rmd_files: [
"solutions.Rmd",
"conclusion.Rmd",
"appendix.Rmd",
"appendix-old.Rmd",
"appendix-measurement.Rmd",
"appendix-regression.Rmd",
"appendix-notes.Rmd",
"appendix-diversity.Rmd",
"supplemental-figures.Rmd",
"references.Rmd",
]
Expand Down
41 changes: 41 additions & 0 deletions appendix-diversity.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Alpha diversity and variation in the mean efficiency {#diversity-and-mean-efficiency}

The diversity of order $q$ is given by
\begin{align}
^qD = \left(\sum_{i=1}^n p_i^q\right)^{1 /(1-q)},
\end{align}
where $^qD$ is understood to be given by the limit of the RHS when $q = 1$ (and so the given expression is undefined).
The order-2 diversity is therefore
\begin{align}
^2D = \frac{1}{\sum_{i=1}^n {p_i^2}},
\end{align}
which is equivalent to the Inverse Simpson Index (REF Jost).

Consider an infinite pool of species.
Let $\sigma^{2}$ denote the variance in the relative efficiency among species in the pool.
Consider a community that is assembled by randomly choosing $K \ge 1$ species from the pool and setting the abundances of the $K$ species in a manner that is independent of their efficiencies.

**Claim:**
Let $\rho_{k}$ for $1 \le k \le K$ denote the proportions of the $K$ species in the community; this new notation serves as a reminder that the subscript $k$ indexes a random species specific to this particular community.
Conditional on the order-2 diversity $^2D$ of a community, the arithmetic variance in the mean efficiency is
\begin{align}
Var[\bar B \mid ^2D]
% = \sigma^2 \sum_{k=1}^K \rho_k^2
= \frac{\sigma^2}{^2D}.
\end{align}

**Proof:** Let $\beta_{k}$ denote the efficiency of the $k$-th sampled species.
The mean efficiency is therefore $\bar B = \sum_k \rho_k \beta_k$.
Conditional on the proportions $\{\rho_{k}\}$, the variance in the mean efficiency is
\begin{align}
Var[\bar B \mid \{\rho_{k}\}]
&= \sum_{k=1}^K \rho_k^2 Var[\beta_k]
\\&= \left(\sum_{k=1}^K p_k^2\right) \sigma^2.
\end{align}
The first line follows from the fact that the $\beta_{k}$ are independent.
The summation in the final line is equal to $1/2^D$, thus proving the result.

**Note:**
We have showed that the arithmetic (additive) variance of $\bar B$ decreases with $^2D$; however, the geometric (multiplicative) variance is most relevant for understanding the effect of bias on DA.
As $2^D$ increases, the distribution of $\bar B$ will converge (by the central limit theorem) to a normal distribution, and both the arithmetic and geometric variance will decrease.

9 changes: 9 additions & 0 deletions appendix-measurement.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# MGS measurement details

## Alternative method for measuring species absolute abundances from a spike-in {#spike-in-alt}

(stub)

## Missing and multiple reference species {#multiple-references}

(stub)
42 changes: 0 additions & 42 deletions appendix-notes.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -89,45 +89,3 @@ where $\text{FE}\left[\widehat{\text{abun}_R}(a)\right] = \widehat{\text{abun}_R
From here, we can derive the other results.

Methods differ based on the choice of $R$ and in how the abundance of $R$ is measured.


## Alpha diversity and variation in the mean efficiency {#diversity-and-mean-efficiency}

The diversity of order $q$ is given by
\begin{align}
^qD = \left(\sum_{i=1}^n p_i^q\right)^{1 /(1-q)},
\end{align}
where $^qD$ is understood to be given by the limit of the RHS when $q = 1$ (and so the given expression is undefined).
The order-2 diversity is therefore
\begin{align}
^2D = \frac{1}{\sum_{i=1}^n {p_i^2}},
\end{align}
which is equivalent to the Inverse Simpson Index (REF Jost).

Consider an infinite pool of species.
Let $\sigma^{2}$ denote the variance in the relative efficiency among species in the pool.
Consider a community that is assembled by randomly choosing $K \ge 1$ species from the pool and setting the abundances of the $K$ species in a manner that is independent of their efficiencies.

**Claim:**
Let $\rho_{k}$ for $1 \le k \le K$ denote the proportions of the $K$ species in the community; this new notation serves as a reminder that the subscript $k$ indexes a random species specific to this particular community.
Conditional on the order-2 diversity $^2D$ of a community, the arithmetic variance in the mean efficiency is
\begin{align}
Var[\bar B \mid ^2D]
% = \sigma^2 \sum_{k=1}^K \rho_k^2
= \frac{\sigma^2}{^2D}.
\end{align}

**Proof:** Let $\beta_{k}$ denote the efficiency of the $k$-th sampled species.
The mean efficiency is therefore $\bar B = \sum_k \rho_k \beta_k$.
Conditional on the proportions $\{\rho_{k}\}$, the variance in the mean efficiency is
\begin{align}
Var[\bar B \mid \{\rho_{k}\}]
&= \sum_{k=1}^K \rho_k^2 Var[\beta_k]
\\&= \left(\sum_{k=1}^K p_k^2\right) \sigma^2.
\end{align}
The first line follows from the fact that the $\beta_{k}$ are independent.
The summation in the final line is equal to $1/2^D$, thus proving the result.

**Note:**
We have showed that the arithmetic (additive) variance of $\bar B$ decreases with $^2D$; however, the geometric (multiplicative) variance is most relevant for understanding the effect of bias on DA.
As $2^D$ increases, the distribution of $\bar B$ will converge (by the central limit theorem) to a normal distribution, and both the arithmetic and geometric variance will decrease.

0 comments on commit 0d63746

Please sign in to comment.