Lab exercise 4
Please upload your knitted .pdf file on Moodle by 23:59.
Again, we consider two tests:
- Test 1 is developed to measure some current trait; it is used to predict a future criterion;
- The future criterion is measured by another test, Test 2.
In this case:
- An individual’s total score on Test 1 is the “Test score” (\(X\));
- An individual’s total score on Test 2 is the “Criterion score” (\(Y\));
- The correlation between observed score on Test 1 (\(X\)) and observed score on Test 2 (\(Y\)) is a measure of how well Test 1 predicts the criterion, namely the criterion-related validity.
The response data sets for the two tests can be found:
Import the two response data sets and name as
test1
andtest2
.Obtain the total scores of examinees from the two tests and name as
X
andY
.Draw the scatter plot of
X
andY
.Compute the pearson correlation between
X
andY
.Fit a regression model predicting score on test 2 using that on test 1. Print the regression coefficients.
Draw the fitted regression line on top of the scatter plot of
X
andY
.Suppose an examinee got a score of 6 on test 1, what is the predicted criterion score and the 95% confidence interval?
- Bonus questions
These questions are just for those of you who want to challenge yourself. You do not need to include the answers of these questions in your .pdf file.
Do the following without using the lm()
or predict()
functions.
Obtain the regression coefficients.
Predict the criterion score for an examinee who got a score of 6 on test 1.