Skip to content

Commit

Permalink
centralised setting of chunk options
Browse files Browse the repository at this point in the history
  • Loading branch information
benwhalley committed Feb 20, 2018
1 parent 6ef7de0 commit d03ac3b
Show file tree
Hide file tree
Showing 250 changed files with 4,219 additions and 4,269 deletions.
5 changes: 0 additions & 5 deletions EXPLANATIONS.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
title: 'Explanations'
---

```{r, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, collapse=TRUE, cache=TRUE)
```



# (PART) Explanations {-}
Expand Down
4 changes: 0 additions & 4 deletions MODELS.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
title: 'Analysis'
---

```{r, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, collapse=TRUE, cache=TRUE)
```



Expand Down
3 changes: 0 additions & 3 deletions PATTERNS.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
title: 'Patterns'
---

```{r, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, collapse=TRUE, cache=TRUE)
```



Expand Down
2 changes: 2 additions & 0 deletions _bookdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ link-citations: yes

book_filename: "Just enough R"
new_session: yes
before_chapter_script: set_chunk_options.R
output_dir: "docs"
delete_merged_file: true
rmd_files:
Expand Down Expand Up @@ -70,6 +71,7 @@ rmd_files:
"multiple-comparisons.Rmd",
"clustering.Rmd",
"fixed-or-random.Rmd",
"scaling-predictors.Rmd",
"link-functions.Rmd",
"over-fitting.Rmd",

Expand Down
1 change: 0 additions & 1 deletion additional-stubs.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ title: 'Bayes factors'


```{r, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, collapse=TRUE, cache=TRUE)
library(tidyverse)
library(pander)
library(lmerTest)
Expand Down
3 changes: 0 additions & 3 deletions basic-statistics.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
title: 'Basic statistics'
---

```{r, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, collapse=TRUE, cache=TRUE)
```


# Common inferential statistics {#common-inferential-stats}
Expand Down
57 changes: 57 additions & 0 deletions bibliography.bib
Original file line number Diff line number Diff line change
@@ -1,4 +1,61 @@

@article{gelman_analysis_2005,
title = {Analysis of variance—why it is more important than ever},
volume = {33},
pages = {1--53},
number = {1},
journaltitle = {The annals of statistics},
author = {Gelman, Andrew},
date = {2005},
file = {banova7.pdf:/Users/ben/Zotero/storage/XUJ7IGYL/banova7.pdf:application/pdf}
}

@article{peacock_dichotomising_2012,
title = {Dichotomising continuous data while retaining statistical power using a distributional approach},
volume = {31},
issn = {1097-0258},
url = {http://onlinelibrary.wiley.com/doi/10.1002/sim.5354/abstract},
doi = {10.1002/sim.5354},
abstract = {Dichotomisation of continuous data is known to be hugely problematic because information is lost, power is reduced and relationships may be obscured or changed. However, not only are differences in means difficult for clinicians to interpret, but thresholds also occur in many areas of medical practice and cannot be ignored. In recognition of both the problems of dichotomisation and the ways in which it may be useful clinically, we have used a distributional approach to derive a difference in proportions with a 95\% {CI} that retains the precision and the power of the {CI} for the equivalent difference in means. In this way, we propose a dual approach that analyses continuous data using both means and proportions to replace dichotomisation alone and that may be useful in certain situations. We illustrate this work with examples and simulations that show good performance of the parametric approach under standard distributional assumptions from our own research and from the literature. Copyright © 2012 John Wiley \& Sons, Ltd.},
pages = {3089--3103},
number = {26},
journaltitle = {Statistics in Medicine},
shortjournal = {Statist. Med.},
author = {Peacock, J.l. and Sauzet, O. and Ewings, S.m. and Kerry, S.m.},
urldate = {2018-02-20},
date = {2012-11-20},
langid = {english},
keywords = {{CI}, dichotomisation, normal distribution, statistical power}
}

@article{gelman_scaling_2008,
title = {Scaling regression inputs by dividing by two standard deviations},
volume = {27},
issn = {02776715, 10970258},
url = {http://doi.wiley.com/10.1002/sim.3107},
doi = {10.1002/sim.3107},
pages = {2865--2873},
number = {15},
journaltitle = {Statistics in Medicine},
author = {Gelman, Andrew},
urldate = {2018-02-20},
date = {2008-07-10},
langid = {english},
file = {standardizing7.pdf:/Users/ben/Zotero/storage/Z8HAR5AS/standardizing7.pdf:application/pdf}
}

@article{gelman_splitting_2009,
title = {Splitting a predictor at the upper quarter or third and the lower quarter or third},
volume = {63},
pages = {1--8},
number = {1},
journaltitle = {The American Statistician},
author = {Gelman, Andrew and Park, David K.},
date = {2009},
file = {thirds5.pdf:/Users/ben/Zotero/storage/7QZV5WAK/thirds5.pdf:application/pdf},
url={http://www.stat.columbia.edu/~gelman/research/published/thirds5.pdf}
}

@article{schreiber_reporting_2006,
title = {Reporting structural equation modeling and confirmatory factor analysis results: A review},
volume = {99},
Expand Down
2 changes: 0 additions & 2 deletions cleaning-up-your-mess.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ title: 'Cleaning up the mess'


```{r, include=FALSE, message=F}
knitr::opts_chunk$set(echo = TRUE, collapse=TRUE, cache=TRUE)
library(tidyverse)
library(reshape2)
library(broom)
Expand Down
1 change: 0 additions & 1 deletion confidence-and-intervals.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ bibliography: bibliography.bib
---

```{r, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, collapse=TRUE, cache=TRUE)
library(tidyverse)
```

Expand Down
1 change: 0 additions & 1 deletion correlations.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ title: 'Correlations'
---

```{r, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, collapse=TRUE, cache=TRUE)
library(tidyverse)
library(pander)
library(lavaan)
Expand Down
1 change: 0 additions & 1 deletion crosstabulation.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ title: 'Crosstabulation'


```{r, include=FALSE, message=F}
knitr::opts_chunk$set(echo = TRUE, collapse=TRUE, cache=TRUE)
library(tidyverse)
library(pander)
```
Expand Down
1 change: 0 additions & 1 deletion datasets.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ title: 'Datasets and dataframes'


```{r, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, collapse=TRUE, cache=TRUE)
library(tidyverse)
library(tufte)
```
Expand Down
Loading

0 comments on commit d03ac3b

Please sign in to comment.