-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.Rmd
92 lines (61 loc) · 5.27 KB
/
index.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
---
title: "R for Researchers: An Introduction"
author: "Tyson S. Barrett, PhD"
date: "`r Sys.Date()`"
output:
bookdown::pdf_book:
latex_engine: "xelatex"
bookdown::gitbook: default
documentclass: book
link-citations: yes
bibliography: [book.bib]
biblio-style: apalike
description: "This book introduces the R statistical language for researchers in the health, behavioral, educational, and psychological sciences. It is designed for those that have little background in statistical programming but would like to use the powerful statistical and visualization tool that R offers at no cost. The light-hearted design of this book allows a researcher to investigate and begin using R relatively stress-free with intuitive and interesting examples."
github-repo: "tysonstanley"
cover-image: "Cover.jpg"
editor_options:
chunk_output_type: console
---
```{r, echo = FALSE, message = FALSE, warning = FALSE}
library(rio)
library(furniture)
```
# Preface {-}
Welcome to *R for Researchers: An Introduction*! This book is designed to help you learn to use R and RStudio for working with and analyzing your data. This book is written for researchers in what I'm calling the *human sciences*---the sciences dealing directly with human well-being (e.g. health, behavior, education, psychology, and sociology). Although different in substantive interests, the data situations faced, and analysis approaches used, in these fields are similar. As such, the topics addressed should be useful for researchers working with quantitative data in each of these areas.
My approach herein does not focus on the theoretical aspects of statistics or data science. Instead, it focuses on the application of the methods necessary for a researcher in the humans sciences to independently work with and analyze human data.
This book can work as a companion to other statistical texts or can be a standalone text for learning R. As a companion, Part II (explained below) can be particularly helpful getting started using R for statistical analyses. As a standalone, the entire book helps a researcher work with data throughout the "data analysis lifecycle" (see figure below)---from importing, cleaning, and summarizing the data to analyzing and reporting the results. In general, this book will follow the data analysis lifecycle, starting with importing and going through until reporting.
![](DataCycle.png)
## Preparation {-}
Before beginning the book, you will need to download the `R` software [www.r-project.org](https://www.r-project.org/) and then the RStudio software [www.rstudio.com](https://www.rstudio.com/). `R` will just need to be installed on your computer but you won't interact with it directly (you won't need to open it up). `RStudio`[^free] is actually how we will end up using `R`. You can think of `R` as the computer processor while `RStudio` is the keyboard and screen. `R` actually does the work but you'll only use it by using `RStudio`.
Once they are both installed, when you open up `RStudio` you should see the following three panels:
![](Rstudio_3panel.png)
If you do, then congrats! You are one huge step on the path to using `R` in your research. If it isn't going so smoothly, helps on installing the software can be found on [www.rstudio.com](https://www.rstudio.com/), [www.r-bloggers.com](www.r-bloggers.com), and [www.statmethods.net](www.statmethods.net). Don't give up it if you run into any obstacles here. But once it is installed and you can open `RStudio`, you are good to go. The remainder of the book will be about actually using it (the fun part!).
> In general, I will refer to anything you do in `RStudio` as using `R`. So, when I say things like: "To make a plot in `R`, we are going to ...", I do not mean to open `R` and start doing stuff there. Instead, I mean to keep using `RStudio` but will not refer to the things we do as in `RStudio` but as in `R`.
The book is divided into three parts.
## Part I {-}
1. Chapter 1: The Basics
2. Chapter 2: Working with and Cleaning Your Data
3. Chapter 3: Understanding Your Data (summary statistics, ggplot2)
## Part II {-}
4. Chapter 4: Basic Statistical Analyses (T-tests, ANOVA, Linear Regression)
5. Chapter 5: Generalized Linear Models
6. Chapter 6: Multilevel Modeling
7. Chapter 7: Other Modeling Techniques
## Part III {-}
8. Chapter 8: Advanced data manipulation
9. Chapter 9: Reproducible Workflow
10. Chapter 10: Where to go from here
At the end of the book, you should be able to: 1) use `R` to perform your data cleaning and data analyses and 2) understand online helps (e.g. [www.stackoverflow.com](www.stackoverflow.com), [www.r-bloggers.com](www.r-bloggers.com)) so your potential in `R` becomes nearly limitless.
```{r, echo = FALSE, eval = FALSE}
# To build the books
bookdown::render_book(input = list.files(pattern = "*.Rmd"),
output_format = "bookdown::gitbook")
bookdown::render_book(input = list.files(pattern = "*.Rmd"),
output_format = "bookdown::tufte_book2")
bookdown::render_book(input = list.files(pattern = "*.Rmd"),
output_format = "bookdown::epub_book")
```
Enjoy![^return]
[^free]: Get the free version of `Rstudio`. Believe me, it doesn't feel like it should be free software.
[^return]: Note that to return to Tyson's blog, you can click [here][blog]
[blog]: https://tysonbarrett.com