#1. Set the working directory and import data from the excel file.
setwd("C:/Users/User/OneDrive/Rutgers/Psychometrics/Final Project")
MT_Rdata <- readxl::read_excel("MTdata.xlsx")
#2. Snapshot of the data (top few rows of data set)
names(MT_Rdata)
## [1] "RandomID" "Question1" "Question2" "Question3" "Question4"
## [6] "Question5" "Question6" "Question7" "Question8" "Question9"
## [11] "Question10" "Question11" "Question12" "Question13" "Question14"
## [16] "Question15" "Question16" "Question17" "Question18" "Question19"
## [21] "Question20" "Question21" "Question22" "Question23" "Question24"
## [26] "Question25" "Question26" "Question27" "Question28" "Question29"
## [31] "Question30" "Question31" "Question32" "Question33" "Question34"
## [36] "Question35" "Question36" "Question37" "Question38" "Question39"
## [41] "Question40" "n correct" "n incorrect" "score"
head(MT_Rdata)
## # A tibble: 6 × 44
## RandomID Question1 Question2 Question3 Question4 Question5 Question6 Question7
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 10209 1 1 1 0 1 1 1
## 2 10580 1 1 1 0 1 1 1
## 3 23021 0 1 0 0 1 1 1
## 4 24774 1 1 1 0 1 1 1
## 5 50915 1 1 1 1 1 1 1
## 6 85187 1 1 1 1 1 1 1
## # ℹ 36 more variables: Question8 <dbl>, Question9 <dbl>, Question10 <dbl>,
## # Question11 <dbl>, Question12 <dbl>, Question13 <dbl>, Question14 <dbl>,
## # Question15 <dbl>, Question16 <dbl>, Question17 <dbl>, Question18 <dbl>,
## # Question19 <dbl>, Question20 <dbl>, Question21 <dbl>, Question22 <dbl>,
## # Question23 <dbl>, Question24 <dbl>, Question25 <dbl>, Question26 <dbl>,
## # Question27 <dbl>, Question28 <dbl>, Question29 <dbl>, Question30 <dbl>,
## # Question31 <dbl>, Question32 <dbl>, Question33 <dbl>, Question34 <dbl>, …
str(MT_Rdata)
## tibble [6 × 44] (S3: tbl_df/tbl/data.frame)
## $ RandomID : num [1:6] 10209 10580 23021 24774 50915 ...
## $ Question1 : num [1:6] 1 1 0 1 1 1
## $ Question2 : num [1:6] 1 1 1 1 1 1
## $ Question3 : num [1:6] 1 1 0 1 1 1
## $ Question4 : num [1:6] 0 0 0 0 1 1
## $ Question5 : num [1:6] 1 1 1 1 1 1
## $ Question6 : num [1:6] 1 1 1 1 1 1
## $ Question7 : num [1:6] 1 1 1 1 1 1
## $ Question8 : num [1:6] 1 1 1 1 1 1
## $ Question9 : num [1:6] 1 1 1 1 1 1
## $ Question10 : num [1:6] 0 1 0 1 1 1
## $ Question11 : num [1:6] 1 0 0 1 1 1
## $ Question12 : num [1:6] 1 1 1 1 1 1
## $ Question13 : num [1:6] 1 1 1 1 1 1
## $ Question14 : num [1:6] 1 1 1 1 1 1
## $ Question15 : num [1:6] 1 1 1 1 1 1
## $ Question16 : num [1:6] 1 1 1 1 1 1
## $ Question17 : num [1:6] 0 0 1 1 1 0
## $ Question18 : num [1:6] 0 1 1 1 1 1
## $ Question19 : num [1:6] 1 1 1 1 1 1
## $ Question20 : num [1:6] 1 1 0 0 1 1
## $ Question21 : num [1:6] 0 1 1 1 1 1
## $ Question22 : num [1:6] 1 1 0 1 1 1
## $ Question23 : num [1:6] 1 1 0 1 1 1
## $ Question24 : num [1:6] 1 1 1 1 1 1
## $ Question25 : num [1:6] 1 1 1 1 1 0
## $ Question26 : num [1:6] 0 0 0 0 1 1
## $ Question27 : num [1:6] 0 1 0 0 1 1
## $ Question28 : num [1:6] 1 1 0 1 1 1
## $ Question29 : num [1:6] 1 1 1 1 1 1
## $ Question30 : num [1:6] 1 1 1 0 1 0
## $ Question31 : num [1:6] 1 1 1 1 1 1
## $ Question32 : num [1:6] 1 1 1 1 1 1
## $ Question33 : num [1:6] 1 1 1 1 1 1
## $ Question34 : num [1:6] 1 1 1 1 1 1
## $ Question35 : num [1:6] 0 1 1 1 1 1
## $ Question36 : num [1:6] 0 0 1 1 1 1
## $ Question37 : num [1:6] 0 1 1 1 1 1
## $ Question38 : num [1:6] 1 1 1 1 1 1
## $ Question39 : num [1:6] 1 1 1 1 1 1
## $ Question40 : num [1:6] 1 1 1 1 1 1
## $ n correct : num [1:6] 30 35 29 35 40 37
## $ n incorrect: num [1:6] 10 5 11 5 0 3
## $ score : num [1:6] 30 35 29 35 40 37
#3 Compute and print selected statistical descriptives of the test items and total scores
#install.packages("psych")
library(psych)
(MT_stat <- describe(MT_Rdata[2:41]))
## vars n mean sd median trimmed mad min max range skew kurtosis
## Question1 1 6 0.83 0.41 1.0 0.83 0.00 0 1 1 -1.36 -0.08
## Question2 2 6 1.00 0.00 1.0 1.00 0.00 1 1 0 NaN NaN
## Question3 3 6 0.83 0.41 1.0 0.83 0.00 0 1 1 -1.36 -0.08
## Question4 4 6 0.33 0.52 0.0 0.33 0.00 0 1 1 0.54 -1.96
## Question5 5 6 1.00 0.00 1.0 1.00 0.00 1 1 0 NaN NaN
## Question6 6 6 1.00 0.00 1.0 1.00 0.00 1 1 0 NaN NaN
## Question7 7 6 1.00 0.00 1.0 1.00 0.00 1 1 0 NaN NaN
## Question8 8 6 1.00 0.00 1.0 1.00 0.00 1 1 0 NaN NaN
## Question9 9 6 1.00 0.00 1.0 1.00 0.00 1 1 0 NaN NaN
## Question10 10 6 0.67 0.52 1.0 0.67 0.00 0 1 1 -0.54 -1.96
## Question11 11 6 0.67 0.52 1.0 0.67 0.00 0 1 1 -0.54 -1.96
## Question12 12 6 1.00 0.00 1.0 1.00 0.00 1 1 0 NaN NaN
## Question13 13 6 1.00 0.00 1.0 1.00 0.00 1 1 0 NaN NaN
## Question14 14 6 1.00 0.00 1.0 1.00 0.00 1 1 0 NaN NaN
## Question15 15 6 1.00 0.00 1.0 1.00 0.00 1 1 0 NaN NaN
## Question16 16 6 1.00 0.00 1.0 1.00 0.00 1 1 0 NaN NaN
## Question17 17 6 0.50 0.55 0.5 0.50 0.74 0 1 1 0.00 -2.31
## Question18 18 6 0.83 0.41 1.0 0.83 0.00 0 1 1 -1.36 -0.08
## Question19 19 6 1.00 0.00 1.0 1.00 0.00 1 1 0 NaN NaN
## Question20 20 6 0.67 0.52 1.0 0.67 0.00 0 1 1 -0.54 -1.96
## Question21 21 6 0.83 0.41 1.0 0.83 0.00 0 1 1 -1.36 -0.08
## Question22 22 6 0.83 0.41 1.0 0.83 0.00 0 1 1 -1.36 -0.08
## Question23 23 6 0.83 0.41 1.0 0.83 0.00 0 1 1 -1.36 -0.08
## Question24 24 6 1.00 0.00 1.0 1.00 0.00 1 1 0 NaN NaN
## Question25 25 6 0.83 0.41 1.0 0.83 0.00 0 1 1 -1.36 -0.08
## Question26 26 6 0.33 0.52 0.0 0.33 0.00 0 1 1 0.54 -1.96
## Question27 27 6 0.50 0.55 0.5 0.50 0.74 0 1 1 0.00 -2.31
## Question28 28 6 0.83 0.41 1.0 0.83 0.00 0 1 1 -1.36 -0.08
## Question29 29 6 1.00 0.00 1.0 1.00 0.00 1 1 0 NaN NaN
## Question30 30 6 0.67 0.52 1.0 0.67 0.00 0 1 1 -0.54 -1.96
## Question31 31 6 1.00 0.00 1.0 1.00 0.00 1 1 0 NaN NaN
## Question32 32 6 1.00 0.00 1.0 1.00 0.00 1 1 0 NaN NaN
## Question33 33 6 1.00 0.00 1.0 1.00 0.00 1 1 0 NaN NaN
## Question34 34 6 1.00 0.00 1.0 1.00 0.00 1 1 0 NaN NaN
## Question35 35 6 0.83 0.41 1.0 0.83 0.00 0 1 1 -1.36 -0.08
## Question36 36 6 0.67 0.52 1.0 0.67 0.00 0 1 1 -0.54 -1.96
## Question37 37 6 0.83 0.41 1.0 0.83 0.00 0 1 1 -1.36 -0.08
## Question38 38 6 1.00 0.00 1.0 1.00 0.00 1 1 0 NaN NaN
## Question39 39 6 1.00 0.00 1.0 1.00 0.00 1 1 0 NaN NaN
## Question40 40 6 1.00 0.00 1.0 1.00 0.00 1 1 0 NaN NaN
## se
## Question1 0.17
## Question2 0.00
## Question3 0.17
## Question4 0.21
## Question5 0.00
## Question6 0.00
## Question7 0.00
## Question8 0.00
## Question9 0.00
## Question10 0.21
## Question11 0.21
## Question12 0.00
## Question13 0.00
## Question14 0.00
## Question15 0.00
## Question16 0.00
## Question17 0.22
## Question18 0.17
## Question19 0.00
## Question20 0.21
## Question21 0.17
## Question22 0.17
## Question23 0.17
## Question24 0.00
## Question25 0.17
## Question26 0.21
## Question27 0.22
## Question28 0.17
## Question29 0.00
## Question30 0.21
## Question31 0.00
## Question32 0.00
## Question33 0.00
## Question34 0.00
## Question35 0.17
## Question36 0.21
## Question37 0.17
## Question38 0.00
## Question39 0.00
## Question40 0.00
(MT_print <- MT_stat[-c(2,6:10)])
## vars mean sd median skew kurtosis se
## Question1 1 0.83 0.41 1.0 -1.36 -0.08 0.17
## Question2 2 1.00 0.00 1.0 NaN NaN 0.00
## Question3 3 0.83 0.41 1.0 -1.36 -0.08 0.17
## Question4 4 0.33 0.52 0.0 0.54 -1.96 0.21
## Question5 5 1.00 0.00 1.0 NaN NaN 0.00
## Question6 6 1.00 0.00 1.0 NaN NaN 0.00
## Question7 7 1.00 0.00 1.0 NaN NaN 0.00
## Question8 8 1.00 0.00 1.0 NaN NaN 0.00
## Question9 9 1.00 0.00 1.0 NaN NaN 0.00
## Question10 10 0.67 0.52 1.0 -0.54 -1.96 0.21
## Question11 11 0.67 0.52 1.0 -0.54 -1.96 0.21
## Question12 12 1.00 0.00 1.0 NaN NaN 0.00
## Question13 13 1.00 0.00 1.0 NaN NaN 0.00
## Question14 14 1.00 0.00 1.0 NaN NaN 0.00
## Question15 15 1.00 0.00 1.0 NaN NaN 0.00
## Question16 16 1.00 0.00 1.0 NaN NaN 0.00
## Question17 17 0.50 0.55 0.5 0.00 -2.31 0.22
## Question18 18 0.83 0.41 1.0 -1.36 -0.08 0.17
## Question19 19 1.00 0.00 1.0 NaN NaN 0.00
## Question20 20 0.67 0.52 1.0 -0.54 -1.96 0.21
## Question21 21 0.83 0.41 1.0 -1.36 -0.08 0.17
## Question22 22 0.83 0.41 1.0 -1.36 -0.08 0.17
## Question23 23 0.83 0.41 1.0 -1.36 -0.08 0.17
## Question24 24 1.00 0.00 1.0 NaN NaN 0.00
## Question25 25 0.83 0.41 1.0 -1.36 -0.08 0.17
## Question26 26 0.33 0.52 0.0 0.54 -1.96 0.21
## Question27 27 0.50 0.55 0.5 0.00 -2.31 0.22
## Question28 28 0.83 0.41 1.0 -1.36 -0.08 0.17
## Question29 29 1.00 0.00 1.0 NaN NaN 0.00
## Question30 30 0.67 0.52 1.0 -0.54 -1.96 0.21
## Question31 31 1.00 0.00 1.0 NaN NaN 0.00
## Question32 32 1.00 0.00 1.0 NaN NaN 0.00
## Question33 33 1.00 0.00 1.0 NaN NaN 0.00
## Question34 34 1.00 0.00 1.0 NaN NaN 0.00
## Question35 35 0.83 0.41 1.0 -1.36 -0.08 0.17
## Question36 36 0.67 0.52 1.0 -0.54 -1.96 0.21
## Question37 37 0.83 0.41 1.0 -1.36 -0.08 0.17
## Question38 38 1.00 0.00 1.0 NaN NaN 0.00
## Question39 39 1.00 0.00 1.0 NaN NaN 0.00
## Question40 40 1.00 0.00 1.0 NaN NaN 0.00
colnames(MT_print) <- c("Question", "Mean", "Std. Dev.", "Median", "Skew", "Kurtosis", "se")
#4 install print formating package and print Appendix A
#install.packages("gt")
library(gt)
options(digits=4)
MT_print %>%
gt() %>%
tab_header(
title = "Appendix A: Midterm Questions Statistical Data"
)
| Appendix A: Midterm Questions Statistical Data | ||||||
| Question | Mean | Std. Dev. | Median | Skew | Kurtosis | se |
|---|---|---|---|---|---|---|
| 1 | 0.8333 | 0.4082 | 1.0 | -1.3608 | -0.08333 | 0.1667 |
| 2 | 1.0000 | 0.0000 | 1.0 | NaN | NaN | 0.0000 |
| 3 | 0.8333 | 0.4082 | 1.0 | -1.3608 | -0.08333 | 0.1667 |
| 4 | 0.3333 | 0.5164 | 0.0 | 0.5379 | -1.95833 | 0.2108 |
| 5 | 1.0000 | 0.0000 | 1.0 | NaN | NaN | 0.0000 |
| 6 | 1.0000 | 0.0000 | 1.0 | NaN | NaN | 0.0000 |
| 7 | 1.0000 | 0.0000 | 1.0 | NaN | NaN | 0.0000 |
| 8 | 1.0000 | 0.0000 | 1.0 | NaN | NaN | 0.0000 |
| 9 | 1.0000 | 0.0000 | 1.0 | NaN | NaN | 0.0000 |
| 10 | 0.6667 | 0.5164 | 1.0 | -0.5379 | -1.95833 | 0.2108 |
| 11 | 0.6667 | 0.5164 | 1.0 | -0.5379 | -1.95833 | 0.2108 |
| 12 | 1.0000 | 0.0000 | 1.0 | NaN | NaN | 0.0000 |
| 13 | 1.0000 | 0.0000 | 1.0 | NaN | NaN | 0.0000 |
| 14 | 1.0000 | 0.0000 | 1.0 | NaN | NaN | 0.0000 |
| 15 | 1.0000 | 0.0000 | 1.0 | NaN | NaN | 0.0000 |
| 16 | 1.0000 | 0.0000 | 1.0 | NaN | NaN | 0.0000 |
| 17 | 0.5000 | 0.5477 | 0.5 | 0.0000 | -2.30556 | 0.2236 |
| 18 | 0.8333 | 0.4082 | 1.0 | -1.3608 | -0.08333 | 0.1667 |
| 19 | 1.0000 | 0.0000 | 1.0 | NaN | NaN | 0.0000 |
| 20 | 0.6667 | 0.5164 | 1.0 | -0.5379 | -1.95833 | 0.2108 |
| 21 | 0.8333 | 0.4082 | 1.0 | -1.3608 | -0.08333 | 0.1667 |
| 22 | 0.8333 | 0.4082 | 1.0 | -1.3608 | -0.08333 | 0.1667 |
| 23 | 0.8333 | 0.4082 | 1.0 | -1.3608 | -0.08333 | 0.1667 |
| 24 | 1.0000 | 0.0000 | 1.0 | NaN | NaN | 0.0000 |
| 25 | 0.8333 | 0.4082 | 1.0 | -1.3608 | -0.08333 | 0.1667 |
| 26 | 0.3333 | 0.5164 | 0.0 | 0.5379 | -1.95833 | 0.2108 |
| 27 | 0.5000 | 0.5477 | 0.5 | 0.0000 | -2.30556 | 0.2236 |
| 28 | 0.8333 | 0.4082 | 1.0 | -1.3608 | -0.08333 | 0.1667 |
| 29 | 1.0000 | 0.0000 | 1.0 | NaN | NaN | 0.0000 |
| 30 | 0.6667 | 0.5164 | 1.0 | -0.5379 | -1.95833 | 0.2108 |
| 31 | 1.0000 | 0.0000 | 1.0 | NaN | NaN | 0.0000 |
| 32 | 1.0000 | 0.0000 | 1.0 | NaN | NaN | 0.0000 |
| 33 | 1.0000 | 0.0000 | 1.0 | NaN | NaN | 0.0000 |
| 34 | 1.0000 | 0.0000 | 1.0 | NaN | NaN | 0.0000 |
| 35 | 0.8333 | 0.4082 | 1.0 | -1.3608 | -0.08333 | 0.1667 |
| 36 | 0.6667 | 0.5164 | 1.0 | -0.5379 | -1.95833 | 0.2108 |
| 37 | 0.8333 | 0.4082 | 1.0 | -1.3608 | -0.08333 | 0.1667 |
| 38 | 1.0000 | 0.0000 | 1.0 | NaN | NaN | 0.0000 |
| 39 | 1.0000 | 0.0000 | 1.0 | NaN | NaN | 0.0000 |
| 40 | 1.0000 | 0.0000 | 1.0 | NaN | NaN | 0.0000 |
#5. Frequency count for the score variable.
table(MT_Rdata$score)
##
## 29 30 35 37 40
## 1 1 2 1 1
#6 Plot the shape/curve of a distribution
score <- MT_Rdata$score
hist(score, main ="Figure 1 Histogram of Midterm Scores", xlab="Midterm Score",
ylab="Score Frequency", col="blue")
#7 Compute standard scores from raw scores and print Appendix B
score_z <- scale(MT_Rdata$score, center=TRUE, scale=TRUE)
MT_Z <- data.frame(MT_Rdata$RandomID,MT_Rdata$score,score_z)
colnames(MT_Z) <- c("RandomID", "Total Score", "Standardized Score")
MT_Z %>%
gt() %>%
tab_header(
title = "Appendix B: Standardized Scores"
)
| Appendix B: Standardized Scores | ||
| RandomID | Total Score | Standardized Score |
|---|---|---|
| 10209 | 30 | -1.0369 |
| 10580 | 35 | 0.1595 |
| 23021 | 29 | -1.2761 |
| 24774 | 35 | 0.1595 |
| 50915 | 40 | 1.3559 |
| 85187 | 37 | 0.6381 |
#8 Create separate matrix segregating questions and explore correlation between pairs of questions
#install.packages("corrplot")
library(corrplot)
## corrplot 0.95 loaded
questions <- data.frame((MT_Rdata[2:41]))
(questions_corr <- cor(questions))
## Question1 Question2 Question3 Question4 Question5 Question6
## Question1 1.0000 NA 1.0000 0.3162 NA NA
## Question2 NA 1 NA NA NA NA
## Question3 1.0000 NA 1.0000 0.3162 NA NA
## Question4 0.3162 NA 0.3162 1.0000 NA NA
## Question5 NA NA NA NA 1 NA
## Question6 NA NA NA NA NA 1
## Question7 NA NA NA NA NA NA
## Question8 NA NA NA NA NA NA
## Question9 NA NA NA NA NA NA
## Question10 0.6325 NA 0.6325 0.5000 NA NA
## Question11 0.6325 NA 0.6325 0.5000 NA NA
## Question12 NA NA NA NA NA NA
## Question13 NA NA NA NA NA NA
## Question14 NA NA NA NA NA NA
## Question15 NA NA NA NA NA NA
## Question16 NA NA NA NA NA NA
## Question17 -0.4472 NA -0.4472 0.0000 NA NA
## Question18 -0.2000 NA -0.2000 0.3162 NA NA
## Question19 NA NA NA NA NA NA
## Question20 0.6325 NA 0.6325 0.5000 NA NA
## Question21 -0.2000 NA -0.2000 0.3162 NA NA
## Question22 1.0000 NA 1.0000 0.3162 NA NA
## Question23 1.0000 NA 1.0000 0.3162 NA NA
## Question24 NA NA NA NA NA NA
## Question25 -0.2000 NA -0.2000 -0.6325 NA NA
## Question26 0.3162 NA 0.3162 1.0000 NA NA
## Question27 0.4472 NA 0.4472 0.7071 NA NA
## Question28 1.0000 NA 1.0000 0.3162 NA NA
## Question29 NA NA NA NA NA NA
## Question30 -0.3162 NA -0.3162 -0.2500 NA NA
## Question31 NA NA NA NA NA NA
## Question32 NA NA NA NA NA NA
## Question33 NA NA NA NA NA NA
## Question34 NA NA NA NA NA NA
## Question35 -0.2000 NA -0.2000 0.3162 NA NA
## Question36 -0.3162 NA -0.3162 0.5000 NA NA
## Question37 -0.2000 NA -0.2000 0.3162 NA NA
## Question38 NA NA NA NA NA NA
## Question39 NA NA NA NA NA NA
## Question40 NA NA NA NA NA NA
## Question7 Question8 Question9 Question10 Question11 Question12
## Question1 NA NA NA 0.6325 0.6325 NA
## Question2 NA NA NA NA NA NA
## Question3 NA NA NA 0.6325 0.6325 NA
## Question4 NA NA NA 0.5000 0.5000 NA
## Question5 NA NA NA NA NA NA
## Question6 NA NA NA NA NA NA
## Question7 1 NA NA NA NA NA
## Question8 NA 1 NA NA NA NA
## Question9 NA NA 1 NA NA NA
## Question10 NA NA NA 1.0000 0.2500 NA
## Question11 NA NA NA 0.2500 1.0000 NA
## Question12 NA NA NA NA NA 1
## Question13 NA NA NA NA NA NA
## Question14 NA NA NA NA NA NA
## Question15 NA NA NA NA NA NA
## Question16 NA NA NA NA NA NA
## Question17 NA NA NA 0.0000 0.0000 NA
## Question18 NA NA NA 0.6325 -0.3162 NA
## Question19 NA NA NA NA NA NA
## Question20 NA NA NA 0.2500 0.2500 NA
## Question21 NA NA NA 0.6325 -0.3162 NA
## Question22 NA NA NA 0.6325 0.6325 NA
## Question23 NA NA NA 0.6325 0.6325 NA
## Question24 NA NA NA NA NA NA
## Question25 NA NA NA -0.3162 -0.3162 NA
## Question26 NA NA NA 0.5000 0.5000 NA
## Question27 NA NA NA 0.7071 0.0000 NA
## Question28 NA NA NA 0.6325 0.6325 NA
## Question29 NA NA NA NA NA NA
## Question30 NA NA NA -0.5000 -0.5000 NA
## Question31 NA NA NA NA NA NA
## Question32 NA NA NA NA NA NA
## Question33 NA NA NA NA NA NA
## Question34 NA NA NA NA NA NA
## Question35 NA NA NA 0.6325 -0.3162 NA
## Question36 NA NA NA 0.2500 0.2500 NA
## Question37 NA NA NA 0.6325 -0.3162 NA
## Question38 NA NA NA NA NA NA
## Question39 NA NA NA NA NA NA
## Question40 NA NA NA NA NA NA
## Question13 Question14 Question15 Question16 Question17 Question18
## Question1 NA NA NA NA -0.4472 -0.2000
## Question2 NA NA NA NA NA NA
## Question3 NA NA NA NA -0.4472 -0.2000
## Question4 NA NA NA NA 0.0000 0.3162
## Question5 NA NA NA NA NA NA
## Question6 NA NA NA NA NA NA
## Question7 NA NA NA NA NA NA
## Question8 NA NA NA NA NA NA
## Question9 NA NA NA NA NA NA
## Question10 NA NA NA NA 0.0000 0.6325
## Question11 NA NA NA NA 0.0000 -0.3162
## Question12 NA NA NA NA NA NA
## Question13 1 NA NA NA NA NA
## Question14 NA 1 NA NA NA NA
## Question15 NA NA 1 NA NA NA
## Question16 NA NA NA 1 NA NA
## Question17 NA NA NA NA 1.0000 0.4472
## Question18 NA NA NA NA 0.4472 1.0000
## Question19 NA NA NA NA NA NA
## Question20 NA NA NA NA -0.7071 -0.3162
## Question21 NA NA NA NA 0.4472 1.0000
## Question22 NA NA NA NA -0.4472 -0.2000
## Question23 NA NA NA NA -0.4472 -0.2000
## Question24 NA NA NA NA NA NA
## Question25 NA NA NA NA 0.4472 -0.2000
## Question26 NA NA NA NA 0.0000 0.3162
## Question27 NA NA NA NA -0.3333 0.4472
## Question28 NA NA NA NA -0.4472 -0.2000
## Question29 NA NA NA NA NA NA
## Question30 NA NA NA NA 0.0000 -0.3162
## Question31 NA NA NA NA NA NA
## Question32 NA NA NA NA NA NA
## Question33 NA NA NA NA NA NA
## Question34 NA NA NA NA NA NA
## Question35 NA NA NA NA 0.4472 1.0000
## Question36 NA NA NA NA 0.7071 0.6325
## Question37 NA NA NA NA 0.4472 1.0000
## Question38 NA NA NA NA NA NA
## Question39 NA NA NA NA NA NA
## Question40 NA NA NA NA NA NA
## Question19 Question20 Question21 Question22 Question23 Question24
## Question1 NA 0.6325 -0.2000 1.0000 1.0000 NA
## Question2 NA NA NA NA NA NA
## Question3 NA 0.6325 -0.2000 1.0000 1.0000 NA
## Question4 NA 0.5000 0.3162 0.3162 0.3162 NA
## Question5 NA NA NA NA NA NA
## Question6 NA NA NA NA NA NA
## Question7 NA NA NA NA NA NA
## Question8 NA NA NA NA NA NA
## Question9 NA NA NA NA NA NA
## Question10 NA 0.2500 0.6325 0.6325 0.6325 NA
## Question11 NA 0.2500 -0.3162 0.6325 0.6325 NA
## Question12 NA NA NA NA NA NA
## Question13 NA NA NA NA NA NA
## Question14 NA NA NA NA NA NA
## Question15 NA NA NA NA NA NA
## Question16 NA NA NA NA NA NA
## Question17 NA -0.7071 0.4472 -0.4472 -0.4472 NA
## Question18 NA -0.3162 1.0000 -0.2000 -0.2000 NA
## Question19 1 NA NA NA NA NA
## Question20 NA 1.0000 -0.3162 0.6325 0.6325 NA
## Question21 NA -0.3162 1.0000 -0.2000 -0.2000 NA
## Question22 NA 0.6325 -0.2000 1.0000 1.0000 NA
## Question23 NA 0.6325 -0.2000 1.0000 1.0000 NA
## Question24 NA NA NA NA NA 1
## Question25 NA -0.3162 -0.2000 -0.2000 -0.2000 NA
## Question26 NA 0.5000 0.3162 0.3162 0.3162 NA
## Question27 NA 0.7071 0.4472 0.4472 0.4472 NA
## Question28 NA 0.6325 -0.2000 1.0000 1.0000 NA
## Question29 NA NA NA NA NA NA
## Question30 NA 0.2500 -0.3162 -0.3162 -0.3162 NA
## Question31 NA NA NA NA NA NA
## Question32 NA NA NA NA NA NA
## Question33 NA NA NA NA NA NA
## Question34 NA NA NA NA NA NA
## Question35 NA -0.3162 1.0000 -0.2000 -0.2000 NA
## Question36 NA -0.5000 0.6325 -0.3162 -0.3162 NA
## Question37 NA -0.3162 1.0000 -0.2000 -0.2000 NA
## Question38 NA NA NA NA NA NA
## Question39 NA NA NA NA NA NA
## Question40 NA NA NA NA NA NA
## Question25 Question26 Question27 Question28 Question29 Question30
## Question1 -0.2000 0.3162 0.4472 1.0000 NA -0.3162
## Question2 NA NA NA NA NA NA
## Question3 -0.2000 0.3162 0.4472 1.0000 NA -0.3162
## Question4 -0.6325 1.0000 0.7071 0.3162 NA -0.2500
## Question5 NA NA NA NA NA NA
## Question6 NA NA NA NA NA NA
## Question7 NA NA NA NA NA NA
## Question8 NA NA NA NA NA NA
## Question9 NA NA NA NA NA NA
## Question10 -0.3162 0.5000 0.7071 0.6325 NA -0.5000
## Question11 -0.3162 0.5000 0.0000 0.6325 NA -0.5000
## Question12 NA NA NA NA NA NA
## Question13 NA NA NA NA NA NA
## Question14 NA NA NA NA NA NA
## Question15 NA NA NA NA NA NA
## Question16 NA NA NA NA NA NA
## Question17 0.4472 0.0000 -0.3333 -0.4472 NA 0.0000
## Question18 -0.2000 0.3162 0.4472 -0.2000 NA -0.3162
## Question19 NA NA NA NA NA NA
## Question20 -0.3162 0.5000 0.7071 0.6325 NA 0.2500
## Question21 -0.2000 0.3162 0.4472 -0.2000 NA -0.3162
## Question22 -0.2000 0.3162 0.4472 1.0000 NA -0.3162
## Question23 -0.2000 0.3162 0.4472 1.0000 NA -0.3162
## Question24 NA NA NA NA NA NA
## Question25 1.0000 -0.6325 -0.4472 -0.2000 NA 0.6325
## Question26 -0.6325 1.0000 0.7071 0.3162 NA -0.2500
## Question27 -0.4472 0.7071 1.0000 0.4472 NA 0.0000
## Question28 -0.2000 0.3162 0.4472 1.0000 NA -0.3162
## Question29 NA NA NA NA 1 NA
## Question30 0.6325 -0.2500 0.0000 -0.3162 NA 1.0000
## Question31 NA NA NA NA NA NA
## Question32 NA NA NA NA NA NA
## Question33 NA NA NA NA NA NA
## Question34 NA NA NA NA NA NA
## Question35 -0.2000 0.3162 0.4472 -0.2000 NA -0.3162
## Question36 -0.3162 0.5000 0.0000 -0.3162 NA -0.5000
## Question37 -0.2000 0.3162 0.4472 -0.2000 NA -0.3162
## Question38 NA NA NA NA NA NA
## Question39 NA NA NA NA NA NA
## Question40 NA NA NA NA NA NA
## Question31 Question32 Question33 Question34 Question35 Question36
## Question1 NA NA NA NA -0.2000 -0.3162
## Question2 NA NA NA NA NA NA
## Question3 NA NA NA NA -0.2000 -0.3162
## Question4 NA NA NA NA 0.3162 0.5000
## Question5 NA NA NA NA NA NA
## Question6 NA NA NA NA NA NA
## Question7 NA NA NA NA NA NA
## Question8 NA NA NA NA NA NA
## Question9 NA NA NA NA NA NA
## Question10 NA NA NA NA 0.6325 0.2500
## Question11 NA NA NA NA -0.3162 0.2500
## Question12 NA NA NA NA NA NA
## Question13 NA NA NA NA NA NA
## Question14 NA NA NA NA NA NA
## Question15 NA NA NA NA NA NA
## Question16 NA NA NA NA NA NA
## Question17 NA NA NA NA 0.4472 0.7071
## Question18 NA NA NA NA 1.0000 0.6325
## Question19 NA NA NA NA NA NA
## Question20 NA NA NA NA -0.3162 -0.5000
## Question21 NA NA NA NA 1.0000 0.6325
## Question22 NA NA NA NA -0.2000 -0.3162
## Question23 NA NA NA NA -0.2000 -0.3162
## Question24 NA NA NA NA NA NA
## Question25 NA NA NA NA -0.2000 -0.3162
## Question26 NA NA NA NA 0.3162 0.5000
## Question27 NA NA NA NA 0.4472 0.0000
## Question28 NA NA NA NA -0.2000 -0.3162
## Question29 NA NA NA NA NA NA
## Question30 NA NA NA NA -0.3162 -0.5000
## Question31 1 NA NA NA NA NA
## Question32 NA 1 NA NA NA NA
## Question33 NA NA 1 NA NA NA
## Question34 NA NA NA 1 NA NA
## Question35 NA NA NA NA 1.0000 0.6325
## Question36 NA NA NA NA 0.6325 1.0000
## Question37 NA NA NA NA 1.0000 0.6325
## Question38 NA NA NA NA NA NA
## Question39 NA NA NA NA NA NA
## Question40 NA NA NA NA NA NA
## Question37 Question38 Question39 Question40
## Question1 -0.2000 NA NA NA
## Question2 NA NA NA NA
## Question3 -0.2000 NA NA NA
## Question4 0.3162 NA NA NA
## Question5 NA NA NA NA
## Question6 NA NA NA NA
## Question7 NA NA NA NA
## Question8 NA NA NA NA
## Question9 NA NA NA NA
## Question10 0.6325 NA NA NA
## Question11 -0.3162 NA NA NA
## Question12 NA NA NA NA
## Question13 NA NA NA NA
## Question14 NA NA NA NA
## Question15 NA NA NA NA
## Question16 NA NA NA NA
## Question17 0.4472 NA NA NA
## Question18 1.0000 NA NA NA
## Question19 NA NA NA NA
## Question20 -0.3162 NA NA NA
## Question21 1.0000 NA NA NA
## Question22 -0.2000 NA NA NA
## Question23 -0.2000 NA NA NA
## Question24 NA NA NA NA
## Question25 -0.2000 NA NA NA
## Question26 0.3162 NA NA NA
## Question27 0.4472 NA NA NA
## Question28 -0.2000 NA NA NA
## Question29 NA NA NA NA
## Question30 -0.3162 NA NA NA
## Question31 NA NA NA NA
## Question32 NA NA NA NA
## Question33 NA NA NA NA
## Question34 NA NA NA NA
## Question35 1.0000 NA NA NA
## Question36 0.6325 NA NA NA
## Question37 1.0000 NA NA NA
## Question38 NA 1 NA NA
## Question39 NA NA 1 NA
## Question40 NA NA NA 1
print(corrplot(questions_corr, title = "Figure 2: Question Correlations", mar = c(0,0,1,0), number.cex = 0.25))
## $corr
## Question1 Question2 Question3 Question4 Question5 Question6
## Question1 1.0000 NA 1.0000 0.3162 NA NA
## Question2 NA 1 NA NA NA NA
## Question3 1.0000 NA 1.0000 0.3162 NA NA
## Question4 0.3162 NA 0.3162 1.0000 NA NA
## Question5 NA NA NA NA 1 NA
## Question6 NA NA NA NA NA 1
## Question7 NA NA NA NA NA NA
## Question8 NA NA NA NA NA NA
## Question9 NA NA NA NA NA NA
## Question10 0.6325 NA 0.6325 0.5000 NA NA
## Question11 0.6325 NA 0.6325 0.5000 NA NA
## Question12 NA NA NA NA NA NA
## Question13 NA NA NA NA NA NA
## Question14 NA NA NA NA NA NA
## Question15 NA NA NA NA NA NA
## Question16 NA NA NA NA NA NA
## Question17 -0.4472 NA -0.4472 0.0000 NA NA
## Question18 -0.2000 NA -0.2000 0.3162 NA NA
## Question19 NA NA NA NA NA NA
## Question20 0.6325 NA 0.6325 0.5000 NA NA
## Question21 -0.2000 NA -0.2000 0.3162 NA NA
## Question22 1.0000 NA 1.0000 0.3162 NA NA
## Question23 1.0000 NA 1.0000 0.3162 NA NA
## Question24 NA NA NA NA NA NA
## Question25 -0.2000 NA -0.2000 -0.6325 NA NA
## Question26 0.3162 NA 0.3162 1.0000 NA NA
## Question27 0.4472 NA 0.4472 0.7071 NA NA
## Question28 1.0000 NA 1.0000 0.3162 NA NA
## Question29 NA NA NA NA NA NA
## Question30 -0.3162 NA -0.3162 -0.2500 NA NA
## Question31 NA NA NA NA NA NA
## Question32 NA NA NA NA NA NA
## Question33 NA NA NA NA NA NA
## Question34 NA NA NA NA NA NA
## Question35 -0.2000 NA -0.2000 0.3162 NA NA
## Question36 -0.3162 NA -0.3162 0.5000 NA NA
## Question37 -0.2000 NA -0.2000 0.3162 NA NA
## Question38 NA NA NA NA NA NA
## Question39 NA NA NA NA NA NA
## Question40 NA NA NA NA NA NA
## Question7 Question8 Question9 Question10 Question11 Question12
## Question1 NA NA NA 0.6325 0.6325 NA
## Question2 NA NA NA NA NA NA
## Question3 NA NA NA 0.6325 0.6325 NA
## Question4 NA NA NA 0.5000 0.5000 NA
## Question5 NA NA NA NA NA NA
## Question6 NA NA NA NA NA NA
## Question7 1 NA NA NA NA NA
## Question8 NA 1 NA NA NA NA
## Question9 NA NA 1 NA NA NA
## Question10 NA NA NA 1.0000 0.2500 NA
## Question11 NA NA NA 0.2500 1.0000 NA
## Question12 NA NA NA NA NA 1
## Question13 NA NA NA NA NA NA
## Question14 NA NA NA NA NA NA
## Question15 NA NA NA NA NA NA
## Question16 NA NA NA NA NA NA
## Question17 NA NA NA 0.0000 0.0000 NA
## Question18 NA NA NA 0.6325 -0.3162 NA
## Question19 NA NA NA NA NA NA
## Question20 NA NA NA 0.2500 0.2500 NA
## Question21 NA NA NA 0.6325 -0.3162 NA
## Question22 NA NA NA 0.6325 0.6325 NA
## Question23 NA NA NA 0.6325 0.6325 NA
## Question24 NA NA NA NA NA NA
## Question25 NA NA NA -0.3162 -0.3162 NA
## Question26 NA NA NA 0.5000 0.5000 NA
## Question27 NA NA NA 0.7071 0.0000 NA
## Question28 NA NA NA 0.6325 0.6325 NA
## Question29 NA NA NA NA NA NA
## Question30 NA NA NA -0.5000 -0.5000 NA
## Question31 NA NA NA NA NA NA
## Question32 NA NA NA NA NA NA
## Question33 NA NA NA NA NA NA
## Question34 NA NA NA NA NA NA
## Question35 NA NA NA 0.6325 -0.3162 NA
## Question36 NA NA NA 0.2500 0.2500 NA
## Question37 NA NA NA 0.6325 -0.3162 NA
## Question38 NA NA NA NA NA NA
## Question39 NA NA NA NA NA NA
## Question40 NA NA NA NA NA NA
## Question13 Question14 Question15 Question16 Question17 Question18
## Question1 NA NA NA NA -0.4472 -0.2000
## Question2 NA NA NA NA NA NA
## Question3 NA NA NA NA -0.4472 -0.2000
## Question4 NA NA NA NA 0.0000 0.3162
## Question5 NA NA NA NA NA NA
## Question6 NA NA NA NA NA NA
## Question7 NA NA NA NA NA NA
## Question8 NA NA NA NA NA NA
## Question9 NA NA NA NA NA NA
## Question10 NA NA NA NA 0.0000 0.6325
## Question11 NA NA NA NA 0.0000 -0.3162
## Question12 NA NA NA NA NA NA
## Question13 1 NA NA NA NA NA
## Question14 NA 1 NA NA NA NA
## Question15 NA NA 1 NA NA NA
## Question16 NA NA NA 1 NA NA
## Question17 NA NA NA NA 1.0000 0.4472
## Question18 NA NA NA NA 0.4472 1.0000
## Question19 NA NA NA NA NA NA
## Question20 NA NA NA NA -0.7071 -0.3162
## Question21 NA NA NA NA 0.4472 1.0000
## Question22 NA NA NA NA -0.4472 -0.2000
## Question23 NA NA NA NA -0.4472 -0.2000
## Question24 NA NA NA NA NA NA
## Question25 NA NA NA NA 0.4472 -0.2000
## Question26 NA NA NA NA 0.0000 0.3162
## Question27 NA NA NA NA -0.3333 0.4472
## Question28 NA NA NA NA -0.4472 -0.2000
## Question29 NA NA NA NA NA NA
## Question30 NA NA NA NA 0.0000 -0.3162
## Question31 NA NA NA NA NA NA
## Question32 NA NA NA NA NA NA
## Question33 NA NA NA NA NA NA
## Question34 NA NA NA NA NA NA
## Question35 NA NA NA NA 0.4472 1.0000
## Question36 NA NA NA NA 0.7071 0.6325
## Question37 NA NA NA NA 0.4472 1.0000
## Question38 NA NA NA NA NA NA
## Question39 NA NA NA NA NA NA
## Question40 NA NA NA NA NA NA
## Question19 Question20 Question21 Question22 Question23 Question24
## Question1 NA 0.6325 -0.2000 1.0000 1.0000 NA
## Question2 NA NA NA NA NA NA
## Question3 NA 0.6325 -0.2000 1.0000 1.0000 NA
## Question4 NA 0.5000 0.3162 0.3162 0.3162 NA
## Question5 NA NA NA NA NA NA
## Question6 NA NA NA NA NA NA
## Question7 NA NA NA NA NA NA
## Question8 NA NA NA NA NA NA
## Question9 NA NA NA NA NA NA
## Question10 NA 0.2500 0.6325 0.6325 0.6325 NA
## Question11 NA 0.2500 -0.3162 0.6325 0.6325 NA
## Question12 NA NA NA NA NA NA
## Question13 NA NA NA NA NA NA
## Question14 NA NA NA NA NA NA
## Question15 NA NA NA NA NA NA
## Question16 NA NA NA NA NA NA
## Question17 NA -0.7071 0.4472 -0.4472 -0.4472 NA
## Question18 NA -0.3162 1.0000 -0.2000 -0.2000 NA
## Question19 1 NA NA NA NA NA
## Question20 NA 1.0000 -0.3162 0.6325 0.6325 NA
## Question21 NA -0.3162 1.0000 -0.2000 -0.2000 NA
## Question22 NA 0.6325 -0.2000 1.0000 1.0000 NA
## Question23 NA 0.6325 -0.2000 1.0000 1.0000 NA
## Question24 NA NA NA NA NA 1
## Question25 NA -0.3162 -0.2000 -0.2000 -0.2000 NA
## Question26 NA 0.5000 0.3162 0.3162 0.3162 NA
## Question27 NA 0.7071 0.4472 0.4472 0.4472 NA
## Question28 NA 0.6325 -0.2000 1.0000 1.0000 NA
## Question29 NA NA NA NA NA NA
## Question30 NA 0.2500 -0.3162 -0.3162 -0.3162 NA
## Question31 NA NA NA NA NA NA
## Question32 NA NA NA NA NA NA
## Question33 NA NA NA NA NA NA
## Question34 NA NA NA NA NA NA
## Question35 NA -0.3162 1.0000 -0.2000 -0.2000 NA
## Question36 NA -0.5000 0.6325 -0.3162 -0.3162 NA
## Question37 NA -0.3162 1.0000 -0.2000 -0.2000 NA
## Question38 NA NA NA NA NA NA
## Question39 NA NA NA NA NA NA
## Question40 NA NA NA NA NA NA
## Question25 Question26 Question27 Question28 Question29 Question30
## Question1 -0.2000 0.3162 0.4472 1.0000 NA -0.3162
## Question2 NA NA NA NA NA NA
## Question3 -0.2000 0.3162 0.4472 1.0000 NA -0.3162
## Question4 -0.6325 1.0000 0.7071 0.3162 NA -0.2500
## Question5 NA NA NA NA NA NA
## Question6 NA NA NA NA NA NA
## Question7 NA NA NA NA NA NA
## Question8 NA NA NA NA NA NA
## Question9 NA NA NA NA NA NA
## Question10 -0.3162 0.5000 0.7071 0.6325 NA -0.5000
## Question11 -0.3162 0.5000 0.0000 0.6325 NA -0.5000
## Question12 NA NA NA NA NA NA
## Question13 NA NA NA NA NA NA
## Question14 NA NA NA NA NA NA
## Question15 NA NA NA NA NA NA
## Question16 NA NA NA NA NA NA
## Question17 0.4472 0.0000 -0.3333 -0.4472 NA 0.0000
## Question18 -0.2000 0.3162 0.4472 -0.2000 NA -0.3162
## Question19 NA NA NA NA NA NA
## Question20 -0.3162 0.5000 0.7071 0.6325 NA 0.2500
## Question21 -0.2000 0.3162 0.4472 -0.2000 NA -0.3162
## Question22 -0.2000 0.3162 0.4472 1.0000 NA -0.3162
## Question23 -0.2000 0.3162 0.4472 1.0000 NA -0.3162
## Question24 NA NA NA NA NA NA
## Question25 1.0000 -0.6325 -0.4472 -0.2000 NA 0.6325
## Question26 -0.6325 1.0000 0.7071 0.3162 NA -0.2500
## Question27 -0.4472 0.7071 1.0000 0.4472 NA 0.0000
## Question28 -0.2000 0.3162 0.4472 1.0000 NA -0.3162
## Question29 NA NA NA NA 1 NA
## Question30 0.6325 -0.2500 0.0000 -0.3162 NA 1.0000
## Question31 NA NA NA NA NA NA
## Question32 NA NA NA NA NA NA
## Question33 NA NA NA NA NA NA
## Question34 NA NA NA NA NA NA
## Question35 -0.2000 0.3162 0.4472 -0.2000 NA -0.3162
## Question36 -0.3162 0.5000 0.0000 -0.3162 NA -0.5000
## Question37 -0.2000 0.3162 0.4472 -0.2000 NA -0.3162
## Question38 NA NA NA NA NA NA
## Question39 NA NA NA NA NA NA
## Question40 NA NA NA NA NA NA
## Question31 Question32 Question33 Question34 Question35 Question36
## Question1 NA NA NA NA -0.2000 -0.3162
## Question2 NA NA NA NA NA NA
## Question3 NA NA NA NA -0.2000 -0.3162
## Question4 NA NA NA NA 0.3162 0.5000
## Question5 NA NA NA NA NA NA
## Question6 NA NA NA NA NA NA
## Question7 NA NA NA NA NA NA
## Question8 NA NA NA NA NA NA
## Question9 NA NA NA NA NA NA
## Question10 NA NA NA NA 0.6325 0.2500
## Question11 NA NA NA NA -0.3162 0.2500
## Question12 NA NA NA NA NA NA
## Question13 NA NA NA NA NA NA
## Question14 NA NA NA NA NA NA
## Question15 NA NA NA NA NA NA
## Question16 NA NA NA NA NA NA
## Question17 NA NA NA NA 0.4472 0.7071
## Question18 NA NA NA NA 1.0000 0.6325
## Question19 NA NA NA NA NA NA
## Question20 NA NA NA NA -0.3162 -0.5000
## Question21 NA NA NA NA 1.0000 0.6325
## Question22 NA NA NA NA -0.2000 -0.3162
## Question23 NA NA NA NA -0.2000 -0.3162
## Question24 NA NA NA NA NA NA
## Question25 NA NA NA NA -0.2000 -0.3162
## Question26 NA NA NA NA 0.3162 0.5000
## Question27 NA NA NA NA 0.4472 0.0000
## Question28 NA NA NA NA -0.2000 -0.3162
## Question29 NA NA NA NA NA NA
## Question30 NA NA NA NA -0.3162 -0.5000
## Question31 1 NA NA NA NA NA
## Question32 NA 1 NA NA NA NA
## Question33 NA NA 1 NA NA NA
## Question34 NA NA NA 1 NA NA
## Question35 NA NA NA NA 1.0000 0.6325
## Question36 NA NA NA NA 0.6325 1.0000
## Question37 NA NA NA NA 1.0000 0.6325
## Question38 NA NA NA NA NA NA
## Question39 NA NA NA NA NA NA
## Question40 NA NA NA NA NA NA
## Question37 Question38 Question39 Question40
## Question1 -0.2000 NA NA NA
## Question2 NA NA NA NA
## Question3 -0.2000 NA NA NA
## Question4 0.3162 NA NA NA
## Question5 NA NA NA NA
## Question6 NA NA NA NA
## Question7 NA NA NA NA
## Question8 NA NA NA NA
## Question9 NA NA NA NA
## Question10 0.6325 NA NA NA
## Question11 -0.3162 NA NA NA
## Question12 NA NA NA NA
## Question13 NA NA NA NA
## Question14 NA NA NA NA
## Question15 NA NA NA NA
## Question16 NA NA NA NA
## Question17 0.4472 NA NA NA
## Question18 1.0000 NA NA NA
## Question19 NA NA NA NA
## Question20 -0.3162 NA NA NA
## Question21 1.0000 NA NA NA
## Question22 -0.2000 NA NA NA
## Question23 -0.2000 NA NA NA
## Question24 NA NA NA NA
## Question25 -0.2000 NA NA NA
## Question26 0.3162 NA NA NA
## Question27 0.4472 NA NA NA
## Question28 -0.2000 NA NA NA
## Question29 NA NA NA NA
## Question30 -0.3162 NA NA NA
## Question31 NA NA NA NA
## Question32 NA NA NA NA
## Question33 NA NA NA NA
## Question34 NA NA NA NA
## Question35 1.0000 NA NA NA
## Question36 0.6325 NA NA NA
## Question37 1.0000 NA NA NA
## Question38 NA 1 NA NA
## Question39 NA NA 1 NA
## Question40 NA NA NA 1
##
## $corrPos
## xName yName x y corr
## 1 Question1 Question1 1 40 1.0000
## 2 Question1 Question3 1 38 1.0000
## 3 Question1 Question4 1 37 0.3162
## 4 Question1 Question10 1 31 0.6325
## 5 Question1 Question11 1 30 0.6325
## 6 Question1 Question17 1 24 -0.4472
## 7 Question1 Question18 1 23 -0.2000
## 8 Question1 Question20 1 21 0.6325
## 9 Question1 Question21 1 20 -0.2000
## 10 Question1 Question22 1 19 1.0000
## 11 Question1 Question23 1 18 1.0000
## 12 Question1 Question25 1 16 -0.2000
## 13 Question1 Question26 1 15 0.3162
## 14 Question1 Question27 1 14 0.4472
## 15 Question1 Question28 1 13 1.0000
## 16 Question1 Question30 1 11 -0.3162
## 17 Question1 Question35 1 6 -0.2000
## 18 Question1 Question36 1 5 -0.3162
## 19 Question1 Question37 1 4 -0.2000
## 20 Question2 Question2 2 39 1.0000
## 21 Question3 Question1 3 40 1.0000
## 22 Question3 Question3 3 38 1.0000
## 23 Question3 Question4 3 37 0.3162
## 24 Question3 Question10 3 31 0.6325
## 25 Question3 Question11 3 30 0.6325
## 26 Question3 Question17 3 24 -0.4472
## 27 Question3 Question18 3 23 -0.2000
## 28 Question3 Question20 3 21 0.6325
## 29 Question3 Question21 3 20 -0.2000
## 30 Question3 Question22 3 19 1.0000
## 31 Question3 Question23 3 18 1.0000
## 32 Question3 Question25 3 16 -0.2000
## 33 Question3 Question26 3 15 0.3162
## 34 Question3 Question27 3 14 0.4472
## 35 Question3 Question28 3 13 1.0000
## 36 Question3 Question30 3 11 -0.3162
## 37 Question3 Question35 3 6 -0.2000
## 38 Question3 Question36 3 5 -0.3162
## 39 Question3 Question37 3 4 -0.2000
## 40 Question4 Question1 4 40 0.3162
## 41 Question4 Question3 4 38 0.3162
## 42 Question4 Question4 4 37 1.0000
## 43 Question4 Question10 4 31 0.5000
## 44 Question4 Question11 4 30 0.5000
## 45 Question4 Question17 4 24 0.0000
## 46 Question4 Question18 4 23 0.3162
## 47 Question4 Question20 4 21 0.5000
## 48 Question4 Question21 4 20 0.3162
## 49 Question4 Question22 4 19 0.3162
## 50 Question4 Question23 4 18 0.3162
## 51 Question4 Question25 4 16 -0.6325
## 52 Question4 Question26 4 15 1.0000
## 53 Question4 Question27 4 14 0.7071
## 54 Question4 Question28 4 13 0.3162
## 55 Question4 Question30 4 11 -0.2500
## 56 Question4 Question35 4 6 0.3162
## 57 Question4 Question36 4 5 0.5000
## 58 Question4 Question37 4 4 0.3162
## 59 Question5 Question5 5 36 1.0000
## 60 Question6 Question6 6 35 1.0000
## 61 Question7 Question7 7 34 1.0000
## 62 Question8 Question8 8 33 1.0000
## 63 Question9 Question9 9 32 1.0000
## 64 Question10 Question1 10 40 0.6325
## 65 Question10 Question3 10 38 0.6325
## 66 Question10 Question4 10 37 0.5000
## 67 Question10 Question10 10 31 1.0000
## 68 Question10 Question11 10 30 0.2500
## 69 Question10 Question17 10 24 0.0000
## 70 Question10 Question18 10 23 0.6325
## 71 Question10 Question20 10 21 0.2500
## 72 Question10 Question21 10 20 0.6325
## 73 Question10 Question22 10 19 0.6325
## 74 Question10 Question23 10 18 0.6325
## 75 Question10 Question25 10 16 -0.3162
## 76 Question10 Question26 10 15 0.5000
## 77 Question10 Question27 10 14 0.7071
## 78 Question10 Question28 10 13 0.6325
## 79 Question10 Question30 10 11 -0.5000
## 80 Question10 Question35 10 6 0.6325
## 81 Question10 Question36 10 5 0.2500
## 82 Question10 Question37 10 4 0.6325
## 83 Question11 Question1 11 40 0.6325
## 84 Question11 Question3 11 38 0.6325
## 85 Question11 Question4 11 37 0.5000
## 86 Question11 Question10 11 31 0.2500
## 87 Question11 Question11 11 30 1.0000
## 88 Question11 Question17 11 24 0.0000
## 89 Question11 Question18 11 23 -0.3162
## 90 Question11 Question20 11 21 0.2500
## 91 Question11 Question21 11 20 -0.3162
## 92 Question11 Question22 11 19 0.6325
## 93 Question11 Question23 11 18 0.6325
## 94 Question11 Question25 11 16 -0.3162
## 95 Question11 Question26 11 15 0.5000
## 96 Question11 Question27 11 14 0.0000
## 97 Question11 Question28 11 13 0.6325
## 98 Question11 Question30 11 11 -0.5000
## 99 Question11 Question35 11 6 -0.3162
## 100 Question11 Question36 11 5 0.2500
## 101 Question11 Question37 11 4 -0.3162
## 102 Question12 Question12 12 29 1.0000
## 103 Question13 Question13 13 28 1.0000
## 104 Question14 Question14 14 27 1.0000
## 105 Question15 Question15 15 26 1.0000
## 106 Question16 Question16 16 25 1.0000
## 107 Question17 Question1 17 40 -0.4472
## 108 Question17 Question3 17 38 -0.4472
## 109 Question17 Question4 17 37 0.0000
## 110 Question17 Question10 17 31 0.0000
## 111 Question17 Question11 17 30 0.0000
## 112 Question17 Question17 17 24 1.0000
## 113 Question17 Question18 17 23 0.4472
## 114 Question17 Question20 17 21 -0.7071
## 115 Question17 Question21 17 20 0.4472
## 116 Question17 Question22 17 19 -0.4472
## 117 Question17 Question23 17 18 -0.4472
## 118 Question17 Question25 17 16 0.4472
## 119 Question17 Question26 17 15 0.0000
## 120 Question17 Question27 17 14 -0.3333
## 121 Question17 Question28 17 13 -0.4472
## 122 Question17 Question30 17 11 0.0000
## 123 Question17 Question35 17 6 0.4472
## 124 Question17 Question36 17 5 0.7071
## 125 Question17 Question37 17 4 0.4472
## 126 Question18 Question1 18 40 -0.2000
## 127 Question18 Question3 18 38 -0.2000
## 128 Question18 Question4 18 37 0.3162
## 129 Question18 Question10 18 31 0.6325
## 130 Question18 Question11 18 30 -0.3162
## 131 Question18 Question17 18 24 0.4472
## 132 Question18 Question18 18 23 1.0000
## 133 Question18 Question20 18 21 -0.3162
## 134 Question18 Question21 18 20 1.0000
## 135 Question18 Question22 18 19 -0.2000
## 136 Question18 Question23 18 18 -0.2000
## 137 Question18 Question25 18 16 -0.2000
## 138 Question18 Question26 18 15 0.3162
## 139 Question18 Question27 18 14 0.4472
## 140 Question18 Question28 18 13 -0.2000
## 141 Question18 Question30 18 11 -0.3162
## 142 Question18 Question35 18 6 1.0000
## 143 Question18 Question36 18 5 0.6325
## 144 Question18 Question37 18 4 1.0000
## 145 Question19 Question19 19 22 1.0000
## 146 Question20 Question1 20 40 0.6325
## 147 Question20 Question3 20 38 0.6325
## 148 Question20 Question4 20 37 0.5000
## 149 Question20 Question10 20 31 0.2500
## 150 Question20 Question11 20 30 0.2500
## 151 Question20 Question17 20 24 -0.7071
## 152 Question20 Question18 20 23 -0.3162
## 153 Question20 Question20 20 21 1.0000
## 154 Question20 Question21 20 20 -0.3162
## 155 Question20 Question22 20 19 0.6325
## 156 Question20 Question23 20 18 0.6325
## 157 Question20 Question25 20 16 -0.3162
## 158 Question20 Question26 20 15 0.5000
## 159 Question20 Question27 20 14 0.7071
## 160 Question20 Question28 20 13 0.6325
## 161 Question20 Question30 20 11 0.2500
## 162 Question20 Question35 20 6 -0.3162
## 163 Question20 Question36 20 5 -0.5000
## 164 Question20 Question37 20 4 -0.3162
## 165 Question21 Question1 21 40 -0.2000
## 166 Question21 Question3 21 38 -0.2000
## 167 Question21 Question4 21 37 0.3162
## 168 Question21 Question10 21 31 0.6325
## 169 Question21 Question11 21 30 -0.3162
## 170 Question21 Question17 21 24 0.4472
## 171 Question21 Question18 21 23 1.0000
## 172 Question21 Question20 21 21 -0.3162
## 173 Question21 Question21 21 20 1.0000
## 174 Question21 Question22 21 19 -0.2000
## 175 Question21 Question23 21 18 -0.2000
## 176 Question21 Question25 21 16 -0.2000
## 177 Question21 Question26 21 15 0.3162
## 178 Question21 Question27 21 14 0.4472
## 179 Question21 Question28 21 13 -0.2000
## 180 Question21 Question30 21 11 -0.3162
## 181 Question21 Question35 21 6 1.0000
## 182 Question21 Question36 21 5 0.6325
## 183 Question21 Question37 21 4 1.0000
## 184 Question22 Question1 22 40 1.0000
## 185 Question22 Question3 22 38 1.0000
## 186 Question22 Question4 22 37 0.3162
## 187 Question22 Question10 22 31 0.6325
## 188 Question22 Question11 22 30 0.6325
## 189 Question22 Question17 22 24 -0.4472
## 190 Question22 Question18 22 23 -0.2000
## 191 Question22 Question20 22 21 0.6325
## 192 Question22 Question21 22 20 -0.2000
## 193 Question22 Question22 22 19 1.0000
## 194 Question22 Question23 22 18 1.0000
## 195 Question22 Question25 22 16 -0.2000
## 196 Question22 Question26 22 15 0.3162
## 197 Question22 Question27 22 14 0.4472
## 198 Question22 Question28 22 13 1.0000
## 199 Question22 Question30 22 11 -0.3162
## 200 Question22 Question35 22 6 -0.2000
## 201 Question22 Question36 22 5 -0.3162
## 202 Question22 Question37 22 4 -0.2000
## 203 Question23 Question1 23 40 1.0000
## 204 Question23 Question3 23 38 1.0000
## 205 Question23 Question4 23 37 0.3162
## 206 Question23 Question10 23 31 0.6325
## 207 Question23 Question11 23 30 0.6325
## 208 Question23 Question17 23 24 -0.4472
## 209 Question23 Question18 23 23 -0.2000
## 210 Question23 Question20 23 21 0.6325
## 211 Question23 Question21 23 20 -0.2000
## 212 Question23 Question22 23 19 1.0000
## 213 Question23 Question23 23 18 1.0000
## 214 Question23 Question25 23 16 -0.2000
## 215 Question23 Question26 23 15 0.3162
## 216 Question23 Question27 23 14 0.4472
## 217 Question23 Question28 23 13 1.0000
## 218 Question23 Question30 23 11 -0.3162
## 219 Question23 Question35 23 6 -0.2000
## 220 Question23 Question36 23 5 -0.3162
## 221 Question23 Question37 23 4 -0.2000
## 222 Question24 Question24 24 17 1.0000
## 223 Question25 Question1 25 40 -0.2000
## 224 Question25 Question3 25 38 -0.2000
## 225 Question25 Question4 25 37 -0.6325
## 226 Question25 Question10 25 31 -0.3162
## 227 Question25 Question11 25 30 -0.3162
## 228 Question25 Question17 25 24 0.4472
## 229 Question25 Question18 25 23 -0.2000
## 230 Question25 Question20 25 21 -0.3162
## 231 Question25 Question21 25 20 -0.2000
## 232 Question25 Question22 25 19 -0.2000
## 233 Question25 Question23 25 18 -0.2000
## 234 Question25 Question25 25 16 1.0000
## 235 Question25 Question26 25 15 -0.6325
## 236 Question25 Question27 25 14 -0.4472
## 237 Question25 Question28 25 13 -0.2000
## 238 Question25 Question30 25 11 0.6325
## 239 Question25 Question35 25 6 -0.2000
## 240 Question25 Question36 25 5 -0.3162
## 241 Question25 Question37 25 4 -0.2000
## 242 Question26 Question1 26 40 0.3162
## 243 Question26 Question3 26 38 0.3162
## 244 Question26 Question4 26 37 1.0000
## 245 Question26 Question10 26 31 0.5000
## 246 Question26 Question11 26 30 0.5000
## 247 Question26 Question17 26 24 0.0000
## 248 Question26 Question18 26 23 0.3162
## 249 Question26 Question20 26 21 0.5000
## 250 Question26 Question21 26 20 0.3162
## 251 Question26 Question22 26 19 0.3162
## 252 Question26 Question23 26 18 0.3162
## 253 Question26 Question25 26 16 -0.6325
## 254 Question26 Question26 26 15 1.0000
## 255 Question26 Question27 26 14 0.7071
## 256 Question26 Question28 26 13 0.3162
## 257 Question26 Question30 26 11 -0.2500
## 258 Question26 Question35 26 6 0.3162
## 259 Question26 Question36 26 5 0.5000
## 260 Question26 Question37 26 4 0.3162
## 261 Question27 Question1 27 40 0.4472
## 262 Question27 Question3 27 38 0.4472
## 263 Question27 Question4 27 37 0.7071
## 264 Question27 Question10 27 31 0.7071
## 265 Question27 Question11 27 30 0.0000
## 266 Question27 Question17 27 24 -0.3333
## 267 Question27 Question18 27 23 0.4472
## 268 Question27 Question20 27 21 0.7071
## 269 Question27 Question21 27 20 0.4472
## 270 Question27 Question22 27 19 0.4472
## 271 Question27 Question23 27 18 0.4472
## 272 Question27 Question25 27 16 -0.4472
## 273 Question27 Question26 27 15 0.7071
## 274 Question27 Question27 27 14 1.0000
## 275 Question27 Question28 27 13 0.4472
## 276 Question27 Question30 27 11 0.0000
## 277 Question27 Question35 27 6 0.4472
## 278 Question27 Question36 27 5 0.0000
## 279 Question27 Question37 27 4 0.4472
## 280 Question28 Question1 28 40 1.0000
## 281 Question28 Question3 28 38 1.0000
## 282 Question28 Question4 28 37 0.3162
## 283 Question28 Question10 28 31 0.6325
## 284 Question28 Question11 28 30 0.6325
## 285 Question28 Question17 28 24 -0.4472
## 286 Question28 Question18 28 23 -0.2000
## 287 Question28 Question20 28 21 0.6325
## 288 Question28 Question21 28 20 -0.2000
## 289 Question28 Question22 28 19 1.0000
## 290 Question28 Question23 28 18 1.0000
## 291 Question28 Question25 28 16 -0.2000
## 292 Question28 Question26 28 15 0.3162
## 293 Question28 Question27 28 14 0.4472
## 294 Question28 Question28 28 13 1.0000
## 295 Question28 Question30 28 11 -0.3162
## 296 Question28 Question35 28 6 -0.2000
## 297 Question28 Question36 28 5 -0.3162
## 298 Question28 Question37 28 4 -0.2000
## 299 Question29 Question29 29 12 1.0000
## 300 Question30 Question1 30 40 -0.3162
## 301 Question30 Question3 30 38 -0.3162
## 302 Question30 Question4 30 37 -0.2500
## 303 Question30 Question10 30 31 -0.5000
## 304 Question30 Question11 30 30 -0.5000
## 305 Question30 Question17 30 24 0.0000
## 306 Question30 Question18 30 23 -0.3162
## 307 Question30 Question20 30 21 0.2500
## 308 Question30 Question21 30 20 -0.3162
## 309 Question30 Question22 30 19 -0.3162
## 310 Question30 Question23 30 18 -0.3162
## 311 Question30 Question25 30 16 0.6325
## 312 Question30 Question26 30 15 -0.2500
## 313 Question30 Question27 30 14 0.0000
## 314 Question30 Question28 30 13 -0.3162
## 315 Question30 Question30 30 11 1.0000
## 316 Question30 Question35 30 6 -0.3162
## 317 Question30 Question36 30 5 -0.5000
## 318 Question30 Question37 30 4 -0.3162
## 319 Question31 Question31 31 10 1.0000
## 320 Question32 Question32 32 9 1.0000
## 321 Question33 Question33 33 8 1.0000
## 322 Question34 Question34 34 7 1.0000
## 323 Question35 Question1 35 40 -0.2000
## 324 Question35 Question3 35 38 -0.2000
## 325 Question35 Question4 35 37 0.3162
## 326 Question35 Question10 35 31 0.6325
## 327 Question35 Question11 35 30 -0.3162
## 328 Question35 Question17 35 24 0.4472
## 329 Question35 Question18 35 23 1.0000
## 330 Question35 Question20 35 21 -0.3162
## 331 Question35 Question21 35 20 1.0000
## 332 Question35 Question22 35 19 -0.2000
## 333 Question35 Question23 35 18 -0.2000
## 334 Question35 Question25 35 16 -0.2000
## 335 Question35 Question26 35 15 0.3162
## 336 Question35 Question27 35 14 0.4472
## 337 Question35 Question28 35 13 -0.2000
## 338 Question35 Question30 35 11 -0.3162
## 339 Question35 Question35 35 6 1.0000
## 340 Question35 Question36 35 5 0.6325
## 341 Question35 Question37 35 4 1.0000
## 342 Question36 Question1 36 40 -0.3162
## 343 Question36 Question3 36 38 -0.3162
## 344 Question36 Question4 36 37 0.5000
## 345 Question36 Question10 36 31 0.2500
## 346 Question36 Question11 36 30 0.2500
## 347 Question36 Question17 36 24 0.7071
## 348 Question36 Question18 36 23 0.6325
## 349 Question36 Question20 36 21 -0.5000
## 350 Question36 Question21 36 20 0.6325
## 351 Question36 Question22 36 19 -0.3162
## 352 Question36 Question23 36 18 -0.3162
## 353 Question36 Question25 36 16 -0.3162
## 354 Question36 Question26 36 15 0.5000
## 355 Question36 Question27 36 14 0.0000
## 356 Question36 Question28 36 13 -0.3162
## 357 Question36 Question30 36 11 -0.5000
## 358 Question36 Question35 36 6 0.6325
## 359 Question36 Question36 36 5 1.0000
## 360 Question36 Question37 36 4 0.6325
## 361 Question37 Question1 37 40 -0.2000
## 362 Question37 Question3 37 38 -0.2000
## 363 Question37 Question4 37 37 0.3162
## 364 Question37 Question10 37 31 0.6325
## 365 Question37 Question11 37 30 -0.3162
## 366 Question37 Question17 37 24 0.4472
## 367 Question37 Question18 37 23 1.0000
## 368 Question37 Question20 37 21 -0.3162
## 369 Question37 Question21 37 20 1.0000
## 370 Question37 Question22 37 19 -0.2000
## 371 Question37 Question23 37 18 -0.2000
## 372 Question37 Question25 37 16 -0.2000
## 373 Question37 Question26 37 15 0.3162
## 374 Question37 Question27 37 14 0.4472
## 375 Question37 Question28 37 13 -0.2000
## 376 Question37 Question30 37 11 -0.3162
## 377 Question37 Question35 37 6 1.0000
## 378 Question37 Question36 37 5 0.6325
## 379 Question37 Question37 37 4 1.0000
## 380 Question38 Question38 38 3 1.0000
## 381 Question39 Question39 39 2 1.0000
## 382 Question40 Question40 40 1 1.0000
##
## $arg
## $arg$type
## [1] "full"
#9 Compute Raw Alpha with 95% Confidence Inverval
#install.packages("psychometric")
#install.packages("dplyr")
library(psychometric)
## Loading required package: dplyr
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
## Loading required package: multilevel
## Loading required package: nlme
##
## Attaching package: 'nlme'
## The following object is masked from 'package:dplyr':
##
## collapse
## Loading required package: MASS
##
## Attaching package: 'MASS'
## The following object is masked from 'package:dplyr':
##
## select
## Loading required package: purrr
##
## Attaching package: 'psychometric'
## The following object is masked from 'package:psych':
##
## alpha
library(dplyr)
alpha(questions)
## [1] 0.7829
alpha.CI(0.7829, k=40, N=6, level = 0.95)
## LCL ALPHA UCL
## 1 0.4286 0.7829 0.9641
#10. Compute Index of Discrimination as difference between means of # UL (top 2 scores) and LL (bottom 2 scores)
questions_stat <- describe(questions)
ul_questions <- data.frame(questions[5:6,])
ul <- describe(ul_questions)
ll_questions <- (questions[c(1,3),])
ll <- describe(ll_questions)
ul_ll <- data.frame(c(ul$mean - ll$mean))
item_analysis <- data.frame(cbind(questions_stat$vars, questions_stat$mean, ul$mean, ll$mean, ul$mean - ll$mean))
#11 Compute score means for those students who answered the question correctly # Use this result to compute point biserial
score_correct <- (data.frame((questions) * MT_Rdata$score))
mu_c <- data.frame(colSums(score_correct)/ colSums(questions))
mu_x <- mean(MT_Rdata$score)
sd_x <- sd(MT_Rdata$score)
MT_stat$sd
## [1] 0.4082 0.0000 0.4082 0.5164 0.0000 0.0000 0.0000 0.0000 0.0000 0.5164
## [11] 0.5164 0.0000 0.0000 0.0000 0.0000 0.0000 0.5477 0.4082 0.0000 0.5164
## [21] 0.4082 0.4082 0.4082 0.0000 0.4082 0.5164 0.5477 0.4082 0.0000 0.5164
## [31] 0.0000 0.0000 0.0000 0.0000 0.4082 0.5164 0.4082 0.0000 0.0000 0.0000
point_biserial <- ((mu_c - mu_x) / MT_stat$sd)
point_biserial <- ((mu_c - mu_x) / sd_x) * (sqrt(questions_stat$mean / (1 - questions_stat$mean )))
item_analysis <- cbind(item_analysis, point_biserial)
#12 Output for Difficulty, Index of Discrimination, and Point Biserial
colnames(item_analysis) <- c("Question", "Difficulty", "Upper", "Lower","Discrimination","Point Biserial")
item_analysis %>%
gt() %>%
tab_header(
title = "Appendix D: Item Analysis"
)
| Appendix D: Item Analysis | |||||
| Question | Difficulty | Upper | Lower | Discrimination | Point Biserial |
|---|---|---|---|---|---|
| 1 | 0.8333 | 1.0 | 0.5 | 0.5 | 0.57070 |
| 2 | 1.0000 | 1.0 | 1.0 | 0.0 | NaN |
| 3 | 0.8333 | 1.0 | 0.5 | 0.5 | 0.57070 |
| 4 | 0.3333 | 1.0 | 0.0 | 1.0 | 0.70497 |
| 5 | 1.0000 | 1.0 | 1.0 | 0.0 | NaN |
| 6 | 1.0000 | 1.0 | 1.0 | 0.0 | NaN |
| 7 | 1.0000 | 1.0 | 1.0 | 0.0 | NaN |
| 8 | 1.0000 | 1.0 | 1.0 | 0.0 | NaN |
| 9 | 1.0000 | 1.0 | 1.0 | 0.0 | NaN |
| 10 | 0.6667 | 1.0 | 0.0 | 1.0 | 0.81776 |
| 11 | 0.6667 | 1.0 | 0.5 | 0.5 | 0.39478 |
| 12 | 1.0000 | 1.0 | 1.0 | 0.0 | NaN |
| 13 | 1.0000 | 1.0 | 1.0 | 0.0 | NaN |
| 14 | 1.0000 | 1.0 | 1.0 | 0.0 | NaN |
| 15 | 1.0000 | 1.0 | 1.0 | 0.0 | NaN |
| 16 | 1.0000 | 1.0 | 1.0 | 0.0 | NaN |
| 17 | 0.5000 | 0.5 | 0.5 | 0.0 | 0.07976 |
| 18 | 0.8333 | 1.0 | 0.5 | 0.5 | 0.46369 |
| 19 | 1.0000 | 1.0 | 1.0 | 0.0 | NaN |
| 20 | 0.6667 | 1.0 | 0.5 | 0.5 | 0.39478 |
| 21 | 0.8333 | 1.0 | 0.5 | 0.5 | 0.46369 |
| 22 | 0.8333 | 1.0 | 0.5 | 0.5 | 0.57070 |
| 23 | 0.8333 | 1.0 | 0.5 | 0.5 | 0.57070 |
| 24 | 1.0000 | 1.0 | 1.0 | 0.0 | NaN |
| 25 | 0.8333 | 0.5 | 1.0 | -0.5 | -0.28535 |
| 26 | 0.3333 | 1.0 | 0.0 | 1.0 | 0.70497 |
| 27 | 0.5000 | 1.0 | 0.0 | 1.0 | 0.71782 |
| 28 | 0.8333 | 1.0 | 0.5 | 0.5 | 0.57070 |
| 29 | 1.0000 | 1.0 | 1.0 | 0.0 | NaN |
| 30 | 0.6667 | 0.5 | 1.0 | -0.5 | -0.28199 |
| 31 | 1.0000 | 1.0 | 1.0 | 0.0 | NaN |
| 32 | 1.0000 | 1.0 | 1.0 | 0.0 | NaN |
| 33 | 1.0000 | 1.0 | 1.0 | 0.0 | NaN |
| 34 | 1.0000 | 1.0 | 1.0 | 0.0 | NaN |
| 35 | 0.8333 | 1.0 | 0.5 | 0.5 | 0.46369 |
| 36 | 0.6667 | 1.0 | 0.5 | 0.5 | 0.31019 |
| 37 | 0.8333 | 1.0 | 0.5 | 0.5 | 0.46369 |
| 38 | 1.0000 | 1.0 | 1.0 | 0.0 | NaN |
| 39 | 1.0000 | 1.0 | 1.0 | 0.0 | NaN |
| 40 | 1.0000 | 1.0 | 1.0 | 0.0 | NaN |
#13 Attempt to perform IRT Analysis # Limited to 3 questions due to small sample size # Select Questions 10,17&26 based on low correlation
#install.packages("ltm")
library(ltm)
## Loading required package: msm
## Loading required package: polycor
##
## Attaching package: 'polycor'
## The following object is masked from 'package:psych':
##
## polyserial
##
## Attaching package: 'ltm'
## The following object is masked from 'package:psych':
##
## factor.scores
(irt_questions <- questions[c(10,17,26)])
## Question10 Question17 Question26
## 1 0 0 0
## 2 1 0 0
## 3 0 1 0
## 4 1 1 0
## 5 1 1 1
## 6 1 0 1
descript(irt_questions)
##
## Descriptive statistics for the 'irt_questions' data-set
##
## Sample:
## 3 items and 6 sample units; 0 missing values
##
## Proportions for each level of response:
## 0 1 logit
## Question10 0.3333 0.6667 0.6931
## Question17 0.5000 0.5000 0.0000
## Question26 0.6667 0.3333 -0.6931
##
##
## Frequencies of total scores:
## 0 1 2 3
## Freq 1 2 2 1
##
##
## Point Biserial correlation with Total Score:
## Included Excluded
## Question10 0.7385 0.343
## Question17 0.5222 0.000
## Question26 0.7385 0.343
##
##
## Cronbach's alpha:
## value
## All Items 0.3636
## Excluding Question10 0.0000
## Excluding Question17 0.6667
## Excluding Question26 0.0000
##
##
## Pairwise Associations:
## Item i Item j p.value
## 1 1 2 1.0
## 2 2 3 1.0
## 3 1 3 0.5
#14 Estimated item parameters via the Rasch model (1PL) # Attempted to fit model
rout<- rasch(irt_questions)
summary(rout)
##
## Call:
## rasch(data = irt_questions)
##
## Model Summary:
## log.Lik AIC BIC
## -11.58 31.17 30.33
##
## Coefficients:
## value std.err z.vals
## Dffclt.Question10 -0.837 1.238 -0.676
## Dffclt.Question17 0.000 0.990 0.000
## Dffclt.Question26 0.837 1.238 0.676
## Dscrmn 0.997 1.115 0.894
##
## Integration:
## method: Gauss-Hermite
## quadrature points: 21
##
## Optimization:
## Convergence: 0
## max(|grad|): 1.1e-05
## quasi-Newton: BFGS
GoF.rasch(rout)
## Warning in rasch(X, constraint = constraint, start.val = c(betas.[, 1], : Hessian matrix at convergence is not positive definite; unstable solution.
## Warning in rasch(X, constraint = constraint, start.val = c(betas.[, 1], : Hessian matrix at convergence is not positive definite; unstable solution.
## Warning in rasch(X, constraint = constraint, start.val = c(betas.[, 1], : Hessian matrix at convergence is not positive definite; unstable solution.
## Warning in rasch(X, constraint = constraint, start.val = c(betas.[, 1], : Hessian matrix at convergence is not positive definite; unstable solution.
## Warning in rasch(X, constraint = constraint, start.val = c(betas.[, 1], : Hessian matrix at convergence is not positive definite; unstable solution.
## Warning in rasch(X, constraint = constraint, start.val = c(betas.[, 1], : Hessian matrix at convergence is not positive definite; unstable solution.
## Warning in rasch(X, constraint = constraint, start.val = c(betas.[, 1], : Hessian matrix at convergence is not positive definite; unstable solution.
## Warning in rasch(X, constraint = constraint, start.val = c(betas.[, 1], : Hessian matrix at convergence is not positive definite; unstable solution.
## Warning in rasch(X, constraint = constraint, start.val = c(betas.[, 1], : Hessian matrix at convergence is not positive definite; unstable solution.
## Warning in rasch(X, constraint = constraint, start.val = c(betas.[, 1], : Hessian matrix at convergence is not positive definite; unstable solution.
## Warning in rasch(X, constraint = constraint, start.val = c(betas.[, 1], : Hessian matrix at convergence is not positive definite; unstable solution.
## Warning in rasch(X, constraint = constraint, start.val = c(betas.[, 1], : Hessian matrix at convergence is not positive definite; unstable solution.
## Warning in rasch(X, constraint = constraint, start.val = c(betas.[, 1], : Hessian matrix at convergence is not positive definite; unstable solution.
## Warning in rasch(X, constraint = constraint, start.val = c(betas.[, 1], : Hessian matrix at convergence is not positive definite; unstable solution.
## Warning in rasch(X, constraint = constraint, start.val = c(betas.[, 1], : Hessian matrix at convergence is not positive definite; unstable solution.
## Warning in rasch(X, constraint = constraint, start.val = c(betas.[, 1], : Hessian matrix at convergence is not positive definite; unstable solution.
## Warning in rasch(X, constraint = constraint, start.val = c(betas.[, 1], : Hessian matrix at convergence is not positive definite; unstable solution.
## Warning in rasch(X, constraint = constraint, start.val = c(betas.[, 1], : Hessian matrix at convergence is not positive definite; unstable solution.
## Warning in rasch(X, constraint = constraint, start.val = c(betas.[, 1], : Hessian matrix at convergence is not positive definite; unstable solution.
##
## Bootstrap Goodness-of-Fit using Pearson chi-squared
##
## Call:
## rasch(data = irt_questions)
##
## Tobs: 1.36
## # data-sets: 50
## p-value: 0.46
item.fit(rout,simulate.p.value=20) unidimTest(rout)
Estimate trait scores trait.scores.rasch <- factor.scores.rasch(rout,resp.patterns = questions) head(trait.scores.rasch\(score.dat) tail(trait.scores.rasch\)score.dat)
ICC, IIC, TIC plots #Plot of Item Characteristic Curves plot(rout, type=“ICC”, lty=1:5, col=“black”) #Plot of Item information curves plot(rout, type=“IIC”,lty=1:5, col=“black”) #Plot of Test Information Curve plot(rout, type = “IIC”, items = 0, lwd=2)
citation("ltm")
## To cite package 'ltm' in publications use:
##
## Dimitris Rizopoulos (2006). ltm: An R package for Latent Variable
## Modelling and Item Response Theory Analyses, Journal of Statistical
## Software, 17 (5), 1-25. URL https://doi.org/10.18637/jss.v017.i05
##
## A BibTeX entry for LaTeX users is
##
## @Article{,
## title = {ltm: An R package for Latent Variable Modelling and Item Response Theory Analyses},
## author = {Dimitris Rizopoulos},
## journal = {Journal of Statistical Software},
## year = {2006},
## volume = {17},
## number = {5},
## pages = {1--25},
## url = {https://doi.org/10.18637/jss.v017.i05},
## }
citation(package = "psychometric")
## To cite package 'psychometric' in publications use:
##
## Fletcher TD (2023). _psychometric: Applied Psychometric Theory_. R
## package version 2.4,
## <https://CRAN.R-project.org/package=psychometric>.
##
## A BibTeX entry for LaTeX users is
##
## @Manual{,
## title = {psychometric: Applied Psychometric Theory},
## author = {Thomas D. Fletcher},
## year = {2023},
## note = {R package version 2.4},
## url = {https://CRAN.R-project.org/package=psychometric},
## }
##
## ATTENTION: This citation information has been auto-generated from the
## package DESCRIPTION file and may need manual editing, see
## 'help("citation")'.
citation(package = "sjstats")
## To cite package 'sjstats' in publications use:
##
## Lüdecke D (2024). _sjstats: Statistical Functions for Regression
## Models (Version 0.19.0)_. doi:10.5281/zenodo.1284472
## <https://doi.org/10.5281/zenodo.1284472>,
## <https://CRAN.R-project.org/package=sjstats>.
##
## A BibTeX entry for LaTeX users is
##
## @Manual{,
## title = {sjstats: Statistical Functions for Regression Models (Version 0.19.0)},
## author = {Daniel Lüdecke},
## year = {2024},
## url = {https://CRAN.R-project.org/package=sjstats},
## doi = {10.5281/zenodo.1284472},
## }
citation(package = "psych")
## To cite package 'psych' in publications use:
##
## William Revelle (2024). _psych: Procedures for Psychological,
## Psychometric, and Personality Research_. Northwestern University,
## Evanston, Illinois. R package version 2.4.6,
## <https://CRAN.R-project.org/package=psych>.
##
## A BibTeX entry for LaTeX users is
##
## @Manual{,
## title = {psych: Procedures for Psychological, Psychometric, and Personality Research},
## author = {{William Revelle}},
## organization = {Northwestern University},
## address = {Evanston, Illinois},
## year = {2024},
## note = {R package version 2.4.6},
## url = {https://CRAN.R-project.org/package=psych},
## }
```