Publications by Jen Richmond
mediation
mediation library(tidyverse) library(psych) library(MeMoBootR) Mediation From statistics of doom YouTube. Baron and Kenny (1986) method: 4 steps Path C total effect: the predictor predicts the outcome (X predicts Y). This step determines that there is a relation between X and Y that might be mediated by something else. Path A: the predictor pre...
2265 sym 7 img
Tidy Tuesday emissions data in python
emissions in python I have been learning python via the Posit Academy for 5 weeks now and just going to set myself a little challenge to check in re how much I have learned. I am going to pick a Tidy Tuesday dataset and see if I can reproduce the process I would typically do in R, in Python. This data comes from the Tidy Tuesday challenge and cont...
6346 sym 7 img 2 tbl
ancova
Useful resource https://towardsdatascience.com/doing-and-reporting-your-first-anova-and-ancova-in-r-1d820940f2ef library(tidyverse) library(emmeans) library(car) library(afex) library(rstatix) library(datarium) library(report) library(kableExtra) options(scipen = 999) # no scientific notation The anxiety dataset (from datarium) has a between subje...
3472 sym R (7070 sym/47 pcs) 4 img 5 tbl
PSYC2061 distributions
critique mean sd 68.53071 9.509312 script mean sd 67.92611 8.666921 video mean sd 68.67342 8.80829 course total passed_already n percent no 208 0.5048544 yes 204 0.4951456...
62 sym 4 img 4 tbl
Week 3 self test
Welcome to the PSYC3361 coding W3 self test. The test assesses your ability to use the coding skills covered in the Week 3 online coding modules. In particular, it assesses your ability to… load packages read data select rename group_by and summarise make plots mutate and case_when It is IMPORTANT to document the code that you write so that som...
5636 sym R (3654 sym/19 pcs) 3 img
Week 2 self test
load the packages you need library(tidyverse) library(here) read in the dino data dino <- read_csv(here("dino.csv")) ## Rows: 1846 Columns: 3 ## ── Column specification ──────────────────────────────────────────────────────── ## Deli...
648 sym R (1916 sym/9 pcs) 3 img
w1 self test
1. customise your Rmd document by adding your name as the author, a table of contents and choosing a theme that you like. 2. load the packages you will need For this exercise, I am loading the tidyverse package and the here package. Tidyverse contains functions to read in the data read_csv and to create gruoped summaries (group_by and summarise). ...
2063 sym R (1112 sym/7 pcs) 1 img
Read Me example for Sahar + Riley
May 20, 2020 HI Sahar and Riley, here is an example of a readme file I am trying to get in the habit of making for each R project. It is good to get into the habit of documenting what a project contains. It is important that you leave yourself breadcrumbs so that when you come back to your project you can quickly work out which scripts run on whi...
3233 sym
dplyr tricks
library(tidyverse) library(janitor) DPLYR Using select helpers When working with LONG variable names use starts with, contains, or ends with to select (or rename, summarise) variables based on part of the name. # get some data iris_demo <- iris %>% clean_names() petal <- iris_demo %>% select(starts_with("petal"), species) width <- iris_de...
955 sym R (650 sym/5 pcs)
bank transactions
There is no doubt that COVID19 has massively disrupted how we spend our time and money. In this post, I update code inspired by this R-bloggers blog to look at how much less money we have been spending on eating in the last month, compared to April 2019. Download a copy of your bank transactions in csv format. Load packages library(tidyverse) li...
1046 sym R (2595 sym/7 pcs) 1 img