Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Summary

Summary R - cheatsheet Experimental Correlation Research | Leiden University | 2025/26

Rating
-
Sold
-
Pages
11
Uploaded on
13-05-2026
Written in
2025/2026

Study material for the Experimental Correlation Research course at Universiteit Leiden covering weeks 1-7 of the 2025/2026 academic year. The document includes worked examples and R code for correlations, simple linear regression, and multiple linear regression, with practical applications predicting school performance from motivation and intelligence. Ideal for understanding statistical testing, confidence intervals, and APA-style reporting of results—essential preparation for both coursework and exams in this psychology methodology course.

Show more Read less
Institution
Course

Content preview

Week 1: Correlations —--------------------------------------------------------------------------------------
#a) Create a scatterplot
plot(x = performance$motiv, y = performance$perf)

#b) test if the correlation betwee motivation & performance differs from 0
cor.test(x = performance$motiv, y = performance$perf, method = "pearson")

#g) Does the correlation differ significantly from 0? Report t, df, and p
t(281) = 7.0994, p < .001

#calculate the Pearson r between X & Y and formulate hypotheses
r = 6.00/(8 − 1) = .857
H0 : ρ = 0 and Ha : ρ ̸= 0

#Test with the t-test whether the correlation coefficient deviates significantly from
0.Formulate both a statistical and a substantive conclusion.


p < α → H0 rejected: Strong, positive
association between emotional stability and immunity to stress
# Calculate p value: 2 * pt(4.07, df = 6, lower.tail = FALSE)

Week 2: Simple Linear Regression—----------------------------------------------------------------------
2.2 #a) Set up linear model to predict school performance from motivation
lm_perf <- lm(perf ~ motiv, data = performance)

#b) show results in console: summary(lm_perf)

#c) What is value of R2 ?What will happen to R2 if a second predictor is added to the model?
R^2 = .1521: proportion of variance accounted for in the sample, becomes higher

#d) What is value of R2 adj? What is the meaning of this value? Why is this value always lower
than that of R2 ? R^2 adj = .1491; proportion of variance accounted for in the population

#e) Write down the regression equation. What is the meaning of the coefficients? Is
motivation a significant predictor or school performance? Report t, df, and p.




Yes, t(281) = 7.099, p < .001
#i) Determine 90%, 95%, and 99% confidence intervals

, # add regression line to scatterplot
abline(lm_perf, col = "red", lwd = 2, lty = "dashed")

#Formulate a substantive conclusion and report the statistics in APA style
Motivation is a significant predictor of school performance, b = 0.01, t(281) = 7.10, p < .001.
Motivation explains 15.2% of the variance in school performance.

2.3 #Determine the 95% CI of regression coefficient b1 (SEb1 = 0.157). Formulate the
hypotheses to test the regression coefficient b1
CI = 0.637 ± 2.447 × 0.157 → [0.253; 1.021]
H0 : β1 = 0 and Ha : β1 ̸= 0




# Test whether regression coefficient b1 differs significantly from 0 (SEb1 = 0.157). Formulate
both a statistical and a substantive conclusion.



t(6) = 0.637 0.157 = 4.057, p = .007
p < α → H0 rejected: Emotional stability significant predictor of immunity to stress.

Week 3: Multiple Linear Regression ---------------------------------------------------------------------
3.3 #a) Carry out a regression analysis to predict school performance based on intelligence
and motivation. Store the model as lm perf2
lm_perf2 <- lm(perf ~ motiv + intel, data = performance)
summary(lm_perf2)

#g) Calculate the value of R? What is the meaning of this value?
R^2 = R2 = .5066; proportion of variance accounted for in the sample
R = √ .5066 = .7118; correlation between observed and predicted values

#h) Is the F-value for testing the model significant? (F, df, and p)
Yes, F(2, 280) = 143.8, p < .001

#i) Write down the regression equation. What is the meaning of the coefficients? j) Are
intelligence and motivation significant predictors of performance? (t, df, and p)
Motivation +1 → predicted performance +0.012
Intelligence +1 → predicted performance +0.059 1
Intelligence = Motivation = 0 → predicted performance = −1.451
Intelligence is significant, t(280) = 8.049, p < .001 and motivation is signficant, t(280) = 14.186, p
< .001.

#k) Determine confidence intervals
confint(object = lm_perf2, level = 0.95)

Written for

Institution
Study
Course

Document information

Uploaded on
May 13, 2026
Number of pages
11
Written in
2025/2026
Type
SUMMARY

Subjects

$5.94
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
muallagn

Get to know the seller

Seller avatar
muallagn Universiteit Leiden
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
1 year
Number of followers
0
Documents
3
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions