Course Notes
Course:
About the Author
1
Week 1 Friday Workshop
1.1
A focus on workflow
1.2
R works with plug-ins
1.3
Software Choice
1.3.1
Mac
1.3.2
PC
1.4
Run RStudio not R
1.5
RStudio configuration, First run only
1.6
Begin with an RStudio Project
1.7
Exploring the R Studio Interface
1.7.1
Console panel
1.7.2
Script Panel
1.8
Writing your first script
1.8.1
Create the script file
1.8.2
Add a comment to your script
1.8.3
Background about the tidyverse
1.8.4
Add library(tidyverse) to your script
1.8.5
Activate tidyverse auto-complete for your script
1.9
Loading your data
1.9.1
Use read_csv (not read.csv) to open files.
1.10
Checking out your data
1.10.1
view(): See a spreadsheet view of your data
1.10.2
print(): See you data in the Console
1.10.3
head(): Check out the first few rows of data
1.10.4
tail(): Check out the last few rows of data
1.10.5
summary(): Quick summaries
1.11
Run
vs.
Source with Echo
vs.
Source
1.11.1
Run select text
1.11.2
Source (without Echo)
1.11.3
Source with Echo
1.12
Trying Source with Echo
1.13
A few key points about
1.13.1
Lists
1.14
Revisiting read_csv()
1.15
That’s it!
2
Handling Data with the Tidyverse
2.1
Required
2.2
Objective
2.3
Using the Console
2.4
Tidyverse help with the Introverse
2.5
Basic tidyverse commands
2.5.1
select()
2.5.2
summarise()
2.5.3
filter()
2.5.4
group_by()
2.5.5
mutate()
2.6
Advanced tidyverse commands
2.6.1
select()
2.6.2
summarise()
2.6.3
mutate()
2.7
Using help
2.8
Base R vs tidyverse
2.8.1
Tibbles vs. data frames
2.8.2
read.csv() and data frames
2.8.3
read_csv() and tibbles
3
Week 2 Friday Workshop
3.1
Required Packages
3.2
Goals
3.3
Data and column names
3.4
Install packages
3.5
RStudio Project
3.5.1
Make a script
3.6
Loading data
3.7
Clean and screen the data
3.7.1
Numeric screening
3.8
Flipping responses to reverse-key items
3.9
Making scale scores
3.10
Descriptive statistics for scale scores
4
Week 3 Friday Workshop
4.1
Required Packages
4.2
Goals
4.3
Data and column names
4.4
Install packages
4.5
RStudio Project
4.5.1
Make a script
4.6
Week 2 Catchup
4.7
Creating composite/scale scores
4.8
Variance of scale scores
4.9
Variance of items
4.9.1
Approach 1
4.9.2
Approach 2
4.10
Variance of affect_sum column
5
Week 4 Friday Workshop
5.1
Required Packagess
5.2
Goals
5.3
Install packages
5.4
RStudio Project
5.4.1
Make a script
5.5
Code Catchup
5.6
Reliability
5.7
Big picture for today
5.8
Cronbach’s Alpha
5.8.1
Alpha via covariance matrix
5.8.2
Alpha via psych package
5.9
Standardized Alpha
5.9.1
Standardized Alpha via correlation matrix
5.9.2
Standardized Alpha via psych package
5.10
Walk away
6
Week 5 Friday Workshop
6.1
Required Packagess
6.2
Goals
6.3
RStudio Project
6.3.1
Make a script
6.4
Loading data
6.5
True scores and errors
6.6
Observed scores
6.7
Column variances
6.8
Observed score variance
6.9
True score variance
6.10
Variance random measurement errors
6.11
Variance sum rule
6.12
Reliability
6.12.1
Approach 1: True score variance
6.12.2
Approach 2: Error variance
6.12.3
Approach 3: Correlation true/observed
6.12.4
Approach 4: Correlation error/observed
6.13
Recap
7
Weeks 6/7 Friday Workshops
7.1
Deductive scale construction
7.1.1
Impulsivity example
7.1.2
Affective commitment example
7.2
Definition review of the literature
7.3
Creating your own definition
7.4
Writing items
7.5
Item submission
8
Week 9 Friday Workshop
8.1
Required Packages
8.2
Goals
8.3
Create a project
8.4
Activate the packages
8.5
Load your data raw data
8.6
Make analytic data
8.7
Flipping responses to reverse-key items
8.8
Item descriptive statistics
8.9
Item correlations
8.10
Initial Cronbach’s Alpha
8.11
WARNINGS
8.11.1
Warning 1
8.11.2
Warning 2
8.12
Create “Item-Reliablity Index”
8.13
Sorting by item-reliability index
8.14
Creating the final scale
8.14.1
Calculate Alpha for final scale
8.14.2
Obtain scale scores
8.15
Final scores: Range of values
8.16
Graphing final scores
8.17
Exporting the graph
9
Notation
9.1
Measurement Notation
10
Scaling
10.1
Data entry
10.2
Loading data
10.3
Viewing data
10.4
Summary statistics
10.5
Converting units
10.5.1
Inches
10.5.2
z
-scores
10.5.3
T-scores
10.6
Frame of references
10.6.1
All participants
10.6.2
Male reference
10.6.3
Canadian reference
10.7
Summary
11
Percentiles
11.1
Assuming a normal distribution approach
11.1.1
A single case
11.1.2
Many cases using R
11.2
Assumption free approach
12
Graphing
12.1
Required
12.2
Data
12.3
Graph basics
12.4
Graphing efficiently
12.5
Aesthetics
12.5.1
Fill color
12.5.2
Overriding aes()
12.6
APA style
12.7
Axes
12.7.1
Range
12.7.2
Ticks
12.7.3
Labels
12.8
Axis values
12.8.1
Text
12.8.2
Angle
12.8.3
Alignment
12.8.4
Order
12.8.5
Legend order
12.9
Custom colours
12.9.1
R palette
12.9.2
Hex colours
12.10
Emoji
12.11
Accessible Colors
12.11.1
RColorBrewer
12.11.2
Avoid color
12.12
Saving
12.12.1
MAC
12.12.2
PC or MAC
References
Published with bookdown
Welcome!
References
Margulis, Dan. 2005.
Photoshop LAB Color: The Canyon Conundrum and Other Adventures in the Most Powerful Colorspace
. Peachpit Press.