From 6a976f90b1481e7310c9cb04adfbac3b4dccd4c0 Mon Sep 17 00:00:00 2001 From: Andre Chalom Date: Wed, 1 Jun 2016 22:09:37 -0300 Subject: [PATCH] Building after proofreading... --- inst/doc/RRRe.Rmd | 12 ++++++------ inst/doc/RRRe.html | 12 ++++++------ inst/doc/regressions.Rmd | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/inst/doc/RRRe.Rmd b/inst/doc/RRRe.Rmd index b88cabd..0dee76a 100644 --- a/inst/doc/RRRe.Rmd +++ b/inst/doc/RRRe.Rmd @@ -25,7 +25,7 @@ set.seed(42) ## Overview This guide is an introduction to the **Rsampling** package, which replicates in R the functions -of the *Resampling Stats* add-in for Excell. +of the *Resampling Stats* add-in for Excel. (http://www.resample.com/) [^1]. These functions are used in a workflow that summarizes the logic @@ -37,11 +37,11 @@ behind significance tests: 4. If the probability of the observed statistic of interest occurring under null hypothesis is lower than a critical value, reject the null hypothesis. -*Resampling Stats* 's main idea is to facilitate the understanding of this logic, +*Resampling Stats*'s main idea is to facilitate the understanding of this logic, by making the user execute each step in a spreadsheet, with the aid of some macros. -**Rsampling** 's package aims at enabling this same training process +**Rsampling**'s package aims at enabling this same training process in R. Keeping the original workflow is favored over performance. @@ -158,7 +158,7 @@ the null hypothesis if the probability of the statistic of interest under the null hypothesis is under 5% (p < 0.05). -The area not highlighted in gray marks the the top 5% +The area not highlighted in gray marks the top 5% of the statistic distribution under the null hypothesis. Thus, if the observed statistic is in the gray area we do not reject the null hypothesis. This is called the *acceptance region* of H0. @@ -504,7 +504,7 @@ To learn more about this data set refer to the help page (`?pielou`). There are several instances with zero frequency. We'll simulate a null hypothesis assuming these frequencies are structural, that is, assuming that -zeroes indicates insect-plant associations that can not occur. +zeros indicates insect-plant associations that can not occur. This can be a reasonable assumption for phytophagous insects, that are in general highly specialized in some host plants. @@ -557,7 +557,7 @@ of each species of aphids among the plants. Thus we simulate a situation where w kept the observed aggregation of records per plant species. But by shuffling records in each row of the data frame we simulate that these records are independent Furthermore, we use the `fix.zeroes = TRUE` option to indicate that zero values are not -to be shuffled. In doing this we assume that zeroes indicate associations that can not occur. +to be shuffled. In doing this we assume that zeros indicate associations that can not occur. ```{r pielou randomization, results="hide"} pielou.r1 <- Rsampling(type = "within_rows", dataframe = pielou, diff --git a/inst/doc/RRRe.html b/inst/doc/RRRe.html index f57b432..9885bbb 100644 --- a/inst/doc/RRRe.html +++ b/inst/doc/RRRe.html @@ -77,7 +77,7 @@

April 2016

Overview

-

This guide is an introduction to the Rsampling package, which replicates in R the functions of the Resampling Stats add-in for Excell. (http://www.resample.com/) 1.

+

This guide is an introduction to the Rsampling package, which replicates in R the functions of the Resampling Stats add-in for Excel. (http://www.resample.com/) 1.

These functions are used in a workflow that summarizes the logic behind significance tests:

  1. Define a statistic of interest;
  2. @@ -85,8 +85,8 @@

    Overview

  3. Get the statistic of interest distribution under null hypothesis;
  4. If the probability of the observed statistic of interest occurring under null hypothesis is lower than a critical value, reject the null hypothesis.
-

Resampling Stats ’s main idea is to facilitate the understanding of this logic, by making the user execute each step in a spreadsheet, with the aid of some macros.

-

Rsampling ’s package aims at enabling this same training process in R. Keeping the original workflow is favored over performance.

+

Resampling Stats’s main idea is to facilitate the understanding of this logic, by making the user execute each step in a spreadsheet, with the aid of some macros.

+

Rsampling’s package aims at enabling this same training process in R. Keeping the original workflow is favored over performance.

The sections following installation instructions are examples of the simpler and most common applications of Rsampling. You may refer to the package help pages to learn about all other functionalities.

@@ -164,7 +164,7 @@

Distribution of statistics under the null hypothesis

Decision: should we reject the null hypothesis?

As usual in the biological sciences, we adopt the criteria of rejecting the null hypothesis if the probability of the statistic of interest under the null hypothesis is under 5% (p < 0.05).

-

The area not highlighted in gray marks the the top 5% of the statistic distribution under the null hypothesis. Thus, if the observed statistic is in the gray area we do not reject the null hypothesis. This is called the acceptance region of H0. As the observed value (red line) is outside the acceptance region, H0 can be rejected. You can also check this with a logical test in R:

+

The area not highlighted in gray marks the top 5% of the statistic distribution under the null hypothesis. Thus, if the observed statistic is in the gray area we do not reject the null hypothesis. This is called the acceptance region of H0. As the observed value (red line) is outside the acceptance region, H0 can be rejected. You can also check this with a logical test in R:

> sum(emb.r >= emb.si(embauba))/1000 < 0.05
 [1] TRUE

Conclusion: we reject the null hypothesis (p < 0.05).

@@ -427,7 +427,7 @@

Structural zeros

macgillivrayae 0 erigeronensis 0 solirostratus 0
-

To learn more about this data set refer to the help page (?pielou). There are several instances with zero frequency. We’ll simulate a null hypothesis assuming these frequencies are structural, that is, assuming that zeroes indicates insect-plant associations that can not occur. This can be a reasonable assumption for phytophagous insects, that are in general highly specialized in some host plants.

+

To learn more about this data set refer to the help page (?pielou). There are several instances with zero frequency. We’ll simulate a null hypothesis assuming these frequencies are structural, that is, assuming that zeros indicates insect-plant associations that can not occur. This can be a reasonable assumption for phytophagous insects, that are in general highly specialized in some host plants.

Study Hypothesis

Our research hypothesis is that there is or there was resource partitioning of resources among aphid species. In this case, the observed associations should have resulted in decreased insect niche overlap.

@@ -454,7 +454,7 @@

Statistics of interest

Distribution of the statistic of interest under the null hypothesis

-

To simulate our null hypothesis, we shuffle the numbers of records of each species of aphids among the plants. Thus we simulate a situation where we kept the observed aggregation of records per plant species. But by shuffling records in each row of the data frame we simulate that these records are independent Furthermore, we use the fix.zeroes = TRUE option to indicate that zero values are not to be shuffled. In doing this we assume that zeroes indicate associations that can not occur.

+

To simulate our null hypothesis, we shuffle the numbers of records of each species of aphids among the plants. Thus we simulate a situation where we kept the observed aggregation of records per plant species. But by shuffling records in each row of the data frame we simulate that these records are independent Furthermore, we use the fix.zeroes = TRUE option to indicate that zero values are not to be shuffled. In doing this we assume that zeros indicate associations that can not occur.

> pielou.r1 <- Rsampling(type = "within_rows", dataframe = pielou,
 +                    statistics = pielou.si, ntrials = 1000, fix.zeroes = TRUE)

The observed value is greater than most values in the null distribution. As our hypothesis is one-tailed (overlapping observed lower than expected by chance) the observed value is in the null region of acceptance.

diff --git a/inst/doc/regressions.Rmd b/inst/doc/regressions.Rmd index bcff668..7537882 100644 --- a/inst/doc/regressions.Rmd +++ b/inst/doc/regressions.Rmd @@ -8,7 +8,7 @@ output: fig_height: 5 fig_caption: true vignette: > - %\VignetteIndexEntry{Regression and ANOVA} + %\VignetteIndexEntry{Regression and ANCOVA} %\VignetteEngine{knitr::rmarkdown} \usepackage[utf8]{inputenc} ---