Department of Psychology, Lancaster University
Tip
Ask me anything:
We are working together to develop concepts:
We are working together to develop skills:
lm(mean.acc ~ SHIPLEY)We often want to know about relationships
Link: concepts, questions \(\rightarrow\) assumptions \(\rightarrow\) testable predictions
lm function and the model mean.acc ~ SHIPLEYdata = clearly.one.subjectssummary(model)Take a good look:
You will see this sentence structure in coding for many different analysis types
method(outcome ~ predictors)method could be aov, brm, lm, glm, glmm, lmer, t.test, cor.test
Call:
lm(formula = mean.acc ~ SHIPLEY, data = clearly.one.subjects)
Residuals:
Min 1Q Median 3Q Max
-0.42871 -0.04921 0.02079 0.07480 0.18430
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.44914 0.08053 5.577 9.67e-08 ***
SHIPLEY 0.01050 0.00229 4.585 8.85e-06 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.1115 on 167 degrees of freedom
Multiple R-squared: 0.1118, Adjusted R-squared: 0.1065
F-statistic: 21.03 on 1 and 167 DF, p-value: 8.846e-06
\[y = a + bx\]
\(\text{predicted y} = 0.449 + \text{0.011 } \times \text{ Shipley score of } 20\)
Figure 9: The predicted change in mean comprehension accuracy, given variation in vocabulary scores
We need to go back to the prediction model
Usually, this means there are differences between the expected outcomes that the model predicts and the observed outcomes
Figure 10: The predicted change in mean comprehension accuracy, given variation in vocabulary scores. Observed values are shown in orange-red. Predicted values are shown in blue
summary() of the linear model shows …Estimate of the Coefficient of the effect of individual differences in vocabulary (SHIPLEY)mean.acc value changes, given differences in SHIPLEY scoret value and Pr(> |t|) statistics for the coefficient t-testR-squared and F-statistic
Call:
lm(formula = mean.acc ~ SHIPLEY, data = clearly.one.subjects)
Residuals:
Min 1Q Median 3Q Max
-0.42871 -0.04921 0.02079 0.07480 0.18430
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.44914 0.08053 5.577 9.67e-08 ***
SHIPLEY 0.01050 0.00229 4.585 8.85e-06 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.1115 on 167 degrees of freedom
Multiple R-squared: 0.1118, Adjusted R-squared: 0.1065
F-statistic: 21.03 on 1 and 167 DF, p-value: 8.846e-06
0.01050Std. Error (standard error) 0.00229 for that estimatetvalue 4.585 and associated Pr(>|t|) p-value 8.85e-06 for the null hypothesis test of the coefficient
Call:
lm(formula = mean.acc ~ SHIPLEY, data = clearly.one.subjects)
Residuals:
Min 1Q Median 3Q Max
-0.42871 -0.04921 0.02079 0.07480 0.18430
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.44914 0.08053 5.577 9.67e-08 ***
SHIPLEY 0.01050 0.00229 4.585 8.85e-06 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.1115 on 167 degrees of freedom
Multiple R-squared: 0.1118, Adjusted R-squared: 0.1065
F-statistic: 21.03 on 1 and 167 DF, p-value: 8.846e-06
0.01050) a positive or a negative number?
Call:
lm(formula = mean.acc ~ SHIPLEY, data = clearly.one.subjects)
Residuals:
Min 1Q Median 3Q Max
-0.42871 -0.04921 0.02079 0.07480 0.18430
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.44914 0.08053 5.577 9.67e-08 ***
SHIPLEY 0.01050 0.00229 4.585 8.85e-06 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.1115 on 167 degrees of freedom
Multiple R-squared: 0.1118, Adjusted R-squared: 0.1065
F-statistic: 21.03 on 1 and 167 DF, p-value: 8.846e-06
\[t = \frac{\beta_j}{s_{\beta_j}}\]
\[t = \frac{\beta_j}{s_{\beta_j}}\]
\[t = \frac{\beta_j}{s_{\beta_j}}\]
Multiple R-squared and Adjusted R-squaredAdjusted R-squared because it tends to be more accurate
Call:
lm(formula = mean.acc ~ SHIPLEY, data = clearly.one.subjects)
Residuals:
Min 1Q Median 3Q Max
-0.42871 -0.04921 0.02079 0.07480 0.18430
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.44914 0.08053 5.577 9.67e-08 ***
SHIPLEY 0.01050 0.00229 4.585 8.85e-06 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.1115 on 167 degrees of freedom
Multiple R-squared: 0.1118, Adjusted R-squared: 0.1065
F-statistic: 21.03 on 1 and 167 DF, p-value: 8.846e-06
Call:
lm(formula = mean.acc ~ SHIPLEY, data = clearly.one.subjects)
Residuals:
Min 1Q Median 3Q Max
-0.42871 -0.04921 0.02079 0.07480 0.18430
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.44914 0.08053 5.577 9.67e-08 ***
SHIPLEY 0.01050 0.00229 4.585 8.85e-06 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.1115 on 167 degrees of freedom
Multiple R-squared: 0.1118, Adjusted R-squared: 0.1065
F-statistic: 21.03 on 1 and 167 DF, p-value: 8.846e-06
Call:
lm(formula = mean.acc ~ SHIPLEY, data = clearly.one.subjects)
Residuals:
Min 1Q Median 3Q Max
-0.42871 -0.04921 0.02079 0.07480 0.18430
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.44914 0.08053 5.577 9.67e-08 ***
SHIPLEY 0.01050 0.00229 4.585 8.85e-06 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.1115 on 167 degrees of freedom
Multiple R-squared: 0.1118, Adjusted R-squared: 0.1065
F-statistic: 21.03 on 1 and 167 DF, p-value: 8.846e-06
Here is an example of results reporting text that is conventional:
We fitted a linear model with mean comprehension accuracy as the outcome and vocabulary (Shipley) as the predictor. Our analysis indicated a significant effect of vocabulary knowledge. The model is significant overall, with \(F(1, 167) = 21.03, p < .001\), and explains 11% of variance (\(\text{adjusted } R^2 = 0.11\)). The model estimates showed that the accuracy of comprehension increased with increasing levels of participant vocabulary knowledge (\(\beta = .011, t = 4.59, p <.001\)).
We fitted a linear model with mean comprehension accuracy as the outcome and vocabulary (Shipley) as the predictor. Our analysis indicated a significant effect of vocabulary knowledge. The model is significant overall, with \(F(1, 167) = 21.03, p < .001\), and explains 11% of variance (\(\text{adjusted } R^2 = 0.11\)). The model estimates showed that the accuracy of comprehension increased with increasing levels of participant vocabulary knowledge (\(\beta = .011, t = 4.59, p <.001\)).