Share E-Book
Scan to open this page

Scan with your phone to open this page

Author: Justin C. Touchon

The statistical analyses that students of the life-sciences are being expected to perform are becoming increasingly advanced. Whether at the undergraduate, graduate, or post-graduate level, this book provides the tools needed to properly analyze your data in an efficient, accessible, plainspoken, frank, and occasionally humorous manner, ensuring that readers come away with the knowledge of which analyses they should use and when they should use them. The book uses the statistical language R, which is the choice of ecologists worldwide and is rapidly becoming the 'go-to' stats program throughout the life-sciences. Furthermore, by using a single, real-world dataset throughout the book, readers are encouraged to become deeply familiar with an imperfect but realistic set of data. Indeed, early chapters are specifically designed to teach basic data manipulation skills and build good habits in preparation for learning more advanced analyses. This approach also demonstrates the importance of viewing data through different lenses, facilitating an easy and natural progression from linear and generalized linear models through to mixed effects versions of those same analyses. Readers will also learn advanced plotting and data-wrangling techniques, and gain an introduction to writing their own functions. Applied Statistics with R is suitable for senior undergraduate and graduate students, professional researchers, and practitioners throughout the life-sciences, whether in the fields of ecology, evolution, environmental studies, or computational biology.

AI Reading Assistant

Whole-book reading guide from stratified index samples; jump to passages in the text

AI guide
【One-Line Pitch】 A practical, hands-on guide for life-science students and researchers who want to learn statistical analysis in R using a single real-world dataset, progressing from basic data manipulation to advanced mixed-effects models. 【Book Arc】 - **Opening (~0%–9%)**: Introduces R and RStudio, covering installation, package management, and the crucial habit of working from script windows rather than the command line. Establishes the book's philosophy: use one realistic dataset (the Resource-by-Predation experiment on frog metamorphs) throughout to build familiarity. - **Early (~9%–25%)**: Covers R fundamentals—creating objects, understanding vectors and data frames, handling missing data (NA vs. 0), and writing well-documented code. Includes practical advice on experimental design and why you should plan analyses before collecting data, with a cautionary tale from the author's own fieldwork mistakes. - **Early (~25%–34%)**: Transitions into exploratory data analysis (EDA) and data summarization. Teaches how to check data imports, identify typos and outliers, and use log-transformations to linearize relationships. Emphasizes the importance of viewing data through multiple lenses before modeling. - **Middle (~34%–47%)**: Delves into data wrangling with dplyr (group_by, summarize, the pipe operator %>%) and advanced plotting with ggplot2 and base R graphics. Covers boxplots, scatterplots, faceting, barplots with error bars, and customizing axes and legends—all using the frog dataset. - **Middle (~47% onward)**: Continues with more sophisticated visualization techniques and sets the stage for statistical modeling. The excerpts show a clear progression toward linear models, generalized linear models, and mixed-effects versions, though detailed model-fitting chapters are not fully covered in this sample. 【Key Takeaways】 - **Script windows are non-negotiable for reproducible work** (Opening): Typing directly into the command prompt loses your code; using script windows lets you save, edit, and rerun analyses. This habit is foundational for all subsequent chapters. - **Meaningful object names save time and prevent errors** (Early): Following the advice "You wouldn't call your dog 'dog,' so don't call your data 'data,'" the book stresses short but descriptive names for datasets, variables, and models—critical for complex projects. - **NA is the only acceptable way to code missing data** (Early): Using zeros for missing values corrupts analyses because R treats 0 as a real observation. Functions like mean() require na.rm=TRUE to handle NAs properly. - **Plan your analyses before collecting data** (Early): The author's personal story of being stuck with unanalyzable data in Panama illustrates why experimental design and statistical planning must happen upfront, not after fieldwork. - **Exploratory data analysis is detective work** (Early–Middle): Checking column types, row counts, and plotting variables against each other reveals typos and outliers. Log-transformations can linearize biological relationships, as shown with frog snout-vent length vs. mass. - **The pipe operator %>% transforms workflow efficiency** (Middle): Chaining functions with pipes makes code readable and powerful, especially when combined with group_by() and summarize() for calculating group means and other statistics. - **ggplot2 and base R both have strengths for publication-quality figures** (Middle): The book demonstrates faceting, color-coding by treatment, and adding error bars via barplot2() or geom_errorbar(), giving readers flexibility in plotting style. 【Reading Tips】 - **Skim Chapter 1 if you're already comfortable with R basics**, but don't skip the sections on data frames and NA handling—they're essential for later chapters. - **Deep-read Chapter 2 on experimental design** even if you're eager to code; the principles about planning analyses before data collection will save you from the author's own painful mistakes. - **Practice the dplyr and ggplot2 examples actively**—type the code yourself rather than copying, and experiment with modifying arguments (e.g., changing colors, facet layouts) to internalize the syntax. - **Pay special attention to the outlier discussion in Chapter 3**: the advice to run models with and without suspicious points is a practical, transferable skill for any dataset. - **Expect a learning curve with the pipe operator and data wrangling**; the book acknowledges it's challenging but emphasizes it pays off in Chapter 9 and beyond. 【Coverage Limits】 This guide covers the opening through the middle of the book (roughly 0–47%), focusing on R fundamentals, experimental design, EDA, data wrangling, and plotting. Detailed coverage of linear models, generalized linear models, and mixed-effects models (likely in later chapters) is not included in the sampled excerpts.
Page 12
istical programming package and a powerful graphics engine. R is considered to be a dialect of the S and S+ language that was cre- ated by AT&T Bell Labs. S...
View in text
Excerpt 2
haracters (since you can’t really go the other way and make a numerical representation of a character). We will discuss data frames in more detail a little l...
View in text
Excerpt 3
number (remember, each column in a data frame is a vector, and vectors can only have one mode, so a vector with both numbers and characters is treated as if...
View in text
Excerpt 4
ach error bar (simply the mean plus SE and themeanminus SE). Just like how our six bars are plotted in order from the top to the bottom of our data frame, th...
View in text
Excerpt 5
package into the active memory using the library() command. fitdistr() takes just two arguments: the vector of data you are examining and the distribution yo...
View in text
Excerpt 6
orphosis (DPO)”)+ scale_fill_manual(values=c(”light green”, ”forest green”, ”dark green”))+ theme_cowplot()+ ggtitle(label=”Effect of Pred within Res”) plot_...
View in text
Excerpt 7
why it is useful to know how to use the predict() function. There are three reasons (at least in my mind). 1. From a statistical perspective, we often talk a...
View in text
Excerpt 8
a = RxP.byTank, ## init.theta = 5.128645402, link = log) ## Deviance Residuals: ## Min 1Q Median 3Q Max ## -2.6883 -0.8392 -0.1132 0.5432 2.7670 ## Coefficie...
View in text
Tags
AI categories
ProgrammingDataEducation
r
ISBN: 0198869339
Publish Year: 2021
Language: English
Pages: 336
File Format: PDF
File Size: 8.3 MB
Text Preview (First 20 pages)
Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Generating text preview…