Skip to content

Commit

Permalink
psyteachr tracking form
Browse files Browse the repository at this point in the history
  • Loading branch information
emilynordmann committed Oct 17, 2024
1 parent 357cebe commit 545ba90
Show file tree
Hide file tree
Showing 53 changed files with 635 additions and 152 deletions.
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.
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.
10 changes: 9 additions & 1 deletion book/appendix-y-license.Rmd
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
# License {-}
# Using our materials {-}


All PsyTeachR resources are open-access with Creative Commons licences (see below). You are free to reuse, remix, and adapt our materials with attribution. If you do use any of our work, please complete this [short form](https://forms.office.com/e/v8Sk0UpP6Q) so that we can track our impact.

## Licence

This book is licensed under Creative Commons Attribution-ShareAlike 4.0 International License [(CC-BY-SA 4.0)](https://creativecommons.org/licenses/by-sa/4.0/){target="_blank"}. You are free to share and adapt this book. You must give appropriate credit [@psyteachr-template], provide a link to the license, and indicate if changes were made. If you adapt the material, you must distribute your contributions under the same license as the original.







8 changes: 4 additions & 4 deletions book/packages.bib
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ @Manual{R-forcats

@Manual{R-ggplot2,
title = {ggplot2: Create Elegant Data Visualisations Using the Grammar of Graphics},
author = {Hadley Wickham and Winston Chang and Lionel Henry and Thomas Lin Pedersen and Kohske Takahashi and Claus Wilke and Kara Woo and Hiroaki Yutani and Dewey Dunnington},
year = {2023},
note = {R package version 3.4.2},
author = {Hadley Wickham and Winston Chang and Lionel Henry and Thomas Lin Pedersen and Kohske Takahashi and Claus Wilke and Kara Woo and Hiroaki Yutani and Dewey Dunnington and Teun {van den Brand}},
year = {2024},
note = {R package version 3.5.1},
url = {https://CRAN.R-project.org/package=ggplot2},
}

Expand All @@ -51,7 +51,7 @@ @Manual{R-lubridate
title = {lubridate: Make Dealing with Dates a Little Easier},
author = {Vitalie Spinu and Garrett Grolemund and Hadley Wickham},
year = {2023},
note = {R package version 1.9.2},
note = {R package version 1.9.3},
url = {https://CRAN.R-project.org/package=lubridate},
}

Expand Down
Binary file modified book/template.rds
Binary file not shown.
33 changes: 31 additions & 2 deletions docs/01-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ My name is `r name` and I am `r age` years old. It is `r birthday - today` days

As if by magic, that slightly odd bit of text you copied and pasted now appears as a normal sentence with the values pulled in from the objects you created.

**My name is Emily and I am 39 years old. It is 273 days until my birthday.**
**My name is Emily and I am 39 years old. It is 267 days until my birthday.**

We're not going to use this function too often in the rest of the course but hopefully you can see just how useful this would be when writing up a report with lots of numbers. R Markdown is an incredibly powerful and flexible format - this book was written using it!

Expand Down Expand Up @@ -295,6 +295,35 @@ The key thing we want you to take away from this chapter is that R isn't scary.

The glossary at the end of each chapter defines common jargon you might encounter while learning R. This specialised vocabulary can help you to communicate more efficiently and to search for solutions to problems. The terms below link to our [PsyTeachR glossary](https://psyteachr.github.io/glossary/), which contains further information and examples.

|term |definition | |:---------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |character |A data type representing strings of text. | |IDE |Integrated Development Environment: a program that serves as a text editor, file manager, and provides functions to help you read and write code. RStudio is an IDE for R. | |numeric |A data type representing a real decimal number or integer. | |object |A word that identifies and stores the value of some data for later use. | |panes |RStudio is arranged with four window "panes". |
<table>
<thead>
<tr>
<th style="text-align:left;"> term </th>
<th style="text-align:left;"> definition </th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left;"> character </td>
<td style="text-align:left;"> A data type representing strings of text. </td>
</tr>
<tr>
<td style="text-align:left;"> IDE </td>
<td style="text-align:left;"> Integrated Development Environment: a program that serves as a text editor, file manager, and provides functions to help you read and write code. RStudio is an IDE for R. </td>
</tr>
<tr>
<td style="text-align:left;"> numeric </td>
<td style="text-align:left;"> A data type representing a real decimal number or integer. </td>
</tr>
<tr>
<td style="text-align:left;"> object </td>
<td style="text-align:left;"> A word that identifies and stores the value of some data for later use. </td>
</tr>
<tr>
<td style="text-align:left;"> panes </td>
<td style="text-align:left;"> RStudio is arranged with four window "panes". </td>
</tr>
</tbody>
</table>


2 changes: 1 addition & 1 deletion docs/02-stroop.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ library(cowsay)
```

```
## Warning: package 'cowsay' was built under R version 4.3.1
## Warning: package 'cowsay' was built under R version 4.3.3
```

You'll see `library(cowsay)` appear in the console. There's no warning messages or errors so it looks like it has loaded successfully.
Expand Down
6 changes: 3 additions & 3 deletions docs/09-big5.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ For the next set of chapters we're going to use data from the most popular model
<br>

1. The trait 'Agreeableness' in the Big Five personality model refers to:
<div class='webex-radiogroup' id='radio_ERQEPTBNUC'><label><input type="radio" autocomplete="off" name="radio_ERQEPTBNUC" value=""></input> <span>The tendency to be organized, careful, and disciplined</span></label><label><input type="radio" autocomplete="off" name="radio_ERQEPTBNUC" value="answer"></input> <span>The tendency to be compassionate, cooperative, and warm towards others</span></label><label><input type="radio" autocomplete="off" name="radio_ERQEPTBNUC" value=""></input> <span>The tendency to be outgoing, energetic, and sociable</span></label><label><input type="radio" autocomplete="off" name="radio_ERQEPTBNUC" value=""></input> <span>The tendency to experience mood swings, anxiety, and irritability.</span></label></div>
<div class='webex-radiogroup' id='radio_TGGQFYLUVK'><label><input type="radio" autocomplete="off" name="radio_TGGQFYLUVK" value=""></input> <span>The tendency to be organized, careful, and disciplined</span></label><label><input type="radio" autocomplete="off" name="radio_TGGQFYLUVK" value="answer"></input> <span>The tendency to be compassionate, cooperative, and warm towards others</span></label><label><input type="radio" autocomplete="off" name="radio_TGGQFYLUVK" value=""></input> <span>The tendency to be outgoing, energetic, and sociable</span></label><label><input type="radio" autocomplete="off" name="radio_TGGQFYLUVK" value=""></input> <span>The tendency to experience mood swings, anxiety, and irritability.</span></label></div>


<br>

2. In the context of the Big Five Personality model, which trait might be associated with a person who is diligent, efficient, and follows a schedule?

<div class='webex-radiogroup' id='radio_UDHIOZDXNK'><label><input type="radio" autocomplete="off" name="radio_UDHIOZDXNK" value=""></input> <span>Neuroticism</span></label><label><input type="radio" autocomplete="off" name="radio_UDHIOZDXNK" value="answer"></input> <span>Conscientiousness</span></label><label><input type="radio" autocomplete="off" name="radio_UDHIOZDXNK" value=""></input> <span>Extraversion</span></label><label><input type="radio" autocomplete="off" name="radio_UDHIOZDXNK" value=""></input> <span>Agreeableness</span></label></div>
<div class='webex-radiogroup' id='radio_BSHWGLQTDS'><label><input type="radio" autocomplete="off" name="radio_BSHWGLQTDS" value=""></input> <span>Neuroticism</span></label><label><input type="radio" autocomplete="off" name="radio_BSHWGLQTDS" value="answer"></input> <span>Conscientiousness</span></label><label><input type="radio" autocomplete="off" name="radio_BSHWGLQTDS" value=""></input> <span>Extraversion</span></label><label><input type="radio" autocomplete="off" name="radio_BSHWGLQTDS" value=""></input> <span>Agreeableness</span></label></div>


<br>
Expand All @@ -51,7 +51,7 @@ For the next set of chapters we're going to use data from the most popular model
<br>

5. Which of these traits in the Big Five Personality model is most closely associated with creativity and a preference for novelty?
<div class='webex-radiogroup' id='radio_FYHYJONUOB'><label><input type="radio" autocomplete="off" name="radio_FYHYJONUOB" value=""></input> <span>Extraversion</span></label><label><input type="radio" autocomplete="off" name="radio_FYHYJONUOB" value=""></input> <span>Conscientiousness</span></label><label><input type="radio" autocomplete="off" name="radio_FYHYJONUOB" value=""></input> <span>Neuroticism</span></label><label><input type="radio" autocomplete="off" name="radio_FYHYJONUOB" value="answer"></input> <span>Openness to Experience</span></label></div>
<div class='webex-radiogroup' id='radio_EJLDYXDTYN'><label><input type="radio" autocomplete="off" name="radio_EJLDYXDTYN" value=""></input> <span>Extraversion</span></label><label><input type="radio" autocomplete="off" name="radio_EJLDYXDTYN" value=""></input> <span>Conscientiousness</span></label><label><input type="radio" autocomplete="off" name="radio_EJLDYXDTYN" value=""></input> <span>Neuroticism</span></label><label><input type="radio" autocomplete="off" name="radio_EJLDYXDTYN" value="answer"></input> <span>Openness to Experience</span></label></div>



Expand Down
Binary file modified docs/11-resilience1_files/figure-html/unnamed-chunk-18-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 7 additions & 7 deletions docs/13-probability-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ How you tackle probability depends on the type of data/variables you are working

What types of data are the below measurements?

* Time taken to run a marathon (in seconds): <select class='webex-select'><option value='blank'></option><option value=''>ordinal</option><option value='answer'>ratio</option><option value=''>interval</option><option value=''>categorical</option></select>
* Finishing position in marathon (e.g. 1st, 2nd, 3rd): <select class='webex-select'><option value='blank'></option><option value='answer'>ordinal</option><option value=''>categorical</option><option value=''>ratio</option><option value=''>interval</option></select>
* Which Sesame Street character a runner was dressed as: <select class='webex-select'><option value='blank'></option><option value=''>ordinal</option><option value='answer'>categorical</option><option value=''>interval</option><option value=''>ratio</option></select>
* Temperature of a runner dressed in a cookie monster outfit (in degrees Celsius): <select class='webex-select'><option value='blank'></option><option value=''>ordinal</option><option value=''>categorical</option><option value=''>ratio</option><option value='answer'>interval</option></select>
* Time taken to run a marathon (in seconds): <select class='webex-select'><option value='blank'></option><option value=''>interval</option><option value=''>ordinal</option><option value=''>categorical</option><option value='answer'>ratio</option></select>
* Finishing position in marathon (e.g. 1st, 2nd, 3rd): <select class='webex-select'><option value='blank'></option><option value=''>categorical</option><option value=''>ratio</option><option value=''>interval</option><option value='answer'>ordinal</option></select>
* Which Sesame Street character a runner was dressed as: <select class='webex-select'><option value='blank'></option><option value='answer'>categorical</option><option value=''>interval</option><option value=''>ordinal</option><option value=''>ratio</option></select>
* Temperature of a runner dressed in a cookie monster outfit (in degrees Celsius): <select class='webex-select'><option value='blank'></option><option value=''>ratio</option><option value='answer'>interval</option><option value=''>categorical</option><option value=''>ordinal</option></select>

## Probability distributions

Expand Down Expand Up @@ -131,9 +131,9 @@ As with any probabilities, real-world data will come close to the normal distrib

Complete the sentences so that they are correct.

* In a normal distribution, the mean, median, and mode <select class='webex-select'><option value='blank'></option><option value=''>sum to zero</option><option value='answer'>are all equal</option><option value=''>are always different</option></select>.
* In a normal distribution, the further away from the mean an observation is <select class='webex-select'><option value='blank'></option><option value='answer'>the lower its probability of occuring</option><option value=''>the higher its probability of occuring</option></select>.
* Whereas the binomial distribution is based on situations in which there are two possible outcomes, the normal distribution is based on situations in which the data <select class='webex-select'><option value='blank'></option><option value=''>has three possible values</option><option value='answer'>is a continuous variable</option><option value=''>is a categorical variable</option></select>.
* In a normal distribution, the mean, median, and mode <select class='webex-select'><option value='blank'></option><option value='answer'>are all equal</option><option value=''>sum to zero</option><option value=''>are always different</option></select>.
* In a normal distribution, the further away from the mean an observation is <select class='webex-select'><option value='blank'></option><option value=''>the higher its probability of occuring</option><option value='answer'>the lower its probability of occuring</option></select>.
* Whereas the binomial distribution is based on situations in which there are two possible outcomes, the normal distribution is based on situations in which the data <select class='webex-select'><option value='blank'></option><option value=''>has three possible values</option><option value=''>is a categorical variable</option><option value='answer'>is a continuous variable</option></select>.

## Activity 4: Distribution test

Expand Down
Binary file modified docs/13-probability-1_files/figure-html/unnamed-chunk-2-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/14-probability-2_files/figure-html/unnamed-chunk-1-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/14-probability-2_files/figure-html/unnamed-chunk-4-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 14 additions & 14 deletions docs/15-simulation.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ sample(x = c("HEADS", "TAILS"), size = 4, replace = TRUE)
```

```
## [1] "HEADS" "HEADS" "HEADS" "TAILS"
## [1] "HEADS" "TAILS" "HEADS" "HEADS"
```

How many heads did you get? Don't worry if it's different to our example. Run the code again. How many heads did you get this time? How many do you get on each turn if you run the code five more times?
Expand All @@ -53,7 +53,7 @@ sample(x = 0:1, size = 4, replace = TRUE)
```

```
## [1] 1 0 1 1
## [1] 1 0 1 0
```

## Activity 3: `sum()`
Expand All @@ -70,7 +70,7 @@ sample(x = 0:1, size = 4, replace = TRUE) %>% sum()
```

```
## [1] 3
## [1] 1
```

Run this function multiple times (you can use the green markdown play arrow at the top right of the code chunk to make this easy). In our simulation of five sets of four flips we got 1, 3, 2, 2, and 3 heads. So in only one out of the five simulations did we get exactly one heads, i.e., a proportion of .2 or 20% of the time.
Expand All @@ -90,7 +90,7 @@ replicate(n = 20, expr = sample(0:1, 4, TRUE) %>% sum())
```

```
## [1] 2 2 2 2 3 1 1 3 1 3 2 2 2 3 4 2 3 1 1 1
## [1] 2 2 0 2 3 1 2 2 1 2 1 2 1 4 1 2 2 3 2 1
```


Expand All @@ -110,8 +110,8 @@ heads50
```

```
## [1] 3 3 3 4 1 1 3 2 1 1 0 1 2 2 2 1 3 1 2 1 4 1 1 0 3 1 2 3 2 3 1 2 1 3 2 1 3 2
## [39] 2 1 1 2 3 2 1 2 3 1 2 2
## [1] 0 2 2 1 2 3 2 1 2 3 4 3 3 2 2 4 2 1 3 3 2 2 2 0 4 0 2 0 4 4 2 2 4 2 3 2 4 3
## [39] 3 1 2 2 1 3 3 2 1 1 2 2
```

## Activity 6: probability
Expand All @@ -129,11 +129,11 @@ data50 <- tibble(heads = heads50) %>% # convert to a table

| heads| n| p|
|-----:|--:|----:|
| 0| 2| 0.04|
| 1| 18| 0.36|
| 2| 16| 0.32|
| 3| 12| 0.24|
| 4| 2| 0.04|
| 0| 4| 0.08|
| 1| 7| 0.14|
| 2| 21| 0.42|
| 3| 11| 0.22|
| 4| 7| 0.14|

Your numbers may be slightly different to the ones presented in this book - remember that by default, each time you run a simulation, you will get a different random sample.

Expand Down Expand Up @@ -213,7 +213,7 @@ data10K %>%

| p2|
|------:|
| 0.6872|
| 0.6896|

</div>

Expand Down Expand Up @@ -245,8 +245,8 @@ sd(normal)
```

```
## [1] 10.08731
## [1] 2.427028
## [1] 10.11161
## [1] 2.224537
```

Finally, you can visualise your data with a density plot. Try changing the number of data points generated by `rnorm()` from 50 to 500 to 5000 and then see how the shape of the distribution changes.
Expand Down
Binary file modified docs/15-simulation_files/figure-html/data10Khist-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/15-simulation_files/figure-html/data50hist-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/15-simulation_files/figure-html/unnamed-chunk-3-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/15-simulation_files/figure-html/unnamed-chunk-9-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions docs/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<meta name="twitter:image" content="https://psyteachr.github.io/data-skills-v3/images/logos/logo.png">
<!-- JS --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://kit.fontawesome.com/6ecbd6c532.js" crossorigin="anonymous"></script><script src="libs/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href="libs/bootstrap-4.6.0/bootstrap.min.css" rel="stylesheet">
<script src="libs/bootstrap-4.6.0/bootstrap.bundle.min.js"></script><script src="libs/bs3compat-0.4.2/transition.js"></script><script src="libs/bs3compat-0.4.2/tabs.js"></script><script src="libs/bs3compat-0.4.2/bs3compat.js"></script><link href="libs/bs4_book-1.0.0/bs4_book.css" rel="stylesheet">
<script src="libs/bootstrap-4.6.0/bootstrap.bundle.min.js"></script><script src="libs/bs3compat-0.5.0/transition.js"></script><script src="libs/bs3compat-0.5.0/tabs.js"></script><script src="libs/bs3compat-0.5.0/bs3compat.js"></script><link href="libs/bs4_book-1.0.0/bs4_book.css" rel="stylesheet">
<script src="libs/bs4_book-1.0.0/bs4_book.js"></script><script src="libs/kePrint-0.0.1/kePrint.js"></script><link href="libs/lightable-0.0.1/lightable.css" rel="stylesheet">
<!-- Global site tag (gtag.js) - Google Analytics --><script async src="https://www.googletagmanager.com/gtag/js?id=G-6NP3MF25W3"></script><script>
window.dataLayer = window.dataLayer || [];
Expand Down Expand Up @@ -99,7 +99,7 @@ <h1>
<li><a class="" href="symbols.html"><span class="header-section-number">A</span> Symbols</a></li>
<li><a class="" href="conventions.html"><span class="header-section-number">B</span> Conventions</a></li>
<li><a class="" href="server-troubleshooting.html"><span class="header-section-number">C</span> Server troubleshooting</a></li>
<li><a class="" href="license.html">License</a></li>
<li><a class="" href="using-our-materials.html">Using our materials</a></li>
<li><a class="" href="references.html">References</a></li>
</ul>

Expand Down Expand Up @@ -328,7 +328,7 @@ <h1>Page not found<a class="anchor" aria-label="anchor" href="#page-not-found"><
<footer class="bg-primary text-light mt-5"><div class="container"><div class="row">

<div class="col-12 col-md-6 mt-3">
<p>"<strong>Data Skills</strong>" was written by Emily Nordmann. It was last built on 2024-10-11.</p>
<p>"<strong>Data Skills</strong>" was written by Emily Nordmann. It was last built on 2024-10-17.</p>
</div>

<div class="col-12 col-md-6 mt-3">
Expand Down
Loading

0 comments on commit 545ba90

Please sign in to comment.