Skip to content

Commit

Permalink
version .9
Browse files Browse the repository at this point in the history
  • Loading branch information
CrumpLab committed Aug 7, 2018
1 parent 59f6c2d commit 18e6ae8
Show file tree
Hide file tree
Showing 128 changed files with 1,884 additions and 1,895 deletions.
41 changes: 0 additions & 41 deletions 10-MixedANOVA.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -304,48 +304,7 @@ We see that there is an interaction between delay (the forgetting effect) and re
We will note a general pattern here. Imagine you had a 2x2x2x2 design. That would have a 4-way interaction. What would that mean? It would mean that the pattern of the 2x2x2 interaction changes across the levels of the 4th IV. If two three-way interactions are different, then there is a four-way interaction.


<!--
## A general model

It's probably time we introduce you to another new concept. This concept has been underyling everything we have been doing so far. It's called the general linear model, or GLM for short. Don't worry it's not that scary. And, right now, we won't dive off into the deep end. Instead, we will do a little bit of light GLM, for beginners. The purpose is to give you some idea where the main effects and interaction come from, and when they are there, how they influence the pattern in the means.
The GLM makes you think about the various things that influence each mean you measure. It's the idea that any mean is the sum of it's parts: a little bit of this, a little bit of that. Here's a general formula for the composition of a mean in a 2x2 design:
$ \text{A mean} = \text{Grand Mean} + \text{IV1 effect} + \text{IV2 effect} + \text{Interaction effect} + \text{error} $
Let's say you ran an experiment with two IVs, but they did absolutely nothing, and there was no interaction. What would you expect your means to be in each of the four conditions. You would still measure a bunch of scores, but they should all be the same right? If so, then the grand mean of all the scores should be your mean for all of the conditions. The formula would look like this:
$ \text{Each mean} = \text{Grand Mean} + 0 + 0 + 0 + \text{error}$
Remember there will still be some sampling error, so each mean will be the grand mean, plus or minus some amount of random sampling error.
How about if IV1 has an effect of +10. That is, the means in level 1 of IV1 are +10 more than the means of level 2 of IV1. Let's say that is the only thing going on. Then we would expect the following:
$ \text{IV1: Level 1 mean} = \text{Grand Mean} + 10 + 0 + 0 + \text{error}$
$ \text{IV1: Level 2 mean} = \text{Grand Mean} + 0 + 0 + 0 + \text{error}$
Or, we could write it this way to make the effect of IV1 balanced about the Grand mean:
$ \text{IV1: Level 1 mean} = \text{Grand Mean} + 5 + 0 + 0 + \text{error}$
$ \text{IV1: Level 2 mean} = \text{Grand Mean} + -5 + 0 + 0 + \text{error}$
```{r}
# 2x2 simulator
IV1 <- c(4,7)
IV2 <- c(5, 5)
interaction <-c(0,0,0,0)
```
-->



Expand Down
597 changes: 0 additions & 597 deletions 11-Linear_Regression.Rmd

This file was deleted.

299 changes: 299 additions & 0 deletions 11-Simulation.Rmd

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
110 changes: 39 additions & 71 deletions docs/Correlation.html

Large diffs are not rendered by default.

110 changes: 39 additions & 71 deletions docs/DescribingData.html

Large diffs are not rendered by default.

110 changes: 39 additions & 71 deletions docs/anova.html

Large diffs are not rendered by default.

434 changes: 156 additions & 278 deletions docs/factorial-anova.html

Large diffs are not rendered by default.

110 changes: 39 additions & 71 deletions docs/foundations-for-inference.html

Large diffs are not rendered by default.

207 changes: 57 additions & 150 deletions docs/gifs.html

Large diffs are not rendered by default.

225 changes: 100 additions & 125 deletions docs/index.html

Large diffs are not rendered by default.

145 changes: 41 additions & 104 deletions docs/more-on-factorial-designs.html

Large diffs are not rendered by default.

110 changes: 39 additions & 71 deletions docs/probability-sampling-and-estimation.html

Large diffs are not rendered by default.

110 changes: 39 additions & 71 deletions docs/repeated-measures-anova.html

Large diffs are not rendered by default.

16 changes: 1 addition & 15 deletions docs/search_index.json

Large diffs are not rendered by default.

862 changes: 862 additions & 0 deletions docs/simulating-data.html

Large diffs are not rendered by default.

Binary file modified docs/statistics_files/figure-html/unnamed-chunk-5-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/statistics_files/figure-html/unnamed-chunk-7-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/statistics_files/figure-html/unnamed-chunk-89-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
110 changes: 39 additions & 71 deletions docs/t-tests.html

Large diffs are not rendered by default.

110 changes: 39 additions & 71 deletions docs/why-statistics.html

Large diffs are not rendered by default.

73 changes: 56 additions & 17 deletions index.Rmd
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
---
title: "Answering questions with data"
author:
- "Author List, TBD"
- "Current Contributions, Matthew J. C. Crump"
- "Adapted work so far from Navarro, D., Diaz, Barr, & Cetinkaya-Rundel"
- "In Draft subject to change, we will get all attributions and licenses done correctly"
- "Lead Author: Matthew J. C. Crump"
- "Chapters 2 and 4 adapted from Navarro, D."
date: "2018 Last Compiled `r Sys.Date()`"
site: bookdown::bookdown_site
output:
Expand Down Expand Up @@ -35,28 +33,69 @@ library(dplyr)
knitr::include_graphics("TextbookCover.png")
```

Draft in progress
First Draft (version 0.9 = August 7th, 2018)
Last Compiled: `r Sys.Date()`

## Important notes

This is a working revision of the OER statistics
textbook titled: Introductory Statistics with Randomization and
Simulation, by Diaz, Barr, & Cetinkaya-Rundel.
This is a free textbook teaching introductory statistics for undergraduates in Psychology. [There is a companion lab manual for this textbook here](https://crumplab.github.io/statisticsLab/). Both books are released under a creative commons licence [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/). Click the link to read more about the license, or read more below in the license section.

The original source latex files were obtained from :
https://www.openintro.org/stat/textbook.php?stat_book=isrs
This textbook is part of a larger OER course package for teaching undergraduate statistics in Psychology. Team members include, Matthew Crump, Alla Chavarga, Anjali Krishnan, Jeffrey Suzuki, and Stephen Volz. Jeffrey contributed the youtube videos peppered throughout the textbook. Alla Anjali, and Stephen wrote the lab manual exercises for SPSS, JAMOVI, and Excel. Matt Crump wrote the lab manual exercises for R. As this OER comes together, we will be providing a [course website](https://crumplab.github.io/psyc3400/), written in R Markdown, as well as slide decks for the lectures (these will be more fully available by the end of fall 2018). As a result, this textbook, the lab manual, the course website, and the slide decks will all be free, under a creative commons license. The source code for all material is contained in the github repositories for each, and they are a written in R-markdown, so they are relatively easy to copy and edit. Have Fun!

The original textbook is licensed under a Creative Commons license.
### Attributions

The original latex were converted to Markdown using pandoc. Some
minimal typesetting was completed on the first chapter.
This textbook was primarily written by Matthew J. C. Crump.

The plan is to use this textbook as a starting point for developing another OER textbook for tailored for undergraduate psychology students.
Two of the chapters were adapted from Danielle Navarro's wonderful (and bigger) free textbook, also licensed under the same creative commons license. The citation for that textbook is: Navarro, D. (2018). Learning statistics with R: A tutorial for psychology students and other beginners (version 0.6). The website is [https://compcogscisydney.org/learning-statistics-with-r/](https://compcogscisydney.org/learning-statistics-with-r/)

The Github changelog from this point forward reflects all of our
changes to the original textbook. The github repository for this project is [https://github.com/CrumpLab/statistics](https://github.com/CrumpLab/statistics)
Chapter notes within the book are provided to indicate sections where material from Navarro was included. A short summary is here

*Contributing to the textbook*
**Chapter 1: Why statistics**, Adapated nearly verbatim with some editorial changes from Chapters 1 and 2, Navarro, D.

**Chapter 4: Probability, Sampling, and Estimation**, Adapted and expanded from Chapters 9 and 10, Navarro D.

### CC BY-SA 4.0 license

This license means that you are free to:

- Share: copy and redistribute the material in any medium or format
- Adapt: remix, transform, and build upon the material for any purpose, even commercially.

The licensor cannot revoke these freedoms as long as you follow the license terms.

Under the following terms:

- Attribution: You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- ShareAlike: If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.
- No additional restrictions: You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.

## Copying the textbook

This textbook was written in R-Studio, using R Markdown, and compiled into a web-book format using the bookdown package. In general, I thank the larger R community for all of the amazing tools they made, and for making those tools open, so that I could use them to make this thing.

All of the source code for compiling the book is available in the github repository for this book:

[https://github.com/CrumpLab/statistics](https://github.com/CrumpLab/statistics)

In principle, anybody could fork or otherwise download this repository. Load the Rproj file in R-studio, and then compile the entire book. Then, the individual .rmd files for each chapter could be edited for content and style to better suit your needs.

If you want to contribute to this version of the textbook, you could make pull requests on github, or discuss issues and request on the issues tab.


### Acknowledgments

Thanks to the librarians at Brooklyn College of CUNY, especially Miriam Deutch, and Emily Fairey, for their support throughout the process. Thanks to CUNY for supporting OER devlopment, and for the grant we received to develop this work. Thanks to Jenn Richler for letting me talk about Statistics all summer long.

### Why we did this

Why write another statistics textbook, aren't there already loads of those? Yes, there are. We had a couple reasons. First, we would like to make R more accesible for the undergraduate population, and we wrote this textbook around the capabilities of R. The textbook was written entirely in R-Studio, and most of the examples have associated R-code. R is not much of a focus in the textbook, but there is an introduction to using R to solve data-analysis problems in the lab manual. Many instructors still use SPSS, Excel, or newer free GUIs like JAMOVI, so we also made lab exercises for each of those as well.

This is a mildly opinionated, non-traditional introduction to statistics. It acknowledges some of the major ideas from traditional frequentist approaches, and some bayesian approaches. Much of the conceptual foundation is rooted in simulations that can be conducted in R. We us some formulas, but mostly explain things without formulas. The textbook was written with math-phobia in mind, and attempts to reduce the phobia associated with arithmetic computations. There are many things missing that should probably be added. We will do our best to add necessary things as we update the textbook.


### Hypothes.is

Hypothesis is a web-browser plug-in that lets you make comments on websites by highlighting text, and then making comments. Feel free to use hypothesis with this textbook. We will read your comments.

1. Use Hypothes.is, an amazing tool for annotating the web.

Expand Down

0 comments on commit 18e6ae8

Please sign in to comment.