Inhalt
Aktueller Ordner:
duesseldorfer-schuelerinventar-spss-Rπ Jupyter Notebook - Kernel: R
π§© Code Zelle #1
π Markdown Zelle #2
Histogramm:
π Markdown Zelle #3
Ein erster Hinweis auf die GΓΌte der Items ist sicherlich eine grobe AnnΓ€herung der Rohdaten an eine Normalverteilung
π§© Code Zelle #4
π§© Code Zelle #5 [In [5]]
fallprozeile <- read.csv2 ("https://paul-koop.org/fallprozeilenurdaten.csv", header=FALSE, dec=",");
for (i in 1:36){
hist(fallprozeile[,i],
freq=FALSE,
main=paste("Histogram item",i),
xlab=paste("item",i)
)
x <- seq(1,4,0.01)
curve(dnorm(x,mean=mean(fallprozeile[,i]),sd=sd(fallprozeile[,i])),add=TRUE)
}
Output:
Plot with title βHistogram item 1β
Plot with title βHistogram item 2β
Plot with title βHistogram item 3β
Plot with title βHistogram item 4β
Plot with title βHistogram item 5β
Plot with title βHistogram item 6β
Plot with title βHistogram item 7β
Plot with title βHistogram item 8β
Plot with title βHistogram item 9β
Plot with title βHistogram item 10β
Plot with title βHistogram item 11β
Plot with title βHistogram item 12β
Plot with title βHistogram item 13β
Plot with title βHistogram item 14β
Plot with title βHistogram item 15β
Plot with title βHistogram item 16β
Plot with title βHistogram item 17β
Plot with title βHistogram item 18β
Plot with title βHistogram item 19β
Plot with title βHistogram item 20β
Plot with title βHistogram item 21β
Plot with title βHistogram item 22β
Plot with title βHistogram item 23β
Plot with title βHistogram item 24β
Plot with title βHistogram item 25β
Plot with title βHistogram item 26β
Plot with title βHistogram item 27β
Plot with title βHistogram item 28β
Plot with title βHistogram item 29β
Plot with title βHistogram item 30β
Plot with title βHistogram item 31β
Plot with title βHistogram item 32β
Plot with title βHistogram item 33β
Plot with title βHistogram item 34β
Plot with title βHistogram item 35β
Plot with title βHistogram item 36β
π§© Code Zelle #6
π Markdown Zelle #7
Ein erstes objektives Merkmal der ValiditΓ€t eines Tests ist die TrennschΓ€rfe der Items. Valide ist ein Test dann, wenn er auch tatsΓ€chlich die Variable misst, die er auch vorgibt zu messen. Unter der TrennschΓ€rfe eines Items versteht man die Korrelation des Items mit dem Gesamtergebnis der jeweils gemessenen Dimension eines Tests.
π Markdown Zelle #8
π§© Code Zelle #9
Fachkompetenz:
π§© Code Zelle #10
π§© Code Zelle #11 [In [3]]
fachkompetenz <- read.csv2 ("https://paul-koop.org/SV.csv", header=TRUE, dec=",");
fachkompetenz$ts <- rowSums(fachkompetenz[,-1])
round(cor(fachkompetenz[,-1]),2)Output:
X21 X22 X23 X24 X25 X26 X27 X28 ts X21 1.00 0.61 0.47 0.49 0.48 0.39 0.46 0.42 0.75 X22 0.61 1.00 0.45 0.50 0.47 0.50 0.47 0.36 0.75 X23 0.47 0.45 1.00 0.42 0.56 0.42 0.44 0.41 0.72 X24 0.49 0.50 0.42 1.00 0.54 0.28 0.46 0.27 0.68 X25 0.48 0.47 0.56 0.54 1.00 0.45 0.43 0.40 0.75 X26 0.39 0.50 0.42 0.28 0.45 1.00 0.52 0.46 0.70 X27 0.46 0.47 0.44 0.46 0.43 0.52 1.00 0.56 0.76 X28 0.42 0.36 0.41 0.27 0.40 0.46 0.56 1.00 0.68 ts 0.75 0.75 0.72 0.68 0.75 0.70 0.76 0.68 1.00
π§© Code Zelle #12
Arbeitsverhalten:
π§© Code Zelle #13
π§© Code Zelle #14 [In [1]]
arbeitsverhalten <- read.csv2 ("https://paul-koop.org/AV.csv", header=TRUE, dec=",");
arbeitsverhalten$ts <- rowSums(arbeitsverhalten[,-1])
round(cor(arbeitsverhalten[,-1]),2)Output:
X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 ts X1 1.00 0.41 0.45 0.40 0.41 0.43 0.55 0.40 0.39 0.43 0.69 X2 0.41 1.00 0.44 0.56 0.36 0.35 0.35 0.49 0.51 0.35 0.69 X3 0.45 0.44 1.00 0.60 0.42 0.35 0.34 0.54 0.56 0.41 0.75 X4 0.40 0.56 0.60 1.00 0.43 0.31 0.36 0.61 0.46 0.49 0.76 X5 0.41 0.36 0.42 0.43 1.00 0.29 0.45 0.53 0.43 0.43 0.68 X6 0.43 0.35 0.35 0.31 0.29 1.00 0.64 0.27 0.31 0.26 0.59 X7 0.55 0.35 0.34 0.36 0.45 0.64 1.00 0.33 0.28 0.43 0.66 X8 0.40 0.49 0.54 0.61 0.53 0.27 0.33 1.00 0.55 0.52 0.76 X9 0.39 0.51 0.56 0.46 0.43 0.31 0.28 0.55 1.00 0.37 0.72 X10 0.43 0.35 0.41 0.49 0.43 0.26 0.43 0.52 0.37 1.00 0.67 ts 0.69 0.69 0.75 0.76 0.68 0.59 0.66 0.76 0.72 0.67 1.00
π§© Code Zelle #15
Sozialverhalten:
π§© Code Zelle #16
π§© Code Zelle #17 [In [7]]
sozialverhalten <- read.csv2 ("https://paul-koop.org/SV.csv", header=TRUE, dec=",");
sozialverhalten$ts <- rowSums(sozialverhalten[,-1])
round(cor(sozialverhalten[,-1]),2)Output:
X21 X22 X23 X24 X25 X26 X27 X28 ts X21 1.00 0.61 0.47 0.49 0.48 0.39 0.46 0.42 0.75 X22 0.61 1.00 0.45 0.50 0.47 0.50 0.47 0.36 0.75 X23 0.47 0.45 1.00 0.42 0.56 0.42 0.44 0.41 0.72 X24 0.49 0.50 0.42 1.00 0.54 0.28 0.46 0.27 0.68 X25 0.48 0.47 0.56 0.54 1.00 0.45 0.43 0.40 0.75 X26 0.39 0.50 0.42 0.28 0.45 1.00 0.52 0.46 0.70 X27 0.46 0.47 0.44 0.46 0.43 0.52 1.00 0.56 0.76 X28 0.42 0.36 0.41 0.27 0.40 0.46 0.56 1.00 0.68 ts 0.75 0.75 0.72 0.68 0.75 0.70 0.76 0.68 1.00
π§© Code Zelle #18
Lernverhalten:
π§© Code Zelle #19
π§© Code Zelle #20 [In [6]]
lernverhalten <- read.csv2 ("https://paul-koop.org/LV.csv", header=TRUE, dec=",");
lernverhalten$ts <- rowSums(lernverhalten[,-1])
round(cor(lernverhalten[,-1]),2)Output:
X11 X12 X13 X14 X15 X16 X17 X18 X19 X20 ts X11 1.00 0.54 0.52 0.47 0.55 0.47 0.53 0.50 0.46 0.46 0.77 X12 0.54 1.00 0.53 0.48 0.50 0.49 0.45 0.29 0.53 0.42 0.73 X13 0.52 0.53 1.00 0.35 0.51 0.45 0.48 0.44 0.48 0.46 0.74 X14 0.47 0.48 0.35 1.00 0.50 0.38 0.43 0.28 0.52 0.48 0.68 X15 0.55 0.50 0.51 0.50 1.00 0.39 0.34 0.34 0.44 0.44 0.71 X16 0.47 0.49 0.45 0.38 0.39 1.00 0.49 0.33 0.52 0.42 0.69 X17 0.53 0.45 0.48 0.43 0.34 0.49 1.00 0.45 0.48 0.42 0.71 X18 0.50 0.29 0.44 0.28 0.34 0.33 0.45 1.00 0.46 0.45 0.64 X19 0.46 0.53 0.48 0.52 0.44 0.52 0.48 0.46 1.00 0.55 0.76 X20 0.46 0.42 0.46 0.48 0.44 0.42 0.42 0.45 0.55 1.00 0.71 ts 0.77 0.73 0.74 0.68 0.71 0.69 0.71 0.64 0.76 0.71 1.00
π§© Code Zelle #21
π Markdown Zelle #22
Interkorrelation:
π Markdown Zelle #23
Einen weiteren ersten qualitativen Hinweis auf die GΓΌte der Items bieten ihre Interkorrelationen innerhalb der Dimensionen, denen die Items zugeordnet sind. Denn wenn die Items eine gemeinsame Dimension messen, mΓΌssen sie positiv miteinander korreliert sein.
π§© Code Zelle #24
π§© Code Zelle #25 [In [3]]
install.packages("psych", repos='http://cran.us.r-project.org')
library(psych)
options(max.print = 9999)
interkorrelation <- read.csv2 ("https://paul-koop.org/rohdaten.csv", header=TRUE, dec=",");
round(cor(interkorrelation[,-1]),2)Output:
Installing package into β/srv/rlibsβ (as βlibβ is unspecified)
X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 β― X27 X28 X29 X30
X1 1.00 0.41 0.45 0.40 0.41 0.43 0.55 0.40 0.39 0.43 β― 0.28 0.22 0.12 0.32
X2 0.41 1.00 0.44 0.56 0.36 0.35 0.35 0.49 0.51 0.35 β― 0.18 0.33 0.12 0.36
X3 0.45 0.44 1.00 0.60 0.42 0.35 0.34 0.54 0.56 0.41 β― 0.24 0.30 0.08 0.43
X4 0.40 0.56 0.60 1.00 0.43 0.31 0.36 0.61 0.46 0.49 β― 0.30 0.31 0.06 0.43
X5 0.41 0.36 0.42 0.43 1.00 0.29 0.45 0.53 0.43 0.43 β― 0.08 0.10 0.12 0.27
X6 0.43 0.35 0.35 0.31 0.29 1.00 0.64 0.27 0.31 0.26 β― 0.32 0.21 0.31 0.29
X7 0.55 0.35 0.34 0.36 0.45 0.64 1.00 0.33 0.28 0.43 β― 0.21 0.18 0.30 0.31
X8 0.40 0.49 0.54 0.61 0.53 0.27 0.33 1.00 0.55 0.52 β― 0.21 0.18 0.06 0.44
X9 0.39 0.51 0.56 0.46 0.43 0.31 0.28 0.55 1.00 0.37 β― 0.20 0.30 0.15 0.38
X10 0.43 0.35 0.41 0.49 0.43 0.26 0.43 0.52 0.37 1.00 β― 0.30 0.27 0.08 0.36
X11 0.44 0.56 0.48 0.49 0.41 0.33 0.34 0.52 0.48 0.49 β― 0.27 0.23 0.04 0.42
X12 0.47 0.49 0.43 0.38 0.45 0.34 0.43 0.45 0.54 0.36 β― 0.26 0.36 0.08 0.25
X13 0.55 0.42 0.44 0.38 0.49 0.42 0.43 0.42 0.48 0.49 β― 0.29 0.37 0.09 0.34
X14 0.33 0.39 0.45 0.51 0.37 0.33 0.36 0.46 0.37 0.45 β― 0.38 0.32 0.13 0.37
X15 0.48 0.44 0.54 0.49 0.44 0.38 0.36 0.52 0.40 0.46 β― 0.27 0.28 0.07 0.27
X16 0.46 0.44 0.44 0.53 0.38 0.38 0.44 0.38 0.42 0.38 β― 0.24 0.31 0.06 0.31
X17 0.41 0.54 0.42 0.46 0.43 0.39 0.41 0.47 0.53 0.47 β― 0.23 0.30 0.15 0.44
X18 0.30 0.39 0.32 0.39 0.33 0.32 0.36 0.41 0.46 0.50 β― 0.29 0.25 0.13 0.44
X19 0.44 0.49 0.45 0.54 0.46 0.41 0.50 0.47 0.48 0.45 β― 0.33 0.35 0.15 0.39
X20 0.37 0.40 0.41 0.43 0.43 0.42 0.48 0.46 0.37 0.48 β― 0.33 0.21 0.19 0.42
X21 0.43 0.37 0.37 0.38 0.29 0.34 0.43 0.29 0.24 0.24 β― 0.46 0.42 0.27 0.34
X22 0.30 0.29 0.30 0.34 0.18 0.37 0.37 0.27 0.19 0.24 β― 0.47 0.36 0.19 0.33
X23 0.21 0.26 0.30 0.38 0.26 0.25 0.26 0.36 0.27 0.29 β― 0.44 0.41 0.14 0.34
X24 0.41 0.21 0.22 0.25 0.22 0.40 0.40 0.30 0.21 0.19 β― 0.46 0.27 0.20 0.25
X25 0.40 0.27 0.32 0.32 0.23 0.32 0.33 0.31 0.18 0.31 β― 0.43 0.40 0.11 0.38
X26 0.31 0.25 0.30 0.39 0.07 0.15 0.15 0.23 0.19 0.29 β― 0.52 0.46 0.09 0.31
X27 0.28 0.18 0.24 0.30 0.08 0.32 0.21 0.21 0.20 0.30 β― 1.00 0.56 0.19 0.24
X28 0.22 0.33 0.30 0.31 0.10 0.21 0.18 0.18 0.30 0.27 β― 0.56 1.00 0.07 0.28
X29 0.12 0.12 0.08 0.06 0.12 0.31 0.30 0.06 0.15 0.08 β― 0.19 0.07 1.00 0.28
X30 0.32 0.36 0.43 0.43 0.27 0.29 0.31 0.44 0.38 0.36 β― 0.24 0.28 0.28 1.00
X31 0.02 0.15 -0.07 0.03 0.13 0.06 0.16 0.06 0.06 0.11 β― -0.13 -0.07 0.12 0.17
X32 0.10 0.06 0.14 0.23 0.10 0.22 0.24 0.11 0.08 0.20 β― 0.11 0.07 0.12 0.28
X33 0.00 0.07 0.10 0.10 0.02 0.14 0.20 0.05 0.08 0.25 β― 0.01 0.01 0.20 0.27
X34 0.07 0.05 0.18 0.11 0.16 0.31 0.31 0.13 0.08 0.18 β― 0.09 0.03 0.33 0.35
X35 -0.01 0.11 0.12 0.11 0.25 0.08 0.27 0.15 0.00 0.15 β― -0.18 -0.09 0.08 0.27
X36 0.19 0.09 0.11 0.21 0.16 0.22 0.30 0.21 0.00 0.22 β― 0.05 -0.05 0.12 0.28
X31 X32 X33 X34 X35 X36
X1 0.02 0.10 0.00 0.07 -0.01 0.19
X2 0.15 0.06 0.07 0.05 0.11 0.09
X3 -0.07 0.14 0.10 0.18 0.12 0.11
X4 0.03 0.23 0.10 0.11 0.11 0.21
X5 0.13 0.10 0.02 0.16 0.25 0.16
X6 0.06 0.22 0.14 0.31 0.08 0.22
X7 0.16 0.24 0.20 0.31 0.27 0.30
X8 0.06 0.11 0.05 0.13 0.15 0.21
X9 0.06 0.08 0.08 0.08 0.00 0.00
X10 0.11 0.20 0.25 0.18 0.15 0.22
X11 0.08 0.06 0.05 0.16 0.00 0.17
X12 0.10 0.15 -0.13 0.14 0.09 0.08
X13 -0.02 0.09 0.01 0.11 0.01 0.09
X14 0.03 0.16 0.08 0.27 0.18 0.19
X15 0.03 0.05 -0.05 0.20 0.10 0.19
X16 -0.08 0.23 -0.07 -0.01 0.01 0.01
X17 0.10 0.15 0.12 0.12 0.07 0.18
X18 0.23 0.12 0.22 0.18 0.09 0.25
X19 -0.03 0.22 0.02 0.13 0.05 0.11
X20 0.07 0.21 0.19 0.30 0.23 0.23
X21 0.01 0.04 0.10 0.25 0.09 0.15
X22 0.04 0.20 0.03 0.30 0.16 0.14
X23 -0.12 0.06 0.08 0.10 -0.06 0.08
X24 -0.16 0.11 0.08 0.13 -0.06 0.08
X25 -0.03 0.14 0.14 0.16 0.08 0.15
X26 0.04 0.17 0.00 0.15 -0.04 0.11
X27 -0.13 0.11 0.01 0.09 -0.18 0.05
X28 -0.07 0.07 0.01 0.03 -0.09 -0.05
X29 0.12 0.12 0.20 0.33 0.08 0.12
X30 0.17 0.28 0.27 0.35 0.27 0.28
X31 1.00 0.26 0.24 0.26 0.47 0.36
X32 0.26 1.00 0.14 0.37 0.46 0.37
X33 0.24 0.14 1.00 0.44 0.31 0.30
X34 0.26 0.37 0.44 1.00 0.49 0.49
X35 0.47 0.46 0.31 0.49 1.00 0.42
X36 0.36 0.37 0.30 0.49 0.42 1.00π§© Code Zelle #26
π Markdown Zelle #27
Cronbachs Alpha:
π Markdown Zelle #28
Ein Test muss eine Variable aber auch mΓΆglichst genau messen. Ein MaΓ fΓΌr die Genauigkeit der Messung ist die ReliabilitΓ€t. Wenn es nicht mΓΆglich ist, an derselben Testgruppe einen Wiederholungstest zu machen oder die Testergebnisse mit anderen bereits als valide und reliabel eingestuften Tests zu korrelieren, wird hΓ€ufig der Split-Half Test und die Konsistenzanalyse nach Cronbach durchgefΓΌhrt. Bei der Split-Half Analyse wird der Test ΓΌber alle Dimensionen in zwei HΓ€lften aufgeteilt und diese beiden HΓ€lften werden miteinander korreliert.
π Markdown Zelle #29
π§© Code Zelle #30 [In [1]]
install.packages("psych", repos='http://cran.us.r-project.org')
library(psych)
cronalpha <- read.csv2 ("https://paul-koop.org/rohdaten.csv", header=TRUE, dec=",");
alpha(cronalpha[,-1])#paket psych
cronalpha <- cronalpha[,-1]
erste_haelfte <- cronalpha[,1:18]
zweite_haelfte <- cronalpha[,19:36]
cor(rowSums(erste_haelfte),rowSums(zweite_haelfte))Output:
Installing package into β/srv/rlibsβ (as βlibβ is unspecified)
Reliability analysis
Call: alpha(x = cronalpha[, -1])
raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
0.94 0.94 0.96 0.29 15 0.0057 2.8 0.43 0.31
95% confidence boundaries
lower alpha upper
Feldt 0.92 0.94 0.95
Duhachek 0.93 0.94 0.95
Reliability if an item is dropped:
raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
X1 0.93 0.93 0.96 0.29 14 0.0059 0.025 0.30
X2 0.93 0.93 0.96 0.29 14 0.0060 0.025 0.30
X3 0.93 0.93 0.96 0.29 14 0.0060 0.025 0.30
X4 0.93 0.93 0.96 0.28 14 0.0060 0.025 0.30
X5 0.93 0.93 0.96 0.29 14 0.0059 0.026 0.31
X6 0.93 0.93 0.96 0.29 14 0.0059 0.026 0.30
X7 0.93 0.93 0.96 0.29 14 0.0060 0.026 0.30
X8 0.93 0.93 0.96 0.29 14 0.0060 0.025 0.31
X9 0.93 0.93 0.96 0.29 14 0.0059 0.025 0.31
X10 0.93 0.93 0.96 0.29 14 0.0060 0.026 0.31
X11 0.93 0.93 0.96 0.28 14 0.0060 0.025 0.30
X12 0.93 0.93 0.96 0.29 14 0.0060 0.025 0.31
X13 0.93 0.93 0.96 0.29 14 0.0060 0.025 0.30
X14 0.93 0.93 0.96 0.29 14 0.0060 0.026 0.30
X15 0.93 0.93 0.96 0.29 14 0.0060 0.025 0.30
X16 0.93 0.93 0.96 0.29 14 0.0059 0.025 0.30
X17 0.93 0.93 0.96 0.29 14 0.0060 0.026 0.30
X18 0.93 0.93 0.96 0.29 14 0.0059 0.026 0.31
X19 0.93 0.93 0.96 0.28 14 0.0060 0.025 0.30
X20 0.93 0.93 0.96 0.28 14 0.0060 0.026 0.30
X21 0.93 0.93 0.96 0.29 14 0.0059 0.026 0.30
X22 0.93 0.93 0.96 0.29 14 0.0059 0.026 0.31
X23 0.93 0.93 0.96 0.29 14 0.0059 0.026 0.31
X24 0.94 0.93 0.96 0.29 14 0.0059 0.026 0.31
X25 0.93 0.93 0.96 0.29 14 0.0059 0.026 0.30
X26 0.94 0.93 0.96 0.29 14 0.0058 0.026 0.31
X27 0.94 0.93 0.96 0.29 14 0.0058 0.025 0.31
X28 0.94 0.94 0.96 0.29 14 0.0058 0.025 0.31
X29 0.94 0.94 0.96 0.30 15 0.0057 0.025 0.32
X30 0.93 0.93 0.96 0.29 14 0.0059 0.026 0.30
X31 0.94 0.94 0.96 0.30 15 0.0056 0.023 0.32
X32 0.94 0.94 0.96 0.30 15 0.0057 0.025 0.32
X33 0.94 0.94 0.96 0.30 15 0.0056 0.024 0.32
X34 0.94 0.94 0.96 0.29 15 0.0057 0.025 0.31
X35 0.94 0.94 0.96 0.30 15 0.0056 0.024 0.32
X36 0.94 0.94 0.96 0.30 15 0.0057 0.025 0.32
Item statistics
n raw.r std.r r.cor r.drop mean sd
X1 240 0.62 0.63 0.62 0.60 3.2 0.72
X2 240 0.64 0.63 0.62 0.60 2.9 0.77
X3 240 0.66 0.65 0.64 0.63 2.7 0.85
X4 240 0.70 0.69 0.69 0.67 2.8 0.89
X5 240 0.59 0.58 0.57 0.55 3.0 0.80
X6 240 0.59 0.60 0.59 0.56 3.1 0.74
X7 240 0.65 0.66 0.66 0.63 3.3 0.67
X8 240 0.66 0.66 0.65 0.64 2.7 0.76
X9 240 0.61 0.60 0.59 0.57 2.6 0.95
X10 240 0.65 0.64 0.64 0.62 2.7 0.75
X11 240 0.69 0.68 0.68 0.66 2.8 0.83
X12 240 0.64 0.64 0.63 0.61 2.9 0.76
X13 240 0.66 0.65 0.64 0.62 2.8 0.83
X14 240 0.67 0.67 0.66 0.64 2.9 0.76
X15 240 0.65 0.64 0.63 0.61 2.8 0.87
X16 240 0.62 0.61 0.60 0.58 3.0 0.80
X17 240 0.66 0.66 0.65 0.63 2.7 0.74
X18 240 0.61 0.61 0.60 0.58 2.7 0.79
X19 240 0.71 0.71 0.70 0.68 3.0 0.79
X20 240 0.70 0.70 0.69 0.67 2.9 0.74
X21 240 0.61 0.62 0.61 0.58 3.3 0.75
X22 240 0.60 0.61 0.60 0.57 3.3 0.69
X23 240 0.54 0.55 0.53 0.51 3.0 0.75
X24 240 0.52 0.53 0.51 0.48 3.3 0.68
X25 240 0.59 0.59 0.58 0.55 3.1 0.70
X26 240 0.51 0.51 0.50 0.47 2.9 0.74
X27 240 0.49 0.49 0.48 0.45 2.8 0.80
X28 240 0.48 0.48 0.46 0.44 3.0 0.74
X29 240 0.29 0.30 0.27 0.25 2.2 0.75
X30 240 0.63 0.63 0.62 0.60 2.6 0.77
X31 240 0.18 0.18 0.16 0.13 2.4 0.71
X32 240 0.33 0.34 0.32 0.29 2.3 0.78
X33 240 0.23 0.24 0.22 0.19 2.3 0.75
X34 240 0.40 0.41 0.39 0.35 2.4 0.72
X35 240 0.27 0.27 0.26 0.22 2.5 0.79
X36 240 0.35 0.36 0.34 0.31 2.3 0.61
Non missing response frequency for each item
1 2 3 4 miss
X1 0.00 0.19 0.46 0.35 0
X2 0.02 0.32 0.45 0.22 0
X3 0.05 0.37 0.37 0.20 0
X4 0.06 0.34 0.35 0.25 0
X5 0.02 0.29 0.40 0.29 0
X6 0.01 0.19 0.46 0.34 0
X7 0.00 0.12 0.48 0.40 0
X8 0.03 0.38 0.43 0.15 0
X9 0.12 0.38 0.30 0.21 0
X10 0.03 0.35 0.46 0.16 0
X11 0.04 0.38 0.38 0.21 0
X12 0.02 0.29 0.48 0.21 0
X13 0.04 0.34 0.39 0.23 0
X14 0.03 0.27 0.50 0.20 0
X15 0.06 0.34 0.38 0.23 0
X16 0.03 0.25 0.44 0.29 0
X17 0.02 0.39 0.44 0.16 0
X18 0.05 0.36 0.44 0.16 0
X19 0.03 0.25 0.45 0.27 0
X20 0.01 0.30 0.47 0.22 0
X21 0.01 0.15 0.39 0.45 0
X22 0.01 0.11 0.46 0.42 0
X23 0.01 0.22 0.47 0.30 0
X24 0.00 0.11 0.45 0.43 0
X25 0.00 0.19 0.51 0.30 0
X26 0.02 0.27 0.50 0.21 0
X27 0.04 0.30 0.45 0.21 0
X28 0.02 0.25 0.50 0.23 0
X29 0.11 0.69 0.10 0.10 0
X30 0.06 0.38 0.44 0.12 0
X31 0.03 0.67 0.20 0.10 0
X32 0.05 0.69 0.12 0.14 0
X33 0.07 0.70 0.11 0.11 0
X34 0.03 0.67 0.19 0.11 0
X35 0.02 0.60 0.21 0.17 0
X36 0.03 0.69 0.23 0.05 0[1] 0.674236
π§© Code Zelle #31
π Markdown Zelle #32
Hauptkomponentenanalyse PCA
π Markdown Zelle #33
Die Hauptkomponentenanalyse (abgekΓΌrzt: PCA) ist eine Methode der multivariaten Statistik und strukturiert DatensΓ€tze durch Approximation einer groΓen Anzahl statistischer Variablen mit einer kleineren Anzahl korrelierter linearer Hauptkomponenten.
π§© Code Zelle #34
π§© Code Zelle #35 [In [5]]
install.packages("stats", repos='http://cran.us.r-project.org')
library(psych)
tabellePCAMVS <- read.csv2 ("https://paul-koop.org/PCAMVS.csv", header=TRUE, dec=",");
PCAbeobachtung <- tabellePCAMVS;
PCAMVSnr <- PCAbeobachtung[,1]; PCAbeobachtung <- PCAbeobachtung[,-1];
PCAMVSart <- PCAbeobachtung[,1];PCAbeobachtung <- PCAbeobachtung[,-1];
MVS <-cmdscale(dist(PCAbeobachtung));
plot (MVS, type = "p", col = 1);
text(MVS[,1],
MVS[,2],
PCAMVSart,
col=1)
PCA<-prcomp(scale(PCAbeobachtung))
biplot(PCA,choices=c(1,2))Output:
Installing package into β/srv/rlibsβ (as βlibβ is unspecified) Warning message: βpackage βstatsβ is a base package, and should not be updatedβ
plot without title
plot without title
π§© Code Zelle #36
π Markdown Zelle #37
Faktorenanalyse:
π Markdown Zelle #38
Mithilfe der Faktorenanalyse wird ΓΌberprΓΌft, ob sich die Items in mehrere Subskalen unterteilen lassen.
π§© Code Zelle #39
π§© Code Zelle #40 [In [4]]
install.packages("psych", repos='http://cran.us.r-project.org')
library(psych)
rohdaten <- read.csv2 ("http://paul-koop.org/rohdaten.csv", header=TRUE, dec=",");
rohdaten <- rohdaten[,-1]
KMO(rohdaten)
scree(rohdaten)
print(factanal(rohdaten, factors=4, rotation="varimax", scores="Bartlett"), digits=2, cutoff=.3)
print(factanal(rohdaten, factors=6, rotation="varimax", scores="Bartlett"), digits=2, cutoff=.3)Output:
Installing package into β/srv/rlibsβ (as βlibβ is unspecified)
Kaiser-Meyer-Olkin factor adequacy Call: KMO(r = rohdaten) Overall MSA = 0.9 MSA for each item = X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 X11 X12 X13 X14 X15 X16 0.91 0.92 0.94 0.93 0.93 0.88 0.89 0.93 0.91 0.91 0.92 0.91 0.95 0.95 0.94 0.94 X17 X18 X19 X20 X21 X22 X23 X24 X25 X26 X27 X28 X29 X30 X31 X32 0.96 0.90 0.94 0.95 0.90 0.90 0.92 0.87 0.90 0.85 0.89 0.85 0.76 0.93 0.68 0.70 X33 X34 X35 X36 0.68 0.82 0.68 0.85
Call:
factanal(x = rohdaten, factors = 4, scores = "Bartlett", rotation = "varimax")
Uniquenesses:
X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 X11 X12 X13 X14 X15 X16
0.50 0.53 0.51 0.45 0.53 0.48 0.24 0.44 0.48 0.56 0.45 0.52 0.50 0.53 0.55 0.53
X17 X18 X19 X20 X21 X22 X23 X24 X25 X26 X27 X28 X29 X30 X31 X32
0.52 0.63 0.46 0.52 0.49 0.45 0.56 0.51 0.52 0.48 0.45 0.59 0.83 0.57 0.69 0.73
X33 X34 X35 X36
0.75 0.46 0.42 0.60
Loadings:
Factor1 Factor2 Factor3 Factor4
X1 0.53 0.43
X2 0.66
X3 0.66
X4 0.67
X5 0.62
X6 0.33 0.58
X7 0.40 0.70
X8 0.72
X9 0.71
X10 0.60
X11 0.69
X12 0.63
X13 0.62
X14 0.51 0.40
X15 0.62
X16 0.57
X17 0.65
X18 0.53
X19 0.61 0.30
X20 0.51
X21 0.58 0.31
X22 0.65
X23 0.59
X24 0.52 0.43
X25 0.60
X26 0.67
X27 0.71
X28 0.57
X29
X30 0.44 0.30 0.38
X31 0.53
X32 0.49
X33 0.50
X34 0.70
X35 0.75
X36 0.62
Factor1 Factor2 Factor3 Factor4
SS loadings 7.88 4.19 2.89 2.01
Proportion Var 0.22 0.12 0.08 0.06
Cumulative Var 0.22 0.34 0.42 0.47
Test of the hypothesis that 4 factors are sufficient.
The chi square statistic is 1022.46 on 492 degrees of freedom.
The p-value is 2.15e-39
Call:
factanal(x = rohdaten, factors = 6, scores = "Bartlett", rotation = "varimax")
Uniquenesses:
X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 X11 X12 X13 X14 X15 X16
0.50 0.52 0.47 0.39 0.51 0.47 0.26 0.37 0.46 0.52 0.44 0.31 0.47 0.48 0.51 0.53
X17 X18 X19 X20 X21 X22 X23 X24 X25 X26 X27 X28 X29 X30 X31 X32
0.49 0.41 0.46 0.51 0.47 0.37 0.53 0.48 0.51 0.46 0.43 0.55 0.81 0.53 0.53 0.72
X33 X34 X35 X36
0.59 0.49 0.30 0.61
Loadings:
Factor1 Factor2 Factor3 Factor4 Factor5 Factor6
X1 0.53 0.42
X2 0.65
X3 0.66
X4 0.68
X5 0.63
X6 0.33 0.60
X7 0.40 0.69
X8 0.74
X9 0.71
X10 0.59
X11 0.68
X12 0.65 -0.34
X13 0.61
X14 0.52 0.42
X15 0.62
X16 0.58
X17 0.63
X18 0.51 0.45
X19 0.61 0.30
X20 0.51
X21 0.57 0.32
X22 0.67
X23 0.57
X24 0.49 0.46
X25 0.58
X26 0.69
X27 0.71
X28 0.58
X29 0.32
X30 0.42 0.35
X31 0.57 0.34
X32 0.50
X33 0.45 0.44
X34 0.67
X35 0.81
X36 0.58
Factor1 Factor2 Factor3 Factor4 Factor5 Factor6
SS loadings 7.83 4.17 2.87 2.14 0.91 0.60
Proportion Var 0.22 0.12 0.08 0.06 0.03 0.02
Cumulative Var 0.22 0.33 0.41 0.47 0.50 0.51
Test of the hypothesis that 6 factors are sufficient.
The chi square statistic is 810.71 on 429 degrees of freedom.
The p-value is 7.64e-26
Plot with title βScree plotβ