library(psych)
library(MASS)
library(rcompanion)
##
## Attaching package: 'rcompanion'
## The following object is masked from 'package:psych':
##
## phi
library(car)
## Loading required package: carData
##
## Attaching package: 'car'
## The following object is masked from 'package:psych':
##
## logit
data_01 <- read.csv("1134.csv", header = TRUE, sep = ";")
names (data_01) #see names in data
## [1] "ï..case" "SERIAL" "REF" "QUESTNNR" "MODE"
## [6] "sj01" "sj02" "sj03" "sj04" "sj05"
## [11] "sj06" "sj07" "sj08" "sdo01" "sdo02"
## [16] "sdo03" "sdo04" "sdo05" "sdo06" "sdo07"
## [21] "sdo08" "sdo09" "nd01" "nd02" "nd03"
## [26] "nd04" "nd05" "nd06" "nd07" "nd08"
## [31] "nd09" "nd10" "rwa01" "rwa02" "rwa03"
## [36] "rwa04" "rwa05" "rwa06" "rwa07" "rwa08"
## [41] "rwa09" "rwa10" "rwa11" "rwa12" "gender"
## [46] "age" "edu" "SD03_08" "income" "pol.orient"
## [51] "SD08_01" "asimp01" "asimp02" "asimp03" "asimp04"
## [56] "asimp05" "asimp06" "asimp07" "asimp08" "asimp09"
## [61] "asimp10" "asimp11" "aspro01" "aspro02" "aspro03"
## [66] "aspro04" "aspro05" "aspro06" "aspro07" "aspro08"
## [71] "aspro09" "aspro10" "aspro11" "asimp12" "asimp13"
## [76] "asimp14" "asimp15" "asimp16" "asimp17" "asimp18"
## [81] "asimp19" "asimp20" "asimp21" "asimp22" "aspro12"
## [86] "aspro13" "aspro14" "aspro15" "aspro16" "aspro17"
## [91] "aspro18" "aspro19" "aspro20" "aspro21" "aspro22"
## [96] "sp11" "sp02" "sp24" "sp07" "sp21"
## [101] "sp05" "sp26" "sp14" "sp27" "sp18"
## [106] "sp20" "sp01" "sp23" "sp09" "sp08"
## [111] "sp03" "sp17" "sp19" "sp04" "sp25"
## [116] "k01" "sp22" "sp13" "sp06" "sp28"
## [121] "sp16" "sp10" "sp29" "sp15" "sp30"
## [126] "sp12" "k02" "gb01" "gb03" "gb05"
## [131] "gb07" "gb09" "gb11" "gb13" "gb15"
## [136] "gb17" "gb19" "gb02" "gb04" "gb06"
## [141] "gb08" "gb10" "gb12" "gb14" "gb16"
## [146] "gb18" "gb20" "OR03" "cas01" "cas02"
## [151] "cas03" "cas04" "cas05" "cas06" "cas07"
## [156] "cas08" "cas09" "cas10" "cas11" "cas12"
## [161] "cas13" "cas14" "ID01_RV1" "ID02_01" "ID02_03"
## [166] "phq01" "phq02" "phq03" "phq04" "phq05"
## [171] "ps01" "ps02" "int01" "int02" "int03"
## [176] "mp" "TIME001" "TIME002" "TIME004" "TIME005"
## [181] "TIME006" "TIME007" "TIME008" "TIME009" "TIME010"
## [186] "TIME011" "TIME012" "TIME013" "TIME014" "TIME015"
## [191] "TIME016" "TIME017" "TIME018" "TIME_SUM" "MAILSENT"
## [196] "FINISHED" "Q_VIEWER" "LASTPAGE" "MAXPAGE" "MISSING"
## [201] "MISSREL" "TIME_RSI" "DEG_TIME"
str(data_01)
## 'data.frame': 1134 obs. of 203 variables:
## $ ï..case : int 175 183 184 188 190 195 200 214 223 229 ...
## $ SERIAL : logi NA NA NA NA NA NA ...
## $ REF : logi NA NA NA NA NA NA ...
## $ QUESTNNR : chr "base" "base" "base" "base" ...
## $ MODE : chr "interview" "interview" "interview" "interview" ...
## $ sj01 : int 5 3 4 4 1 4 3 4 4 6 ...
## $ sj02 : int 7 5 5 5 4 6 4 3 1 6 ...
## $ sj03 : int 2 5 3 4 7 5 4 6 4 1 ...
## $ sj04 : int 7 4 4 4 1 7 1 6 1 5 ...
## $ sj05 : int 5 5 5 5 1 5 1 1 1 6 ...
## $ sj06 : int 6 2 5 3 1 4 7 7 1 6 ...
## $ sj07 : int 1 4 5 4 7 5 6 7 4 3 ...
## $ sj08 : int 5 1 4 3 1 4 2 6 1 6 ...
## $ sdo01 : int 3 1 4 4 1 2 1 5 1 2 ...
## $ sdo02 : int 5 1 5 6 1 6 1 5 7 3 ...
## $ sdo03 : int 7 7 4 5 7 7 7 5 7 6 ...
## $ sdo04 : int 7 7 6 7 7 7 7 5 1 7 ...
## $ sdo05 : int 2 1 4 2 1 2 2 7 1 3 ...
## $ sdo06 : int 1 1 4 3 4 6 2 5 1 5 ...
## $ sdo07 : int 6 7 5 5 4 6 6 5 7 6 ...
## $ sdo08 : int 6 7 6 6 7 7 7 5 7 7 ...
## $ sdo09 : int 2 2 2 2 2 2 2 2 2 2 ...
## $ nd01 : int 1 3 1 4 1 1 1 1 1 4 ...
## $ nd02 : int 3 4 1 6 1 2 1 3 7 2 ...
## $ nd03 : int 7 6 7 6 7 7 7 7 7 4 ...
## $ nd04 : int 3 2 1 4 1 1 1 2 1 3 ...
## $ nd05 : int 7 7 6 6 7 7 7 6 7 7 ...
## $ nd06 : int 6 4 7 6 7 7 7 6 1 6 ...
## $ nd07 : int 7 3 1 2 1 1 1 6 1 3 ...
## $ nd08 : int 5 4 2 2 1 1 1 3 1 2 ...
## $ nd09 : int 6 5 7 4 7 7 7 7 7 6 ...
## $ nd10 : int 2 7 6 5 7 7 1 6 1 4 ...
## $ rwa01 : int 6 5 7 5 7 6 7 5 7 5 ...
## $ rwa02 : int 2 1 5 3 1 7 4 7 1 4 ...
## $ rwa03 : int 7 7 6 7 7 7 7 7 7 7 ...
## $ rwa04 : int 1 4 6 5 1 6 1 5 1 4 ...
## $ rwa05 : int 7 7 5 3 7 3 7 2 4 7 ...
## $ rwa06 : int 5 3 4 4 3 7 3 7 1 4 ...
## $ rwa07 : int 7 7 2 7 7 7 6 6 7 6 ...
## $ rwa08 : int 4 4 3 3 2 6 7 7 1 4 ...
## $ rwa09 : int 7 7 5 5 7 6 1 2 7 5 ...
## $ rwa10 : int 4 3 5 5 1 7 6 7 3 5 ...
## $ rwa11 : int 1 5 3 3 4 2 1 4 3 3 ...
## $ rwa12 : int 4 3 4 2 1 6 2 7 1 3 ...
## $ gender : int 1 1 1 1 1 1 1 1 1 1 ...
## $ age : int 59 57 57 51 59 59 59 51 59 50 ...
## $ edu : int 6 5 7 4 5 5 5 5 7 7 ...
## $ SD03_08 : logi NA NA NA NA NA NA ...
## $ income : int 4 3 8 2 5 5 3 3 1 10 ...
## $ pol.orient: int 49 11 55 18 13 10 51 56 3 61 ...
## $ SD08_01 : chr "01-apr" "01-apr" "01-apr" "01-apr" ...
## $ asimp01 : int 4 7 7 6 4 7 1 7 1 7 ...
## $ asimp02 : int 4 6 5 6 4 6 1 5 1 6 ...
## $ asimp03 : int 4 5 4 5 4 7 4 4 1 4 ...
## $ asimp04 : int 3 4 5 6 7 7 1 3 1 5 ...
## $ asimp05 : int 3 5 3 5 1 5 1 3 7 4 ...
## $ asimp06 : int 1 3 2 5 1 5 1 4 1 2 ...
## $ asimp07 : int 7 7 7 7 7 7 7 4 7 6 ...
## $ asimp08 : int 1 3 4 4 1 5 1 4 1 3 ...
## $ asimp09 : int 4 7 7 7 7 7 7 5 7 7 ...
## $ asimp10 : int 5 7 6 6 5 7 1 4 7 6 ...
## $ asimp11 : int 1 1 1 6 1 5 1 3 1 2 ...
## $ aspro01 : int 4 7 7 6 3 6 1 7 1 6 ...
## $ aspro02 : int 4 6 2 5 1 5 1 5 1 6 ...
## $ aspro03 : int 4 6 6 6 3 5 1 4 1 5 ...
## $ aspro04 : int 3 4 7 5 1 7 1 3 1 6 ...
## $ aspro05 : int 4 6 3 5 1 5 1 3 7 6 ...
## $ aspro06 : int 1 4 1 5 7 5 1 4 1 5 ...
## $ aspro07 : int 7 3 4 6 1 6 1 7 7 6 ...
## $ aspro08 : int 1 5 3 7 1 4 1 4 1 3 ...
## $ aspro09 : int 6 6 7 7 1 7 7 5 7 7 ...
## $ aspro10 : int 6 6 4 5 1 7 1 4 7 6 ...
## $ aspro11 : int 1 1 1 5 1 3 1 3 1 1 ...
## $ asimp12 : int 4 6 7 6 6 6 5 5 1 7 ...
## $ asimp13 : int 5 6 4 5 6 6 1 5 1 6 ...
## $ asimp14 : int 4 5 6 6 1 5 6 5 1 5 ...
## $ asimp15 : int 3 6 7 6 4 3 5 2 7 7 ...
## $ asimp16 : int 4 6 6 6 2 4 1 4 4 4 ...
## $ asimp17 : int 5 4 1 5 1 4 1 4 1 4 ...
## $ asimp18 : int 7 7 7 6 7 7 7 4 7 7 ...
## $ asimp19 : int 1 3 1 4 1 4 1 5 1 4 ...
## $ asimp20 : int 7 7 7 6 6 6 5 5 7 7 ...
## $ asimp21 : int 7 7 5 6 7 6 6 5 7 7 ...
## $ asimp22 : int 1 3 1 6 1 3 1 3 1 1 ...
## $ aspro12 : int 5 5 7 5 4 5 1 4 1 7 ...
## $ aspro13 : int 5 4 1 4 6 6 1 5 1 6 ...
## $ aspro14 : int 4 6 6 4 1 3 1 5 1 6 ...
## $ aspro15 : int 6 3 7 2 1 5 7 2 7 7 ...
## $ aspro16 : int 7 5 5 4 2 5 1 4 4 5 ...
## $ aspro17 : int 4 4 1 5 1 5 2 4 1 4 ...
## $ aspro18 : int 7 4 4 5 1 6 1 4 7 5 ...
## $ aspro19 : int 1 4 1 1 1 3 1 5 1 5 ...
## $ aspro20 : int 4 6 5 4 1 4 1 4 7 4 ...
## $ aspro21 : int 7 6 4 5 1 5 1 5 7 6 ...
## $ aspro22 : int 1 4 1 5 1 2 1 3 1 2 ...
## $ sp11 : int 5 4 5 6 1 2 1 6 4 5 ...
## $ sp02 : int 1 3 6 6 4 2 1 4 3 1 ...
## $ sp24 : int 4 1 3 5 6 3 7 1 1 4 ...
## $ sp07 : int 2 3 3 6 4 2 1 4 1 1 ...
## [list output truncated]
Removing those with RSI >= 2 –> N=32
data_01$ï..case[data_01$TIME_RSI>=2]
## [1] 1150 512 1037 1342 1365 1471 2479 714 856 1078 2254 2453 2597 3173 3579
## [16] 256 548 841 2072 2405 1549 421 545 1103 1979 2631 1131 1437 853 2718
## [31] 2762 3113
data_02 <- data_01[!(data_01$TIME_RSI>=2),]
str(data_02)
## 'data.frame': 1102 obs. of 203 variables:
## $ ï..case : int 175 183 184 188 190 195 200 214 223 229 ...
## $ SERIAL : logi NA NA NA NA NA NA ...
## $ REF : logi NA NA NA NA NA NA ...
## $ QUESTNNR : chr "base" "base" "base" "base" ...
## $ MODE : chr "interview" "interview" "interview" "interview" ...
## $ sj01 : int 5 3 4 4 1 4 3 4 4 6 ...
## $ sj02 : int 7 5 5 5 4 6 4 3 1 6 ...
## $ sj03 : int 2 5 3 4 7 5 4 6 4 1 ...
## $ sj04 : int 7 4 4 4 1 7 1 6 1 5 ...
## $ sj05 : int 5 5 5 5 1 5 1 1 1 6 ...
## $ sj06 : int 6 2 5 3 1 4 7 7 1 6 ...
## $ sj07 : int 1 4 5 4 7 5 6 7 4 3 ...
## $ sj08 : int 5 1 4 3 1 4 2 6 1 6 ...
## $ sdo01 : int 3 1 4 4 1 2 1 5 1 2 ...
## $ sdo02 : int 5 1 5 6 1 6 1 5 7 3 ...
## $ sdo03 : int 7 7 4 5 7 7 7 5 7 6 ...
## $ sdo04 : int 7 7 6 7 7 7 7 5 1 7 ...
## $ sdo05 : int 2 1 4 2 1 2 2 7 1 3 ...
## $ sdo06 : int 1 1 4 3 4 6 2 5 1 5 ...
## $ sdo07 : int 6 7 5 5 4 6 6 5 7 6 ...
## $ sdo08 : int 6 7 6 6 7 7 7 5 7 7 ...
## $ sdo09 : int 2 2 2 2 2 2 2 2 2 2 ...
## $ nd01 : int 1 3 1 4 1 1 1 1 1 4 ...
## $ nd02 : int 3 4 1 6 1 2 1 3 7 2 ...
## $ nd03 : int 7 6 7 6 7 7 7 7 7 4 ...
## $ nd04 : int 3 2 1 4 1 1 1 2 1 3 ...
## $ nd05 : int 7 7 6 6 7 7 7 6 7 7 ...
## $ nd06 : int 6 4 7 6 7 7 7 6 1 6 ...
## $ nd07 : int 7 3 1 2 1 1 1 6 1 3 ...
## $ nd08 : int 5 4 2 2 1 1 1 3 1 2 ...
## $ nd09 : int 6 5 7 4 7 7 7 7 7 6 ...
## $ nd10 : int 2 7 6 5 7 7 1 6 1 4 ...
## $ rwa01 : int 6 5 7 5 7 6 7 5 7 5 ...
## $ rwa02 : int 2 1 5 3 1 7 4 7 1 4 ...
## $ rwa03 : int 7 7 6 7 7 7 7 7 7 7 ...
## $ rwa04 : int 1 4 6 5 1 6 1 5 1 4 ...
## $ rwa05 : int 7 7 5 3 7 3 7 2 4 7 ...
## $ rwa06 : int 5 3 4 4 3 7 3 7 1 4 ...
## $ rwa07 : int 7 7 2 7 7 7 6 6 7 6 ...
## $ rwa08 : int 4 4 3 3 2 6 7 7 1 4 ...
## $ rwa09 : int 7 7 5 5 7 6 1 2 7 5 ...
## $ rwa10 : int 4 3 5 5 1 7 6 7 3 5 ...
## $ rwa11 : int 1 5 3 3 4 2 1 4 3 3 ...
## $ rwa12 : int 4 3 4 2 1 6 2 7 1 3 ...
## $ gender : int 1 1 1 1 1 1 1 1 1 1 ...
## $ age : int 59 57 57 51 59 59 59 51 59 50 ...
## $ edu : int 6 5 7 4 5 5 5 5 7 7 ...
## $ SD03_08 : logi NA NA NA NA NA NA ...
## $ income : int 4 3 8 2 5 5 3 3 1 10 ...
## $ pol.orient: int 49 11 55 18 13 10 51 56 3 61 ...
## $ SD08_01 : chr "01-apr" "01-apr" "01-apr" "01-apr" ...
## $ asimp01 : int 4 7 7 6 4 7 1 7 1 7 ...
## $ asimp02 : int 4 6 5 6 4 6 1 5 1 6 ...
## $ asimp03 : int 4 5 4 5 4 7 4 4 1 4 ...
## $ asimp04 : int 3 4 5 6 7 7 1 3 1 5 ...
## $ asimp05 : int 3 5 3 5 1 5 1 3 7 4 ...
## $ asimp06 : int 1 3 2 5 1 5 1 4 1 2 ...
## $ asimp07 : int 7 7 7 7 7 7 7 4 7 6 ...
## $ asimp08 : int 1 3 4 4 1 5 1 4 1 3 ...
## $ asimp09 : int 4 7 7 7 7 7 7 5 7 7 ...
## $ asimp10 : int 5 7 6 6 5 7 1 4 7 6 ...
## $ asimp11 : int 1 1 1 6 1 5 1 3 1 2 ...
## $ aspro01 : int 4 7 7 6 3 6 1 7 1 6 ...
## $ aspro02 : int 4 6 2 5 1 5 1 5 1 6 ...
## $ aspro03 : int 4 6 6 6 3 5 1 4 1 5 ...
## $ aspro04 : int 3 4 7 5 1 7 1 3 1 6 ...
## $ aspro05 : int 4 6 3 5 1 5 1 3 7 6 ...
## $ aspro06 : int 1 4 1 5 7 5 1 4 1 5 ...
## $ aspro07 : int 7 3 4 6 1 6 1 7 7 6 ...
## $ aspro08 : int 1 5 3 7 1 4 1 4 1 3 ...
## $ aspro09 : int 6 6 7 7 1 7 7 5 7 7 ...
## $ aspro10 : int 6 6 4 5 1 7 1 4 7 6 ...
## $ aspro11 : int 1 1 1 5 1 3 1 3 1 1 ...
## $ asimp12 : int 4 6 7 6 6 6 5 5 1 7 ...
## $ asimp13 : int 5 6 4 5 6 6 1 5 1 6 ...
## $ asimp14 : int 4 5 6 6 1 5 6 5 1 5 ...
## $ asimp15 : int 3 6 7 6 4 3 5 2 7 7 ...
## $ asimp16 : int 4 6 6 6 2 4 1 4 4 4 ...
## $ asimp17 : int 5 4 1 5 1 4 1 4 1 4 ...
## $ asimp18 : int 7 7 7 6 7 7 7 4 7 7 ...
## $ asimp19 : int 1 3 1 4 1 4 1 5 1 4 ...
## $ asimp20 : int 7 7 7 6 6 6 5 5 7 7 ...
## $ asimp21 : int 7 7 5 6 7 6 6 5 7 7 ...
## $ asimp22 : int 1 3 1 6 1 3 1 3 1 1 ...
## $ aspro12 : int 5 5 7 5 4 5 1 4 1 7 ...
## $ aspro13 : int 5 4 1 4 6 6 1 5 1 6 ...
## $ aspro14 : int 4 6 6 4 1 3 1 5 1 6 ...
## $ aspro15 : int 6 3 7 2 1 5 7 2 7 7 ...
## $ aspro16 : int 7 5 5 4 2 5 1 4 4 5 ...
## $ aspro17 : int 4 4 1 5 1 5 2 4 1 4 ...
## $ aspro18 : int 7 4 4 5 1 6 1 4 7 5 ...
## $ aspro19 : int 1 4 1 1 1 3 1 5 1 5 ...
## $ aspro20 : int 4 6 5 4 1 4 1 4 7 4 ...
## $ aspro21 : int 7 6 4 5 1 5 1 5 7 6 ...
## $ aspro22 : int 1 4 1 5 1 2 1 3 1 2 ...
## $ sp11 : int 5 4 5 6 1 2 1 6 4 5 ...
## $ sp02 : int 1 3 6 6 4 2 1 4 3 1 ...
## $ sp24 : int 4 1 3 5 6 3 7 1 1 4 ...
## $ sp07 : int 2 3 3 6 4 2 1 4 1 1 ...
## [list output truncated]
SD=0 on individual scales that include inverse-coded items
# System Justification --> 2550 2695 1346 2122 587 510 2343 3027 217 2344
data_02$sj_sd <- apply(data_02[,6:13],1,sd)
data_02$ï..case[data_02$sj_sd==0]
## [1] 2550 2695 1346 2122 587 510 2343 3027 217 2344
# SDO --> 1328
data_02$sdo_sd <- apply(data_02[,14:22],1,sd)
data_02$ï..case[data_02$sdo_sd==0]
## [1] 1328
# Human dominance over nature --> 284 2550 587 510 217 2344
data_02$nd_sd <- apply(data_02[,23:32],1,sd)
data_02$ï..case[data_02$nd_sd==0]
## [1] 284 2550 587 510 217 2344
# Right-wing authoritarianism --> 2550 587 1297 510 2344
data_02$rwa_sd <- apply(data_02[,33:44],1,sd)
data_02$ï..case[data_02$rwa_sd==0]
## [1] 2550 587 1297 510 2344
# Basic psychological needs --> 2550 2344
data_02$gb_sd <- apply(data_02[,128:147],1,sd)
data_02$ï..case[data_02$gb_sd==0]
## [1] 2550 2344
# Aspirations 1 --> 892 2550 979 1973 2344
data_02$asp1_sd <- apply(data_02[,52:73],1,sd)
data_02$ï..case[data_02$asp1_sd==0]
## [1] 892 2550 979 1973 2344
# Aspirations 2 --> 639 1006 1120 217 2344
data_02$asp2_sd <- apply(data_02[,74:95],1,sd)
data_02$ï..case[data_02$asp2_sd==0]
## [1] 639 1006 1120 217 2344
Removing those cases
data_03 <- data_02[!data_02$ï..case %in% c("217","284", "510","587","639","892", "947",
"1006", "1120", "1297", "1328", "1346", "1973",
"2122", "2343", "2344","2550","2695", "3027"),]
str(data_03)
## 'data.frame': 1083 obs. of 210 variables:
## $ ï..case : int 175 183 184 188 190 195 200 214 223 229 ...
## $ SERIAL : logi NA NA NA NA NA NA ...
## $ REF : logi NA NA NA NA NA NA ...
## $ QUESTNNR : chr "base" "base" "base" "base" ...
## $ MODE : chr "interview" "interview" "interview" "interview" ...
## $ sj01 : int 5 3 4 4 1 4 3 4 4 6 ...
## $ sj02 : int 7 5 5 5 4 6 4 3 1 6 ...
## $ sj03 : int 2 5 3 4 7 5 4 6 4 1 ...
## $ sj04 : int 7 4 4 4 1 7 1 6 1 5 ...
## $ sj05 : int 5 5 5 5 1 5 1 1 1 6 ...
## $ sj06 : int 6 2 5 3 1 4 7 7 1 6 ...
## $ sj07 : int 1 4 5 4 7 5 6 7 4 3 ...
## $ sj08 : int 5 1 4 3 1 4 2 6 1 6 ...
## $ sdo01 : int 3 1 4 4 1 2 1 5 1 2 ...
## $ sdo02 : int 5 1 5 6 1 6 1 5 7 3 ...
## $ sdo03 : int 7 7 4 5 7 7 7 5 7 6 ...
## $ sdo04 : int 7 7 6 7 7 7 7 5 1 7 ...
## $ sdo05 : int 2 1 4 2 1 2 2 7 1 3 ...
## $ sdo06 : int 1 1 4 3 4 6 2 5 1 5 ...
## $ sdo07 : int 6 7 5 5 4 6 6 5 7 6 ...
## $ sdo08 : int 6 7 6 6 7 7 7 5 7 7 ...
## $ sdo09 : int 2 2 2 2 2 2 2 2 2 2 ...
## $ nd01 : int 1 3 1 4 1 1 1 1 1 4 ...
## $ nd02 : int 3 4 1 6 1 2 1 3 7 2 ...
## $ nd03 : int 7 6 7 6 7 7 7 7 7 4 ...
## $ nd04 : int 3 2 1 4 1 1 1 2 1 3 ...
## $ nd05 : int 7 7 6 6 7 7 7 6 7 7 ...
## $ nd06 : int 6 4 7 6 7 7 7 6 1 6 ...
## $ nd07 : int 7 3 1 2 1 1 1 6 1 3 ...
## $ nd08 : int 5 4 2 2 1 1 1 3 1 2 ...
## $ nd09 : int 6 5 7 4 7 7 7 7 7 6 ...
## $ nd10 : int 2 7 6 5 7 7 1 6 1 4 ...
## $ rwa01 : int 6 5 7 5 7 6 7 5 7 5 ...
## $ rwa02 : int 2 1 5 3 1 7 4 7 1 4 ...
## $ rwa03 : int 7 7 6 7 7 7 7 7 7 7 ...
## $ rwa04 : int 1 4 6 5 1 6 1 5 1 4 ...
## $ rwa05 : int 7 7 5 3 7 3 7 2 4 7 ...
## $ rwa06 : int 5 3 4 4 3 7 3 7 1 4 ...
## $ rwa07 : int 7 7 2 7 7 7 6 6 7 6 ...
## $ rwa08 : int 4 4 3 3 2 6 7 7 1 4 ...
## $ rwa09 : int 7 7 5 5 7 6 1 2 7 5 ...
## $ rwa10 : int 4 3 5 5 1 7 6 7 3 5 ...
## $ rwa11 : int 1 5 3 3 4 2 1 4 3 3 ...
## $ rwa12 : int 4 3 4 2 1 6 2 7 1 3 ...
## $ gender : int 1 1 1 1 1 1 1 1 1 1 ...
## $ age : int 59 57 57 51 59 59 59 51 59 50 ...
## $ edu : int 6 5 7 4 5 5 5 5 7 7 ...
## $ SD03_08 : logi NA NA NA NA NA NA ...
## $ income : int 4 3 8 2 5 5 3 3 1 10 ...
## $ pol.orient: int 49 11 55 18 13 10 51 56 3 61 ...
## $ SD08_01 : chr "01-apr" "01-apr" "01-apr" "01-apr" ...
## $ asimp01 : int 4 7 7 6 4 7 1 7 1 7 ...
## $ asimp02 : int 4 6 5 6 4 6 1 5 1 6 ...
## $ asimp03 : int 4 5 4 5 4 7 4 4 1 4 ...
## $ asimp04 : int 3 4 5 6 7 7 1 3 1 5 ...
## $ asimp05 : int 3 5 3 5 1 5 1 3 7 4 ...
## $ asimp06 : int 1 3 2 5 1 5 1 4 1 2 ...
## $ asimp07 : int 7 7 7 7 7 7 7 4 7 6 ...
## $ asimp08 : int 1 3 4 4 1 5 1 4 1 3 ...
## $ asimp09 : int 4 7 7 7 7 7 7 5 7 7 ...
## $ asimp10 : int 5 7 6 6 5 7 1 4 7 6 ...
## $ asimp11 : int 1 1 1 6 1 5 1 3 1 2 ...
## $ aspro01 : int 4 7 7 6 3 6 1 7 1 6 ...
## $ aspro02 : int 4 6 2 5 1 5 1 5 1 6 ...
## $ aspro03 : int 4 6 6 6 3 5 1 4 1 5 ...
## $ aspro04 : int 3 4 7 5 1 7 1 3 1 6 ...
## $ aspro05 : int 4 6 3 5 1 5 1 3 7 6 ...
## $ aspro06 : int 1 4 1 5 7 5 1 4 1 5 ...
## $ aspro07 : int 7 3 4 6 1 6 1 7 7 6 ...
## $ aspro08 : int 1 5 3 7 1 4 1 4 1 3 ...
## $ aspro09 : int 6 6 7 7 1 7 7 5 7 7 ...
## $ aspro10 : int 6 6 4 5 1 7 1 4 7 6 ...
## $ aspro11 : int 1 1 1 5 1 3 1 3 1 1 ...
## $ asimp12 : int 4 6 7 6 6 6 5 5 1 7 ...
## $ asimp13 : int 5 6 4 5 6 6 1 5 1 6 ...
## $ asimp14 : int 4 5 6 6 1 5 6 5 1 5 ...
## $ asimp15 : int 3 6 7 6 4 3 5 2 7 7 ...
## $ asimp16 : int 4 6 6 6 2 4 1 4 4 4 ...
## $ asimp17 : int 5 4 1 5 1 4 1 4 1 4 ...
## $ asimp18 : int 7 7 7 6 7 7 7 4 7 7 ...
## $ asimp19 : int 1 3 1 4 1 4 1 5 1 4 ...
## $ asimp20 : int 7 7 7 6 6 6 5 5 7 7 ...
## $ asimp21 : int 7 7 5 6 7 6 6 5 7 7 ...
## $ asimp22 : int 1 3 1 6 1 3 1 3 1 1 ...
## $ aspro12 : int 5 5 7 5 4 5 1 4 1 7 ...
## $ aspro13 : int 5 4 1 4 6 6 1 5 1 6 ...
## $ aspro14 : int 4 6 6 4 1 3 1 5 1 6 ...
## $ aspro15 : int 6 3 7 2 1 5 7 2 7 7 ...
## $ aspro16 : int 7 5 5 4 2 5 1 4 4 5 ...
## $ aspro17 : int 4 4 1 5 1 5 2 4 1 4 ...
## $ aspro18 : int 7 4 4 5 1 6 1 4 7 5 ...
## $ aspro19 : int 1 4 1 1 1 3 1 5 1 5 ...
## $ aspro20 : int 4 6 5 4 1 4 1 4 7 4 ...
## $ aspro21 : int 7 6 4 5 1 5 1 5 7 6 ...
## $ aspro22 : int 1 4 1 5 1 2 1 3 1 2 ...
## $ sp11 : int 5 4 5 6 1 2 1 6 4 5 ...
## $ sp02 : int 1 3 6 6 4 2 1 4 3 1 ...
## $ sp24 : int 4 1 3 5 6 3 7 1 1 4 ...
## $ sp07 : int 2 3 3 6 4 2 1 4 1 1 ...
## [list output truncated]
Age < 20 years & Education = “University degree”
data_03$ï..case[data_03$age<20&data_03$edu==7]
## [1] 723 869
Items nd01 and nd02 almost identical - nd01: “Menschen sind dazu bestimmt, über den Rest der Natur zu herrschen.” - nd02: “Menschen wurden dazu erschaffen oder haben sich dazu entwickelt, die übrige Natur zu beherrschen.”
data_03$nd01_02 <- data_03$nd01 - data_03$nd02
data_03$ï..case[data_03$nd01_02==-6|data_03$nd01_02==6]
## [1] 223 692 1289 1411 3583 203 2065 1122 206 1899 1922 1322 2281
Items nd06 and nd10 almost identical - nd06: “Menschen sind nicht wichtiger in der Natur als andere Lebewesen.” - nd10: “Menschen sind nicht wichtiger als irgendeine andere Spezies.”
data_03$nd06_10 <- data_03$nd06 - data_03$nd10
data_03$ï..case[data_03$nd06_10==-6|data_03$nd06_10==6]
## [1] 200 724 845 1520 310 1343 2551 1302 1775 2162 3558 1250 541 1067 1516
## [16] 1574 1885 1978 2184 2255 2398 2033 2507 2874 3001 3237 3595 1648 743 1117
## [31] 1560 189 544 627 941 967 1905 343 569 3148
Items sp28 and sp30 almost identical - sp28: “Der Klimawandel ist nicht menschengemacht.” - sp30: “Die Erderwärmung ist natürlich und ist nicht vom menschlichen Einfluss abhängig.”
data_03$sp28_30 <- data_03$sp28 - data_03$sp30
data_03$ï..case[data_03$sp28_30==-6|data_03$sp28_30==6]
## [1] 3457 419 1239 3050
Items sp02 and sp07 almost identical - sp02: “Es macht für den Klimawandel keinen Unterschied, ob ich mein Verhalten ändere oder nicht.” - sp07: “Ich kann selbst nichts gegen den Klimawandel tun.”
data_03$sp02_07 <- data_03$sp02 - data_03$sp07
data_03$ï..case[data_03$sp02_07==-6|data_03$sp02_07==6]
## [1] 1433 1961
Removing those cases
data_04 <- data_03[!data_03$ï..case %in% c("189", "200", "203","206", "223","310", "343", "419",
"541", "544", "569", "627", "692","723", "724", "743", "845", "869", "941", "967",
"1067", "1117", "1122", "1239", "1250", "1289", "1302", "1322", "1343", "1411", "1433",
"1516", "1520", "1560", "1574", "1648", "1775", "1885", "1899", "1905", "1922", "1961", "1978",
"2033", "2065", "2162", "2184", "2255", "2281", "2398",
"2507", "2551", "2874",
"3001", "3050", "3148", "3237", "3457","3558", "3583", "3595"),]
data <- data_04
str(data)
## 'data.frame': 1022 obs. of 214 variables:
## $ ï..case : int 175 183 184 188 190 195 214 229 241 246 ...
## $ SERIAL : logi NA NA NA NA NA NA ...
## $ REF : logi NA NA NA NA NA NA ...
## $ QUESTNNR : chr "base" "base" "base" "base" ...
## $ MODE : chr "interview" "interview" "interview" "interview" ...
## $ sj01 : int 5 3 4 4 1 4 4 6 5 3 ...
## $ sj02 : int 7 5 5 5 4 6 3 6 5 5 ...
## $ sj03 : int 2 5 3 4 7 5 6 1 3 4 ...
## $ sj04 : int 7 4 4 4 1 7 6 5 4 5 ...
## $ sj05 : int 5 5 5 5 1 5 1 6 5 4 ...
## $ sj06 : int 6 2 5 3 1 4 7 6 5 4 ...
## $ sj07 : int 1 4 5 4 7 5 7 3 4 4 ...
## $ sj08 : int 5 1 4 3 1 4 6 6 5 4 ...
## $ sdo01 : int 3 1 4 4 1 2 5 2 5 4 ...
## $ sdo02 : int 5 1 5 6 1 6 5 3 4 4 ...
## $ sdo03 : int 7 7 4 5 7 7 5 6 6 4 ...
## $ sdo04 : int 7 7 6 7 7 7 5 7 5 5 ...
## $ sdo05 : int 2 1 4 2 1 2 7 3 3 3 ...
## $ sdo06 : int 1 1 4 3 4 6 5 5 4 4 ...
## $ sdo07 : int 6 7 5 5 4 6 5 6 5 4 ...
## $ sdo08 : int 6 7 6 6 7 7 5 7 6 4 ...
## $ sdo09 : int 2 2 2 2 2 2 2 2 2 2 ...
## $ nd01 : int 1 3 1 4 1 1 1 4 4 3 ...
## $ nd02 : int 3 4 1 6 1 2 3 2 4 3 ...
## $ nd03 : int 7 6 7 6 7 7 7 4 6 5 ...
## $ nd04 : int 3 2 1 4 1 1 2 3 4 4 ...
## $ nd05 : int 7 7 6 6 7 7 6 7 7 5 ...
## $ nd06 : int 6 4 7 6 7 7 6 6 6 5 ...
## $ nd07 : int 7 3 1 2 1 1 6 3 3 3 ...
## $ nd08 : int 5 4 2 2 1 1 3 2 4 4 ...
## $ nd09 : int 6 5 7 4 7 7 7 6 4 5 ...
## $ nd10 : int 2 7 6 5 7 7 6 4 6 5 ...
## $ rwa01 : int 6 5 7 5 7 6 5 5 6 4 ...
## $ rwa02 : int 2 1 5 3 1 7 7 4 2 4 ...
## $ rwa03 : int 7 7 6 7 7 7 7 7 7 4 ...
## $ rwa04 : int 1 4 6 5 1 6 5 4 6 5 ...
## $ rwa05 : int 7 7 5 3 7 3 2 7 5 3 ...
## $ rwa06 : int 5 3 4 4 3 7 7 4 6 4 ...
## $ rwa07 : int 7 7 2 7 7 7 6 6 6 3 ...
## $ rwa08 : int 4 4 3 3 2 6 7 4 6 4 ...
## $ rwa09 : int 7 7 5 5 7 6 2 5 5 4 ...
## $ rwa10 : int 4 3 5 5 1 7 7 5 6 5 ...
## $ rwa11 : int 1 5 3 3 4 2 4 3 2 4 ...
## $ rwa12 : int 4 3 4 2 1 6 7 3 6 5 ...
## $ gender : int 1 1 1 1 1 1 1 1 1 1 ...
## $ age : int 59 57 57 51 59 59 51 50 50 56 ...
## $ edu : int 6 5 7 4 5 5 5 7 7 3 ...
## $ SD03_08 : logi NA NA NA NA NA NA ...
## $ income : int 4 3 8 2 5 5 3 10 7 5 ...
## $ pol.orient: int 49 11 55 18 13 10 56 61 53 55 ...
## $ SD08_01 : chr "01-apr" "01-apr" "01-apr" "01-apr" ...
## $ asimp01 : int 4 7 7 6 4 7 7 7 5 4 ...
## $ asimp02 : int 4 6 5 6 4 6 5 6 4 3 ...
## $ asimp03 : int 4 5 4 5 4 7 4 4 6 3 ...
## $ asimp04 : int 3 4 5 6 7 7 3 5 6 4 ...
## $ asimp05 : int 3 5 3 5 1 5 3 4 4 4 ...
## $ asimp06 : int 1 3 2 5 1 5 4 2 1 2 ...
## $ asimp07 : int 7 7 7 7 7 7 4 6 5 4 ...
## $ asimp08 : int 1 3 4 4 1 5 4 3 1 2 ...
## $ asimp09 : int 4 7 7 7 7 7 5 7 4 4 ...
## $ asimp10 : int 5 7 6 6 5 7 4 6 6 4 ...
## $ asimp11 : int 1 1 1 6 1 5 3 2 1 3 ...
## $ aspro01 : int 4 7 7 6 3 6 7 6 4 4 ...
## $ aspro02 : int 4 6 2 5 1 5 5 6 4 4 ...
## $ aspro03 : int 4 6 6 6 3 5 4 5 6 4 ...
## $ aspro04 : int 3 4 7 5 1 7 3 6 6 4 ...
## $ aspro05 : int 4 6 3 5 1 5 3 6 4 4 ...
## $ aspro06 : int 1 4 1 5 7 5 4 5 1 4 ...
## $ aspro07 : int 7 3 4 6 1 6 7 6 6 4 ...
## $ aspro08 : int 1 5 3 7 1 4 4 3 3 4 ...
## $ aspro09 : int 6 6 7 7 1 7 5 7 4 4 ...
## $ aspro10 : int 6 6 4 5 1 7 4 6 6 4 ...
## $ aspro11 : int 1 1 1 5 1 3 3 1 1 4 ...
## $ asimp12 : int 4 6 7 6 6 6 5 7 5 4 ...
## $ asimp13 : int 5 6 4 5 6 6 5 6 5 3 ...
## $ asimp14 : int 4 5 6 6 1 5 5 5 4 4 ...
## $ asimp15 : int 3 6 7 6 4 3 2 7 4 3 ...
## $ asimp16 : int 4 6 6 6 2 4 4 4 4 2 ...
## $ asimp17 : int 5 4 1 5 1 4 4 4 1 2 ...
## $ asimp18 : int 7 7 7 6 7 7 4 7 5 3 ...
## $ asimp19 : int 1 3 1 4 1 4 5 4 3 3 ...
## $ asimp20 : int 7 7 7 6 6 6 5 7 5 4 ...
## $ asimp21 : int 7 7 5 6 7 6 5 7 5 3 ...
## $ asimp22 : int 1 3 1 6 1 3 3 1 1 3 ...
## $ aspro12 : int 5 5 7 5 4 5 4 7 5 4 ...
## $ aspro13 : int 5 4 1 4 6 6 5 6 5 4 ...
## $ aspro14 : int 4 6 6 4 1 3 5 6 4 4 ...
## $ aspro15 : int 6 3 7 2 1 5 2 7 5 3 ...
## $ aspro16 : int 7 5 5 4 2 5 4 5 3 4 ...
## $ aspro17 : int 4 4 1 5 1 5 4 4 1 4 ...
## $ aspro18 : int 7 4 4 5 1 6 4 5 5 4 ...
## $ aspro19 : int 1 4 1 1 1 3 5 5 3 4 ...
## $ aspro20 : int 4 6 5 4 1 4 4 4 5 4 ...
## $ aspro21 : int 7 6 4 5 1 5 5 6 5 4 ...
## $ aspro22 : int 1 4 1 5 1 2 3 2 1 4 ...
## $ sp11 : int 5 4 5 6 1 2 6 5 4 4 ...
## $ sp02 : int 1 3 6 6 4 2 4 1 2 4 ...
## $ sp24 : int 4 1 3 5 6 3 1 4 4 3 ...
## $ sp07 : int 2 3 3 6 4 2 4 1 3 5 ...
## [list output truncated]
#recode items
data$sp23.i <- recode (data$sp23, '1=7; 2=6; 3=5; 5=3; 6=2; 7=1')
data$sp24.i <- recode (data$sp24, '1=7; 2=6; 3=5; 5=3; 6=2; 7=1')
#self-protection overall
data$sp <- rowMeans (data [c("sp01", "sp02", "sp03", "sp04", "sp05", "sp06", "sp07",
"sp08", "sp09", "sp10", "sp11", "sp12", "sp13", "sp14", "sp15",
"sp19", "sp20", "sp21", "sp22",
"sp16", "sp17", "sp18",
"sp23.i", "sp24.i", "sp25", "sp26",
"sp27", "sp28", "sp29", "sp30")])
#rationalization
data$sp.1 <- rowMeans (data [c("sp01", "sp02", "sp03", "sp04", "sp05", "sp06", "sp07")])
#avoidance
data$sp.2 <- rowMeans (data [c("sp08", "sp09", "sp10", "sp11", "sp12", "sp13", "sp14", "sp15")])
#denial of personal outcome severity
data$sp.3 <- rowMeans (data [c("sp19", "sp20", "sp21", "sp22")])
#denial of global outcome severity
data$sp.4 <- rowMeans (data [c("sp16", "sp17", "sp18")])
#denial of guilt
data$sp.5 <- rowMeans (data [c("sp23.i", "sp24.i", "sp25", "sp26")])
#literal denial
data$sp.6 <- rowMeans (data [c("sp27", "sp28", "sp29", "sp30")])
#recode items
data$gb11.i <- recode (data$gb11, '1=7; 2=6; 3=5; 5=3; 6=2; 7=1')
data$gb13.i <- recode (data$gb13, '1=7; 2=6; 3=5; 5=3; 6=2; 7=1')
data$gb10.i <- recode (data$gb10, '1=7; 2=6; 3=5; 5=3; 6=2; 7=1')
data$gb12.i <- recode (data$gb12, '1=7; 2=6; 3=5; 5=3; 6=2; 7=1')
data$gb05.i <- recode (data$gb05, '1=7; 2=6; 3=5; 5=3; 6=2; 7=1')
data$gb04.i <- recode (data$gb04, '1=7; 2=6; 3=5; 5=3; 6=2; 7=1')
data$gb06.i <- recode (data$gb06, '1=7; 2=6; 3=5; 5=3; 6=2; 7=1')
data$gb17.i <- recode (data$gb17, '1=7; 2=6; 3=5; 5=3; 6=2; 7=1')
data$gb19.i <- recode (data$gb19, '1=7; 2=6; 3=5; 5=3; 6=2; 7=1')
data$gb18.i <- recode (data$gb18, '1=7; 2=6; 3=5; 5=3; 6=2; 7=1')
#overall basic needs
data$gb <- rowMeans (data [c("gb07", "gb09", "gb08",
"gb01", "gb03", "gb02",
"gb15", "gb14", "gb16",
"gb11.i", "gb13.i", "gb12.i",
"gb05.i", "gb04.i", "gb06.i",
"gb17.i", "gb19.i","gb18.i")])
#relatedness satisfaction
data$gb.rs <- rowMeans (data [c("gb07", "gb09", "gb08")])
#relatedness frustration
data$gb.rf <- rowMeans (data [c("gb11", "gb13", "gb12")])
#autonomy satisfaction
data$gb.as <- rowMeans (data [c("gb01", "gb03", "gb02")])
#autonomy frustration
data$gb.af <- rowMeans (data [c("gb05", "gb04", "gb06")])
#competence satisfaction
data$gb.cs <- rowMeans (data [c("gb15", "gb14", "gb16")])
#competence frustration
data$gb.cf <- rowMeans (data [c("gb17", "gb19","gb18")])
#recoding items so that scale range: 0-4
data$asimp01.i <- recode (data$asimp01, '1=0; 2=1; 3=2; 4=3; 5=4; 6=5; 7=6')
data$asimp02.i <- recode (data$asimp02, '1=0; 2=1; 3=2; 4=3; 5=4; 6=5; 7=6')
data$asimp03.i <- recode (data$asimp03, '1=0; 2=1; 3=2; 4=3; 5=4; 6=5; 7=6')
data$asimp04.i <- recode (data$asimp04, '1=0; 2=1; 3=2; 4=3; 5=4; 6=5; 7=6')
data$asimp05.i <- recode (data$asimp05, '1=0; 2=1; 3=2; 4=3; 5=4; 6=5; 7=6')
data$asimp06.i <- recode (data$asimp06, '1=0; 2=1; 3=2; 4=3; 5=4; 6=5; 7=6')
data$asimp07.i <- recode (data$asimp07, '1=0; 2=1; 3=2; 4=3; 5=4; 6=5; 7=6')
data$asimp08.i <- recode (data$asimp08, '1=0; 2=1; 3=2; 4=3; 5=4; 6=5; 7=6')
data$asimp09.i <- recode (data$asimp09, '1=0; 2=1; 3=2; 4=3; 5=4; 6=5; 7=6')
data$asimp10.i <- recode (data$asimp10, '1=0; 2=1; 3=2; 4=3; 5=4; 6=5; 7=6')
data$asimp11.i <- recode (data$asimp11, '1=0; 2=1; 3=2; 4=3; 5=4; 6=5; 7=6')
data$asimp12.i <- recode (data$asimp12, '1=0; 2=1; 3=2; 4=3; 5=4; 6=5; 7=6')
data$asimp13.i <- recode (data$asimp13, '1=0; 2=1; 3=2; 4=3; 5=4; 6=5; 7=6')
data$asimp14.i <- recode (data$asimp14, '1=0; 2=1; 3=2; 4=3; 5=4; 6=5; 7=6')
data$asimp15.i <- recode (data$asimp15, '1=0; 2=1; 3=2; 4=3; 5=4; 6=5; 7=6')
data$asimp16.i <- recode (data$asimp16, '1=0; 2=1; 3=2; 4=3; 5=4; 6=5; 7=6')
data$asimp17.i <- recode (data$asimp17, '1=0; 2=1; 3=2; 4=3; 5=4; 6=5; 7=6')
data$asimp18.i <- recode (data$asimp18, '1=0; 2=1; 3=2; 4=3; 5=4; 6=5; 7=6')
data$asimp19.i <- recode (data$asimp19, '1=0; 2=1; 3=2; 4=3; 5=4; 6=5; 7=6')
data$asimp20.i <- recode (data$asimp20, '1=0; 2=1; 3=2; 4=3; 5=4; 6=5; 7=6')
data$asimp21.i <- recode (data$asimp21, '1=0; 2=1; 3=2; 4=3; 5=4; 6=5; 7=6')
data$asimp22.i <- recode (data$asimp22, '1=0; 2=1; 3=2; 4=3; 5=4; 6=5; 7=6')
data$aspro01.i <- recode (data$aspro01, '1=0; 2=1; 3=2; 4=3; 5=4; 6=5; 7=6')
data$aspro02.i <- recode (data$aspro02, '1=0; 2=1; 3=2; 4=3; 5=4; 6=5; 7=6')
data$aspro03.i <- recode (data$aspro03, '1=0; 2=1; 3=2; 4=3; 5=4; 6=5; 7=6')
data$aspro04.i <- recode (data$aspro04, '1=0; 2=1; 3=2; 4=3; 5=4; 6=5; 7=6')
data$aspro05.i <- recode (data$aspro05, '1=0; 2=1; 3=2; 4=3; 5=4; 6=5; 7=6')
data$aspro06.i <- recode (data$aspro06, '1=0; 2=1; 3=2; 4=3; 5=4; 6=5; 7=6')
data$aspro07.i <- recode (data$aspro07, '1=0; 2=1; 3=2; 4=3; 5=4; 6=5; 7=6')
data$aspro08.i <- recode (data$aspro08, '1=0; 2=1; 3=2; 4=3; 5=4; 6=5; 7=6')
data$aspro09.i <- recode (data$aspro09, '1=0; 2=1; 3=2; 4=3; 5=4; 6=5; 7=6')
data$aspro10.i <- recode (data$aspro10, '1=0; 2=1; 3=2; 4=3; 5=4; 6=5; 7=6')
data$aspro11.i <- recode (data$aspro11, '1=0; 2=1; 3=2; 4=3; 5=4; 6=5; 7=6')
data$aspro12.i <- recode (data$aspro12, '1=0; 2=1; 3=2; 4=3; 5=4; 6=5; 7=6')
data$aspro13.i <- recode (data$aspro13, '1=0; 2=1; 3=2; 4=3; 5=4; 6=5; 7=6')
data$aspro14.i <- recode (data$aspro14, '1=0; 2=1; 3=2; 4=3; 5=4; 6=5; 7=6')
data$aspro15.i <- recode (data$aspro15, '1=0; 2=1; 3=2; 4=3; 5=4; 6=5; 7=6')
data$aspro16.i <- recode (data$aspro16, '1=0; 2=1; 3=2; 4=3; 5=4; 6=5; 7=6')
data$aspro17.i <- recode (data$aspro17, '1=0; 2=1; 3=2; 4=3; 5=4; 6=5; 7=6')
data$aspro18.i <- recode (data$aspro18, '1=0; 2=1; 3=2; 4=3; 5=4; 6=5; 7=6')
data$aspro19.i <- recode (data$aspro19, '1=0; 2=1; 3=2; 4=3; 5=4; 6=5; 7=6')
data$aspro20.i <- recode (data$aspro20, '1=0; 2=1; 3=2; 4=3; 5=4; 6=5; 7=6')
data$aspro21.i <- recode (data$aspro21, '1=0; 2=1; 3=2; 4=3; 5=4; 6=5; 7=6')
data$aspro22.i <- recode (data$aspro22, '1=0; 2=1; 3=2; 4=3; 5=4; 6=5; 7=6')
#Affiliation
data$asimp.af <- rowMeans (data [c("asimp01.i", "asimp12.i")])
data$aspro.af <- rowMeans (data [c("aspro01.i", "aspro12.i")])
#Community Feeling
data$asimp.cf <- rowMeans (data [c("asimp02.i", "asimp13.i")])
data$aspro.cf <- rowMeans (data [c("aspro02.i", "aspro13.i")])
#Self-Acceptance
data$asimp.sa <- rowMeans (data [c("asimp10.i", "asimp21.i")])
data$aspro.sa <- rowMeans (data [c("aspro10.i", "aspro21.i")])
#Physical Health
data$asimp.ph <- rowMeans (data [c("asimp07.i", "asimp18.i")])
data$aspro.ph <- rowMeans (data [c("aspro07.i", "aspro18.i")])
#Safety
data$asimp.sf <- rowMeans (data [c("asimp09.i", "asimp20.i")])
data$aspro.sf <- rowMeans (data [c("aspro09.i", "aspro20.i")])
#Financial Success
data$asimp.fs <- rowMeans (data [c("asimp04.i", "asimp15.i")])
data$aspro.fs <- rowMeans (data [c("aspro04.i", "aspro15.i")])
#Image
data$asimp.im <- rowMeans (data [c("asimp06.i", "asimp17.i")])
data$aspro.im <- rowMeans (data [c("aspro06.i", "aspro17.i")])
#Popularity
data$asimp.po <- rowMeans (data [c("asimp08.i", "asimp19.i")])
data$aspro.po <- rowMeans (data [c("aspro08.i", "aspro19.i")])
#Conformity
data$asimp.co <- rowMeans (data [c("asimp03.i", "asimp14.i")])
data$aspro.co <- rowMeans (data [c("aspro03.i", "aspro14.i")])
#Hedonism
data$asimp.he <- rowMeans (data [c("asimp05.i", "asimp16.i")])
data$aspro.he <- rowMeans (data [c("aspro05.i", "aspro16.i")])
#Spirituality
data$asimp.sp <- rowMeans (data [c("asimp11.i", "asimp22.i")])
data$aspro.sp <- rowMeans (data [c("aspro11.i", "aspro22.i")])
#Aspirations importance
data$asimp.all <- ((data$asimp.fs + data$asimp.im + data$asimp.po + data$asimp.co)/4) -
((data$asimp.af + data$asimp.cf + data$asimp.sa + data$asimp.ph + data$asimp.sf)/5)
#Aspirations likelihood
data$aspro.all <- ((data$aspro.fs + data$aspro.im + data$aspro.po + data$aspro.co)/4) -
((data$aspro.af + data$aspro.cf + data$aspro.sa + data$aspro.ph + data$aspro.sf)/5)
#recode items
data$sj03.i <- recode (data$sj03, '1=7; 2=6; 3=5; 5=3; 6=2; 7=1')
data$sj07.i <- recode (data$sj07, '1=7; 2=6; 3=5; 5=3; 6=2; 7=1')
data$sj <- rowMeans (data [c("sj01", "sj02", "sj03.i", "sj04",
"sj05", "sj06", "sj07.i", "sj08")])
#recode items
data$nd03.i <- recode (data$nd03, '1=7; 2=6; 3=5; 5=3; 6=2; 7=1')
data$nd05.i <- recode (data$nd05, '1=7; 2=6; 3=5; 5=3; 6=2; 7=1')
data$nd06.i <- recode (data$nd06, '1=7; 2=6; 3=5; 5=3; 6=2; 7=1')
data$nd09.i <- recode (data$nd09, '1=7; 2=6; 3=5; 5=3; 6=2; 7=1')
data$nd10.i <- recode (data$nd10, '1=7; 2=6; 3=5; 5=3; 6=2; 7=1')
data$nd <- rowMeans (data [c("nd01", "nd02", "nd03.i", "nd04", "nd05.i",
"nd06.i", "nd07", "nd08", "nd09.i", "nd10.i")])
data$cas <- rowMeans (data [c("cas01", "cas02", "cas03", "cas04",
"cas05", "cas07", "cas08",
"cas09", "cas10", "cas11", "cas12", "cas13")])
data$phq <- rowMeans (data [c("phq01", "phq02", "phq03", "phq04")])
#depressiveness
data$phq.d <- rowMeans (data [c("phq01", "phq02")])
#anxiety
data$phq.a <- rowMeans (data [c("phq03", "phq04")])
#define missings
is.na(data$ps01) <- which(data$ps01== -9)
is.na(data$ps02) <- which(data$ps02== -9)
data$ps <- rowMeans (data [c("ps01", "ps02")])
data$int <- rowMeans (data [c("int01", "int02", "int03")])
#create dummy variable
data$gender.d <- recode (data$gender, '1=0; 2=1')
Transformed variables that should be used are: sp.3.tt, sp.4.tt, sp.5.t, sp.6.tt, cas.tt, phq.tt ## Self-protection/denial {.tabset} ### Square-root transformations
data$sp.5.t = sqrt(data$sp.5)
data$sp.3.tt = log(data$sp.3)
data$sp.4.tt = log(data$sp.4)
data$sp.6.tt = log(data$sp.6)
data$cas.tt = log(data$cas)
data$phq.tt = log(data$phq)
N = 11 multivariate outliers
reg=lm(formula =data$ï..case~ data$sp.1 + data$sp.2 + data$sp.3.tt + data$sp.4.tt + data$sp.5.t + data$sp.6 +
data$gb.rs + data$gb.as + data$gb.cs + data$gb.rf + data$gb.af + data$gb.cf +
data$asimp.all + data$aspro.all +
data$sj + data$sdo + data$nd + data$rwa +
data$cas.tt + data$phq.tt +
data$ps + data$int, data=data)
summary(reg)
##
## Call:
## lm(formula = data$ï..case ~ data$sp.1 + data$sp.2 + data$sp.3.tt +
## data$sp.4.tt + data$sp.5.t + data$sp.6 + data$gb.rs + data$gb.as +
## data$gb.cs + data$gb.rf + data$gb.af + data$gb.cf + data$asimp.all +
## data$aspro.all + data$sj + data$sdo + data$nd + data$rwa +
## data$cas.tt + data$phq.tt + data$ps + data$int, data = data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1738.2 -772.8 -187.1 744.2 2451.7
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1621.7654 456.5452 3.552 0.00040 ***
## data$sp.1 -69.9444 34.4717 -2.029 0.04273 *
## data$sp.2 -17.2277 32.8394 -0.525 0.59998
## data$sp.3.tt 55.9707 91.6440 0.611 0.54152
## data$sp.4.tt -77.7013 106.6600 -0.728 0.46649
## data$sp.5.t -29.8445 126.9663 -0.235 0.81421
## data$sp.6 119.3962 38.4108 3.108 0.00194 **
## data$gb.rs 24.5851 31.7515 0.774 0.43894
## data$gb.as -60.7171 35.9801 -1.688 0.09183 .
## data$gb.cs 66.9978 27.4724 2.439 0.01492 *
## data$gb.rf 21.7420 32.0942 0.677 0.49829
## data$gb.af -47.7617 33.0558 -1.445 0.14882
## data$gb.cf -0.1268 33.8700 -0.004 0.99701
## data$asimp.all 113.6478 37.3799 3.040 0.00243 **
## data$aspro.all -62.1479 41.0243 -1.515 0.13012
## data$sj 20.7189 31.3356 0.661 0.50865
## data$sdo 66.4565 36.4446 1.823 0.06854 .
## data$nd -12.4830 31.9096 -0.391 0.69574
## data$rwa -80.7331 37.5912 -2.148 0.03199 *
## data$cas.tt -190.2703 93.2388 -2.041 0.04156 *
## data$phq.tt 297.3827 107.3122 2.771 0.00569 **
## data$ps 1.4832 1.9421 0.764 0.44521
## data$int 6.8007 33.2287 0.205 0.83788
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 950.2 on 961 degrees of freedom
## (38 observations deleted due to missingness)
## Multiple R-squared: 0.04798, Adjusted R-squared: 0.02619
## F-statistic: 2.202 on 22 and 961 DF, p-value: 0.001174
#inspect leverages to detect multivariate outliers#
lev =hat(model.matrix(reg))
plot(lev)
#calculate mahalanobis distance and identify top 5 cases#
N= nrow(data)
mahad=(N-1)*(lev-1 / N)
tail(sort(mahad),5)
## [1] 66.15334 68.63428 69.51901 70.01597 72.08186
order(mahad,decreasing=T)[c(5,4,3,2,1)]
## [1] 780 345 147 393 447
#calculate probability that case is outlier#
P_mahad = 1 - pchisq(mahad, df=27)
#compute outlier variable#
data$outlier <- 0
data$outlier[P_mahad < .001] <- 1
#sort cases to see outliers#
order(data$outlier,decreasing=T)
## [1] 51 123 147 192 345 393 447 539 586 735 780 1 2 3
## [15] 4 5 6 7 8 9 10 11 12 13 14 15 16 17
## [29] 18 19 20 21 22 23 24 25 26 27 28 29 30 31
## [43] 32 33 34 35 36 37 38 39 40 41 42 43 44 45
## [57] 46 47 48 49 50 52 53 54 55 56 57 58 59 60
## [71] 61 62 63 64 65 66 67 68 69 70 71 72 73 74
## [85] 75 76 77 78 79 80 81 82 83 84 85 86 87 88
## [99] 89 90 91 92 93 94 95 96 97 98 99 100 101 102
## [113] 103 104 105 106 107 108 109 110 111 112 113 114 115 116
## [127] 117 118 119 120 121 122 124 125 126 127 128 129 130 131
## [141] 132 133 134 135 136 137 138 139 140 141 142 143 144 145
## [155] 146 148 149 150 151 152 153 154 155 156 157 158 159 160
## [169] 161 162 163 164 165 166 167 168 169 170 171 172 173 174
## [183] 175 176 177 178 179 180 181 182 183 184 185 186 187 188
## [197] 189 190 191 193 194 195 196 197 198 199 200 201 202 203
## [211] 204 205 206 207 208 209 210 211 212 213 214 215 216 217
## [225] 218 219 220 221 222 223 224 225 226 227 228 229 230 231
## [239] 232 233 234 235 236 237 238 239 240 241 242 243 244 245
## [253] 246 247 248 249 250 251 252 253 254 255 256 257 258 259
## [267] 260 261 262 263 264 265 266 267 268 269 270 271 272 273
## [281] 274 275 276 277 278 279 280 281 282 283 284 285 286 287
## [295] 288 289 290 291 292 293 294 295 296 297 298 299 300 301
## [309] 302 303 304 305 306 307 308 309 310 311 312 313 314 315
## [323] 316 317 318 319 320 321 322 323 324 325 326 327 328 329
## [337] 330 331 332 333 334 335 336 337 338 339 340 341 342 343
## [351] 344 346 347 348 349 350 351 352 353 354 355 356 357 358
## [365] 359 360 361 362 363 364 365 366 367 368 369 370 371 372
## [379] 373 374 375 376 377 378 379 380 381 382 383 384 385 386
## [393] 387 388 389 390 391 392 394 395 396 397 398 399 400 401
## [407] 402 403 404 405 406 407 408 409 410 411 412 413 414 415
## [421] 416 417 418 419 420 421 422 423 424 425 426 427 428 429
## [435] 430 431 432 433 434 435 436 437 438 439 440 441 442 443
## [449] 444 445 446 448 449 450 451 452 453 454 455 456 457 458
## [463] 459 460 461 462 463 464 465 466 467 468 469 470 471 472
## [477] 473 474 475 476 477 478 479 480 481 482 483 484 485 486
## [491] 487 488 489 490 491 492 493 494 495 496 497 498 499 500
## [505] 501 502 503 504 505 506 507 508 509 510 511 512 513 514
## [519] 515 516 517 518 519 520 521 522 523 524 525 526 527 528
## [533] 529 530 531 532 533 534 535 536 537 538 540 541 542 543
## [547] 544 545 546 547 548 549 550 551 552 553 554 555 556 557
## [561] 558 559 560 561 562 563 564 565 566 567 568 569 570 571
## [575] 572 573 574 575 576 577 578 579 580 581 582 583 584 585
## [589] 587 588 589 590 591 592 593 594 595 596 597 598 599 600
## [603] 601 602 603 604 605 606 607 608 609 610 611 612 613 614
## [617] 615 616 617 618 619 620 621 622 623 624 625 626 627 628
## [631] 629 630 631 632 633 634 635 636 637 638 639 640 641 642
## [645] 643 644 645 646 647 648 649 650 651 652 653 654 655 656
## [659] 657 658 659 660 661 662 663 664 665 666 667 668 669 670
## [673] 671 672 673 674 675 676 677 678 679 680 681 682 683 684
## [687] 685 686 687 688 689 690 691 692 693 694 695 696 697 698
## [701] 699 700 701 702 703 704 705 706 707 708 709 710 711 712
## [715] 713 714 715 716 717 718 719 720 721 722 723 724 725 726
## [729] 727 728 729 730 731 732 733 734 736 737 738 739 740 741
## [743] 742 743 744 745 746 747 748 749 750 751 752 753 754 755
## [757] 756 757 758 759 760 761 762 763 764 765 766 767 768 769
## [771] 770 771 772 773 774 775 776 777 778 779 781 782 783 784
## [785] 785 786 787 788 789 790 791 792 793 794 795 796 797 798
## [799] 799 800 801 802 803 804 805 806 807 808 809 810 811 812
## [813] 813 814 815 816 817 818 819 820 821 822 823 824 825 826
## [827] 827 828 829 830 831 832 833 834 835 836 837 838 839 840
## [841] 841 842 843 844 845 846 847 848 849 850 851 852 853 854
## [855] 855 856 857 858 859 860 861 862 863 864 865 866 867 868
## [869] 869 870 871 872 873 874 875 876 877 878 879 880 881 882
## [883] 883 884 885 886 887 888 889 890 891 892 893 894 895 896
## [897] 897 898 899 900 901 902 903 904 905 906 907 908 909 910
## [911] 911 912 913 914 915 916 917 918 919 920 921 922 923 924
## [925] 925 926 927 928 929 930 931 932 933 934 935 936 937 938
## [939] 939 940 941 942 943 944 945 946 947 948 949 950 951 952
## [953] 953 954 955 956 957 958 959 960 961 962 963 964 965 966
## [967] 967 968 969 970 971 972 973 974 975 976 977 978 979 980
## [981] 981 982 983 984 985 986 987 988 989 990 991 992 993 994
## [995] 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008
## [1009] 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022
Removing multivariate outliers
data_05 <- data[!(data$outlier==1),]
data <- data_05
str(data)
## 'data.frame': 1011 obs. of 343 variables:
## $ ï..case : int 175 183 184 188 190 195 214 229 241 246 ...
## $ SERIAL : logi NA NA NA NA NA NA ...
## $ REF : logi NA NA NA NA NA NA ...
## $ QUESTNNR : chr "base" "base" "base" "base" ...
## $ MODE : chr "interview" "interview" "interview" "interview" ...
## $ sj01 : int 5 3 4 4 1 4 4 6 5 3 ...
## $ sj02 : int 7 5 5 5 4 6 3 6 5 5 ...
## $ sj03 : int 2 5 3 4 7 5 6 1 3 4 ...
## $ sj04 : int 7 4 4 4 1 7 6 5 4 5 ...
## $ sj05 : int 5 5 5 5 1 5 1 6 5 4 ...
## $ sj06 : int 6 2 5 3 1 4 7 6 5 4 ...
## $ sj07 : int 1 4 5 4 7 5 7 3 4 4 ...
## $ sj08 : int 5 1 4 3 1 4 6 6 5 4 ...
## $ sdo01 : int 3 1 4 4 1 2 5 2 5 4 ...
## $ sdo02 : int 5 1 5 6 1 6 5 3 4 4 ...
## $ sdo03 : int 7 7 4 5 7 7 5 6 6 4 ...
## $ sdo04 : int 7 7 6 7 7 7 5 7 5 5 ...
## $ sdo05 : int 2 1 4 2 1 2 7 3 3 3 ...
## $ sdo06 : int 1 1 4 3 4 6 5 5 4 4 ...
## $ sdo07 : int 6 7 5 5 4 6 5 6 5 4 ...
## $ sdo08 : int 6 7 6 6 7 7 5 7 6 4 ...
## $ sdo09 : int 2 2 2 2 2 2 2 2 2 2 ...
## $ nd01 : int 1 3 1 4 1 1 1 4 4 3 ...
## $ nd02 : int 3 4 1 6 1 2 3 2 4 3 ...
## $ nd03 : int 7 6 7 6 7 7 7 4 6 5 ...
## $ nd04 : int 3 2 1 4 1 1 2 3 4 4 ...
## $ nd05 : int 7 7 6 6 7 7 6 7 7 5 ...
## $ nd06 : int 6 4 7 6 7 7 6 6 6 5 ...
## $ nd07 : int 7 3 1 2 1 1 6 3 3 3 ...
## $ nd08 : int 5 4 2 2 1 1 3 2 4 4 ...
## $ nd09 : int 6 5 7 4 7 7 7 6 4 5 ...
## $ nd10 : int 2 7 6 5 7 7 6 4 6 5 ...
## $ rwa01 : int 6 5 7 5 7 6 5 5 6 4 ...
## $ rwa02 : int 2 1 5 3 1 7 7 4 2 4 ...
## $ rwa03 : int 7 7 6 7 7 7 7 7 7 4 ...
## $ rwa04 : int 1 4 6 5 1 6 5 4 6 5 ...
## $ rwa05 : int 7 7 5 3 7 3 2 7 5 3 ...
## $ rwa06 : int 5 3 4 4 3 7 7 4 6 4 ...
## $ rwa07 : int 7 7 2 7 7 7 6 6 6 3 ...
## $ rwa08 : int 4 4 3 3 2 6 7 4 6 4 ...
## $ rwa09 : int 7 7 5 5 7 6 2 5 5 4 ...
## $ rwa10 : int 4 3 5 5 1 7 7 5 6 5 ...
## $ rwa11 : int 1 5 3 3 4 2 4 3 2 4 ...
## $ rwa12 : int 4 3 4 2 1 6 7 3 6 5 ...
## $ gender : int 1 1 1 1 1 1 1 1 1 1 ...
## $ age : int 59 57 57 51 59 59 51 50 50 56 ...
## $ edu : int 6 5 7 4 5 5 5 7 7 3 ...
## $ SD03_08 : logi NA NA NA NA NA NA ...
## $ income : int 4 3 8 2 5 5 3 10 7 5 ...
## $ pol.orient: int 49 11 55 18 13 10 56 61 53 55 ...
## $ SD08_01 : chr "01-apr" "01-apr" "01-apr" "01-apr" ...
## $ asimp01 : int 4 7 7 6 4 7 7 7 5 4 ...
## $ asimp02 : int 4 6 5 6 4 6 5 6 4 3 ...
## $ asimp03 : int 4 5 4 5 4 7 4 4 6 3 ...
## $ asimp04 : int 3 4 5 6 7 7 3 5 6 4 ...
## $ asimp05 : int 3 5 3 5 1 5 3 4 4 4 ...
## $ asimp06 : int 1 3 2 5 1 5 4 2 1 2 ...
## $ asimp07 : int 7 7 7 7 7 7 4 6 5 4 ...
## $ asimp08 : int 1 3 4 4 1 5 4 3 1 2 ...
## $ asimp09 : int 4 7 7 7 7 7 5 7 4 4 ...
## $ asimp10 : int 5 7 6 6 5 7 4 6 6 4 ...
## $ asimp11 : int 1 1 1 6 1 5 3 2 1 3 ...
## $ aspro01 : int 4 7 7 6 3 6 7 6 4 4 ...
## $ aspro02 : int 4 6 2 5 1 5 5 6 4 4 ...
## $ aspro03 : int 4 6 6 6 3 5 4 5 6 4 ...
## $ aspro04 : int 3 4 7 5 1 7 3 6 6 4 ...
## $ aspro05 : int 4 6 3 5 1 5 3 6 4 4 ...
## $ aspro06 : int 1 4 1 5 7 5 4 5 1 4 ...
## $ aspro07 : int 7 3 4 6 1 6 7 6 6 4 ...
## $ aspro08 : int 1 5 3 7 1 4 4 3 3 4 ...
## $ aspro09 : int 6 6 7 7 1 7 5 7 4 4 ...
## $ aspro10 : int 6 6 4 5 1 7 4 6 6 4 ...
## $ aspro11 : int 1 1 1 5 1 3 3 1 1 4 ...
## $ asimp12 : int 4 6 7 6 6 6 5 7 5 4 ...
## $ asimp13 : int 5 6 4 5 6 6 5 6 5 3 ...
## $ asimp14 : int 4 5 6 6 1 5 5 5 4 4 ...
## $ asimp15 : int 3 6 7 6 4 3 2 7 4 3 ...
## $ asimp16 : int 4 6 6 6 2 4 4 4 4 2 ...
## $ asimp17 : int 5 4 1 5 1 4 4 4 1 2 ...
## $ asimp18 : int 7 7 7 6 7 7 4 7 5 3 ...
## $ asimp19 : int 1 3 1 4 1 4 5 4 3 3 ...
## $ asimp20 : int 7 7 7 6 6 6 5 7 5 4 ...
## $ asimp21 : int 7 7 5 6 7 6 5 7 5 3 ...
## $ asimp22 : int 1 3 1 6 1 3 3 1 1 3 ...
## $ aspro12 : int 5 5 7 5 4 5 4 7 5 4 ...
## $ aspro13 : int 5 4 1 4 6 6 5 6 5 4 ...
## $ aspro14 : int 4 6 6 4 1 3 5 6 4 4 ...
## $ aspro15 : int 6 3 7 2 1 5 2 7 5 3 ...
## $ aspro16 : int 7 5 5 4 2 5 4 5 3 4 ...
## $ aspro17 : int 4 4 1 5 1 5 4 4 1 4 ...
## $ aspro18 : int 7 4 4 5 1 6 4 5 5 4 ...
## $ aspro19 : int 1 4 1 1 1 3 5 5 3 4 ...
## $ aspro20 : int 4 6 5 4 1 4 4 4 5 4 ...
## $ aspro21 : int 7 6 4 5 1 5 5 6 5 4 ...
## $ aspro22 : int 1 4 1 5 1 2 3 2 1 4 ...
## $ sp11 : int 5 4 5 6 1 2 6 5 4 4 ...
## $ sp02 : int 1 3 6 6 4 2 4 1 2 4 ...
## $ sp24 : int 4 1 3 5 6 3 1 4 4 3 ...
## $ sp07 : int 2 3 3 6 4 2 4 1 3 5 ...
## [list output truncated]
Average time [minutes] to answer the questionnaire
mean(data$TIME_SUM)/60
## [1] 19.9286
sd(data$TIME_SUM)/60
## [1] 7.223431
median(data$TIME_SUM)/60
## [1] 18.7
min(data$TIME_SUM)/60
## [1] 7.966667
max(data$TIME_SUM)/60
## [1] 54.63333
subset.sp <- subset (data, select = c(sp, sp.1, sp.2, sp.3, sp.4, sp.5, sp.6))
describe (subset.sp)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## sp 1 1011 2.97 1.06 2.83 2.91 1.09 1 6.40 5.40 0.55 -0.17 0.03
## sp.1 2 1011 3.18 1.46 3.00 3.08 1.48 1 7.00 6.00 0.54 -0.20 0.05
## sp.2 3 1011 3.04 1.18 3.12 3.03 1.30 1 6.75 5.75 0.09 -0.57 0.04
## sp.3 4 1011 2.35 1.21 2.00 2.22 1.48 1 7.00 6.00 0.85 0.29 0.04
## sp.4 5 1011 2.58 1.59 2.00 2.35 1.48 1 7.00 6.00 1.00 0.22 0.05
## sp.5 6 1011 3.92 1.39 3.75 3.85 1.48 1 7.00 6.00 0.38 -0.46 0.04
## sp.6 7 1011 2.45 1.55 2.00 2.20 1.48 1 7.00 6.00 1.14 0.61 0.05
par(mfrow = c(1, 2)) # Split the plotting panel into a 1 x 2 grid
plotNormalHistogram(data$sp)
qqnorm(data$sp,
ylab="Sample Quantiles for sp")
qqline(data$sp,
col="red")
describe(data$sp)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1011 2.97 1.06 2.83 2.91 1.09 1 6.4 5.4 0.55 -0.17 0.03
shapiro.test (data$sp)
##
## Shapiro-Wilk normality test
##
## data: data$sp
## W = 0.97276, p-value = 7.737e-13
par(mfrow = c(1, 1)) # Return plotting panel to 1 section
par(mfrow = c(1, 2)) # Split the plotting panel into a 1 x 2 grid
plotNormalHistogram(data$sp.1)
qqnorm(data$sp.1,
ylab="Sample Quantiles for sp.1")
qqline(data$sp.1,
col="red")
describe(data$sp.1)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1011 3.18 1.46 3 3.08 1.48 1 7 6 0.54 -0.2 0.05
shapiro.test (data$sp.1)
##
## Shapiro-Wilk normality test
##
## data: data$sp.1
## W = 0.96253, p-value = 1.92e-15
par(mfrow = c(1, 1)) # Return plotting panel to 1 section
par(mfrow = c(1, 2)) # Split the plotting panel into a 1 x 2 grid
plotNormalHistogram(data$sp.2)
qqnorm(data$sp.2,
ylab="Sample Quantiles for sp.2")
qqline(data$sp.2,
col="red")
describe(data$sp.2)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1011 3.04 1.18 3.12 3.03 1.3 1 6.75 5.75 0.09 -0.57 0.04
shapiro.test (data$sp.2)
##
## Shapiro-Wilk normality test
##
## data: data$sp.2
## W = 0.97863, p-value = 4.924e-11
par(mfrow = c(1, 1)) # Return plotting panel to 1 section
par(mfrow = c(1, 2)) # Split the plotting panel into a 1 x 2 grid
plotNormalHistogram(data$sp.3)
qqnorm(data$sp.3,
ylab="Sample Quantiles for sp.3")
qqline(data$sp.3,
col="red")
describe(data$sp.3)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1011 2.35 1.21 2 2.22 1.48 1 7 6 0.85 0.29 0.04
shapiro.test (data$sp.3)
##
## Shapiro-Wilk normality test
##
## data: data$sp.3
## W = 0.91011, p-value < 2.2e-16
par(mfrow = c(1, 1)) # Return plotting panel to 1 section
par(mfrow = c(1, 2)) # Split the plotting panel into a 1 x 2 grid
plotNormalHistogram(data$sp.4)
qqnorm(data$sp.4,
ylab="Sample Quantiles for sp.4")
qqline(data$sp.4,
col="red")
describe(data$sp.4)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1011 2.58 1.59 2 2.35 1.48 1 7 6 1 0.22 0.05
shapiro.test (data$sp.4)
##
## Shapiro-Wilk normality test
##
## data: data$sp.4
## W = 0.87216, p-value < 2.2e-16
par(mfrow = c(1, 1)) # Return plotting panel to 1 section
par(mfrow = c(1, 2)) # Split the plotting panel into a 1 x 2 grid
plotNormalHistogram(data$sp.5)
qqnorm(data$sp.5,
ylab="Sample Quantiles for sp.5")
qqline(data$sp.5,
col="red")
describe(data$sp.5)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1011 3.92 1.39 3.75 3.85 1.48 1 7 6 0.38 -0.46 0.04
shapiro.test (data$sp.5)
##
## Shapiro-Wilk normality test
##
## data: data$sp.5
## W = 0.97353, p-value = 1.286e-12
par(mfrow = c(1, 1)) # Return plotting panel to 1 section
par(mfrow = c(1, 2)) # Split the plotting panel into a 1 x 2 grid
plotNormalHistogram(data$sp.6)
qqnorm(data$sp.6,
ylab="Sample Quantiles for sp.6")
qqline(data$sp.6,
col="red")
describe(data$sp.6)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1011 2.45 1.55 2 2.2 1.48 1 7 6 1.14 0.61 0.05
shapiro.test (data$sp.6)
##
## Shapiro-Wilk normality test
##
## data: data$sp.6
## W = 0.85491, p-value < 2.2e-16
par(mfrow = c(1, 1)) # Return plotting panel to 1 section
par(mfrow = c(1, 2)) # Split the plotting panel into a 1 x 2 grid
plotNormalHistogram(data$sp.5.t)
qqnorm(data$sp.5.t,
ylab="Sample Quantiles for sp.5.t")
qqline(data$sp.5.t,
col="red")
describe(data$sp.5.t)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1011 1.95 0.36 1.94 1.95 0.36 1 2.65 1.65 -0.03 -0.43 0.01
shapiro.test (data$sp.5.t)
##
## Shapiro-Wilk normality test
##
## data: data$sp.5.t
## W = 0.98706, p-value = 8.668e-08
par(mfrow = c(1, 1)) # Return plotting panel to 1 section
par(mfrow = c(1, 2)) # Split the plotting panel into a 1 x 2 grid
plotNormalHistogram(data$sp.3.tt)
qqnorm(data$sp.3.tt,
ylab="Sample Quantiles for sp.3.tt")
qqline(data$sp.3.tt,
col="red")
describe(data$sp.3.tt)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1011 0.72 0.52 0.69 0.71 0.7 0 1.95 1.95 0.05 -1.14 0.02
shapiro.test (data$sp.3.tt)
##
## Shapiro-Wilk normality test
##
## data: data$sp.3.tt
## W = 0.93761, p-value < 2.2e-16
par(mfrow = c(1, 1)) # Return plotting panel to 1 section
par(mfrow = c(1, 2)) # Split the plotting panel into a 1 x 2 grid
plotNormalHistogram(data$sp.4.tt)
qqnorm(data$sp.4.tt,
ylab="Sample Quantiles for sp.4.tt")
qqline(data$sp.4.tt,
col="red")
describe(data$sp.4.tt)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1011 0.77 0.6 0.69 0.73 0.76 0 1.95 1.95 0.19 -1.18 0.02
shapiro.test (data$sp.4.tt)
##
## Shapiro-Wilk normality test
##
## data: data$sp.4.tt
## W = 0.92074, p-value < 2.2e-16
par(mfrow = c(1, 1)) # Return plotting panel to 1 section
par(mfrow = c(1, 2)) # Split the plotting panel into a 1 x 2 grid
plotNormalHistogram(data$sp.6.tt)
qqnorm(data$sp.6.tt,
ylab="Sample Quantiles for sp.6.tt")
qqline(data$sp.6.tt,
col="red")
describe(data$sp.6.tt)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1011 0.72 0.6 0.69 0.67 0.83 0 1.95 1.95 0.28 -1.12 0.02
shapiro.test (data$sp.6.tt)
##
## Shapiro-Wilk normality test
##
## data: data$sp.6.tt
## W = 0.91324, p-value < 2.2e-16
par(mfrow = c(1, 1)) # Return plotting panel to 1 section
subset.gb <- subset (data, select = c(gb.rs, gb.rf, gb.as, gb.af, gb.cs, gb.cf))
describe (subset.gb)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## gb.rs 1 1011 5.39 1.17 5.67 5.48 0.99 1 7 6 -0.83 0.83 0.04
## gb.rf 2 1011 2.63 1.43 2.33 2.48 1.48 1 7 6 0.69 -0.27 0.04
## gb.as 3 1011 5.01 1.10 5.00 5.07 0.99 1 7 6 -0.51 0.07 0.03
## gb.af 4 1011 3.12 1.43 3.00 3.06 1.48 1 7 6 0.29 -0.69 0.05
## gb.cs 5 1011 4.37 1.30 4.33 4.41 1.48 1 7 6 -0.25 -0.24 0.04
## gb.cf 6 1011 2.66 1.34 2.33 2.55 1.48 1 7 6 0.56 -0.55 0.04
par(mfrow = c(1, 2)) # Split the plotting panel into a 1 x 2 grid
plotNormalHistogram(data$gb.as)
qqnorm(data$gb.as,
ylab="Sample Quantiles for gb.as")
qqline(data$gb.as,
col="red")
describe(data$gb.as)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1011 5.01 1.1 5 5.07 0.99 1 7 6 -0.51 0.07 0.03
shapiro.test (data$gb.as)
##
## Shapiro-Wilk normality test
##
## data: data$gb.as
## W = 0.97208, p-value = 4.977e-13
par(mfrow = c(1, 1)) # Return plotting panel to 1 section
par(mfrow = c(1, 2)) # Split the plotting panel into a 1 x 2 grid
plotNormalHistogram(data$gb.af)
qqnorm(data$gb.af,
ylab="Sample Quantiles for gb.af")
qqline(data$gb.af,
col="red")
describe(data$gb.af)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1011 3.12 1.43 3 3.06 1.48 1 7 6 0.29 -0.69 0.05
shapiro.test (data$gb.af)
##
## Shapiro-Wilk normality test
##
## data: data$gb.af
## W = 0.9637, p-value = 3.581e-15
par(mfrow = c(1, 1)) # Return plotting panel to 1 section
par(mfrow = c(1, 2)) # Split the plotting panel into a 1 x 2 grid
plotNormalHistogram(data$gb.cs)
qqnorm(data$gb.cs,
ylab="Sample Quantiles for gb.cs")
qqline(data$gb.cs,
col="red")
describe(data$gb.cs)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1011 4.37 1.3 4.33 4.41 1.48 1 7 6 -0.25 -0.24 0.04
shapiro.test (data$gb.cs)
##
## Shapiro-Wilk normality test
##
## data: data$gb.cs
## W = 0.98391, p-value = 4.066e-09
par(mfrow = c(1, 1)) # Return plotting panel to 1 section
par(mfrow = c(1, 2)) # Split the plotting panel into a 1 x 2 grid
plotNormalHistogram(data$gb.cf)
qqnorm(data$gb.cf,
ylab="Sample Quantiles for gb.cf")
qqline(data$gb.cf,
col="red")
describe(data$gb.cf)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1011 2.66 1.34 2.33 2.55 1.48 1 7 6 0.56 -0.55 0.04
shapiro.test (data$gb.cf)
##
## Shapiro-Wilk normality test
##
## data: data$gb.cf
## W = 0.93409, p-value < 2.2e-16
par(mfrow = c(1, 1)) # Return plotting panel to 1 section
subset.as <- subset (data, select = c(asimp.all, aspro.all,
asimp.af, aspro.af, #Affiliation
asimp.cf, aspro.cf, #Community Feeling
asimp.sa, aspro.sa, #Self-Acceptance
asimp.ph, aspro.ph, #Physical Health
asimp.sf, aspro.sf, #Safety
asimp.fs, aspro.fs, #Financial Success
asimp.im, aspro.im, #Image
asimp.po, aspro.po, #Popularity
asimp.co, aspro.co, #Conformity
asimp.he, aspro.he, #Hedonism
asimp.sp, aspro.sp #Spirituality
))
describe (subset.as)
## vars n mean sd median trimmed mad min max range skew
## asimp.all 1 1011 -2.09 1.09 -2.08 -2.08 1.11 -5.38 1.15 6.53 -0.07
## aspro.all 2 1011 -1.26 0.96 -1.15 -1.22 0.96 -4.10 1.85 5.95 -0.32
## asimp.af 3 1011 4.65 1.22 5.00 4.79 1.48 0.00 6.00 6.00 -1.00
## aspro.af 4 1011 4.04 1.39 4.00 4.14 1.48 0.00 6.00 6.00 -0.63
## asimp.cf 5 1011 3.82 1.46 4.00 3.91 1.48 0.00 6.00 6.00 -0.53
## aspro.cf 6 1011 3.28 1.49 3.50 3.33 1.48 0.00 6.00 6.00 -0.29
## asimp.sa 7 1011 4.80 1.04 5.00 4.92 0.74 0.00 6.00 6.00 -0.89
## aspro.sa 8 1011 3.94 1.26 4.00 3.99 1.48 0.00 6.00 6.00 -0.39
## asimp.ph 9 1011 5.10 1.10 5.50 5.29 0.74 0.00 6.00 6.00 -1.53
## aspro.ph 10 1011 3.57 1.55 4.00 3.67 1.48 0.00 6.00 6.00 -0.56
## asimp.sf 11 1011 5.12 0.96 5.50 5.27 0.74 0.50 6.00 5.50 -1.21
## aspro.sf 12 1011 4.37 1.22 4.50 4.48 1.48 0.00 6.00 6.00 -0.85
## asimp.fs 13 1011 3.72 1.57 4.00 3.81 1.48 0.00 6.00 6.00 -0.50
## aspro.fs 14 1011 2.80 1.69 3.00 2.80 2.22 0.00 6.00 6.00 -0.07
## asimp.im 15 1011 1.62 1.40 1.50 1.49 1.48 0.00 6.00 6.00 0.57
## aspro.im 16 1011 2.04 1.50 2.00 1.95 1.48 0.00 6.00 6.00 0.38
## asimp.po 17 1011 1.63 1.44 1.50 1.48 1.48 0.00 6.00 6.00 0.71
## aspro.po 18 1011 2.01 1.53 2.00 1.90 1.48 0.00 6.00 6.00 0.44
## asimp.co 19 1011 3.45 1.33 3.50 3.51 1.48 0.00 6.00 6.00 -0.40
## aspro.co 20 1011 3.47 1.31 3.50 3.54 1.48 0.00 6.00 6.00 -0.50
## asimp.he 21 1011 3.29 1.44 3.50 3.33 1.48 0.00 6.00 6.00 -0.28
## aspro.he 22 1011 3.05 1.50 3.00 3.07 1.48 0.00 6.00 6.00 -0.14
## asimp.sp 23 1011 1.24 1.70 0.50 0.92 0.74 0.00 6.00 6.00 1.29
## aspro.sp 24 1011 1.39 1.79 0.50 1.08 0.74 0.00 6.00 6.00 1.12
## kurtosis se
## asimp.all -0.24 0.03
## aspro.all -0.04 0.03
## asimp.af 0.88 0.04
## aspro.af 0.10 0.04
## asimp.cf -0.17 0.05
## aspro.cf -0.46 0.05
## asimp.sa 0.68 0.03
## aspro.sa -0.24 0.04
## asimp.ph 2.65 0.03
## aspro.ph -0.28 0.05
## asimp.sf 1.31 0.03
## aspro.sf 0.56 0.04
## asimp.fs -0.37 0.05
## aspro.fs -0.87 0.05
## asimp.im -0.52 0.04
## aspro.im -0.50 0.05
## asimp.po -0.16 0.05
## aspro.po -0.49 0.05
## asimp.co -0.09 0.04
## aspro.co 0.07 0.04
## asimp.he -0.33 0.05
## aspro.he -0.64 0.05
## asimp.sp 0.55 0.05
## aspro.sp 0.07 0.06
par(mfrow = c(1, 2)) # Split the plotting panel into a 1 x 2 grid
plotNormalHistogram(data$asimp.all)
qqnorm(data$asimp.all,
ylab="Sample Quantiles for asimp.all")
qqline(data$asimp.all,
col="red")
describe(data$asimp.all)
## vars n mean sd median trimmed mad min max range skew kurtosis
## X1 1 1011 -2.09 1.09 -2.08 -2.08 1.11 -5.38 1.15 6.53 -0.07 -0.24
## se
## X1 0.03
shapiro.test (data$asimp.all)
##
## Shapiro-Wilk normality test
##
## data: data$asimp.all
## W = 0.99825, p-value = 0.3953
par(mfrow = c(1, 1)) # Return plotting panel to 1 section
par(mfrow = c(1, 2)) # Split the plotting panel into a 1 x 2 grid
plotNormalHistogram(data$aspro.all)
qqnorm(data$aspro.all,
ylab="Sample Quantiles for aspro.all")
qqline(data$aspro.all,
col="red")
describe(data$aspro.all)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1011 -1.26 0.96 -1.15 -1.22 0.96 -4.1 1.85 5.95 -0.32 -0.04 0.03
shapiro.test (data$aspro.all)
##
## Shapiro-Wilk normality test
##
## data: data$aspro.all
## W = 0.98815, p-value = 2.756e-07
par(mfrow = c(1, 1)) # Return plotting panel to 1 section
par(mfrow = c(1, 2)) # Split the plotting panel into a 1 x 2 grid
plotNormalHistogram(data$sj)
qqnorm(data$sj,
ylab="Sample Quantiles for sj")
qqline(data$sj,
col="red")
describe(data$sj)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1011 3.94 1.09 4 3.98 1.11 1 7 6 -0.25 -0.13 0.03
shapiro.test (data$sj)
##
## Shapiro-Wilk normality test
##
## data: data$sj
## W = 0.99245, p-value = 4.982e-05
par(mfrow = c(1, 1)) # Return plotting panel to 1 section
par(mfrow = c(1, 2)) # Split the plotting panel into a 1 x 2 grid
plotNormalHistogram(data$nd)
qqnorm(data$nd,
ylab="Sample Quantiles for nd")
qqline(data$nd,
col="red")
describe(data$nd)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1011 2.51 1.14 2.4 2.42 1.33 1 7 6 0.63 -0.03 0.04
shapiro.test (data$nd)
##
## Shapiro-Wilk normality test
##
## data: data$nd
## W = 0.9485, p-value < 2.2e-16
par(mfrow = c(1, 1)) # Return plotting panel to 1 section
par(mfrow = c(1, 2)) # Split the plotting panel into a 1 x 2 grid
plotNormalHistogram(data$cas)
qqnorm(data$cas,
ylab="Sample Quantiles for cas")
qqline(data$cas,
col="red")
describe(data$cas)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1011 1.81 0.82 1.58 1.68 0.74 1 5.42 4.42 1.22 1.16 0.03
shapiro.test (data$cas)
##
## Shapiro-Wilk normality test
##
## data: data$cas
## W = 0.86899, p-value < 2.2e-16
boxplot(data$cas, las=2)
par(mfrow = c(1, 1)) # Return plotting panel to 1 section
prop.table (table (data$cas>=2)) #people scoring 2 or higher
##
## FALSE TRUE
## 0.6518299 0.3481701
prop.table (table (data$cas>=3)) #people scoring 3 or higher
##
## FALSE TRUE
## 0.892186 0.107814
par(mfrow = c(1, 2)) # Split the plotting panel into a 1 x 2 grid
plotNormalHistogram(data$cas.tt)
qqnorm(data$cas.tt,
ylab="Sample Quantiles for cas.tt")
qqline(data$cas.tt,
col="red")
describe(data$cas.tt)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1011 0.5 0.41 0.46 0.47 0.52 0 1.69 1.69 0.47 -0.76 0.01
shapiro.test (data$cas.tt)
##
## Shapiro-Wilk normality test
##
## data: data$cas.tt
## W = 0.93151, p-value < 2.2e-16
par(mfrow = c(1, 1)) # Return plotting panel to 1 section
Thinking about climate change makes it difficult for me to concentrate. Über den Klimawandel nachzudenken bereitet mir Konzentrationsschwierigkeiten.
par(mfrow = c(1, 2)) # Split the plotting panel into a 1 x 2 grid
plotNormalHistogram(data$cas01)
qqnorm(data$cas01,
ylab="Sample Quantiles for cas01")
qqline(data$cas01,
col="red")
boxplot(data$cas01, las=2)
describe(data$cas01)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1011 1.8 1.21 1 1.56 0 1 7 6 1.5 1.57 0.04
shapiro.test (data$cas01)
##
## Shapiro-Wilk normality test
##
## data: data$cas01
## W = 0.69946, p-value < 2.2e-16
par(mfrow = c(1, 1)) # Return plotting panel to 1 section
Thinking about climate change makes it difficult for me to sleep. Über den Klimawandel nachzudenken bereitet mir Schlafschwierigkeiten.
par(mfrow = c(1, 2)) # Split the plotting panel into a 1 x 2 grid
plotNormalHistogram(data$cas02)
qqnorm(data$cas02,
ylab="Sample Quantiles for cas02")
qqline(data$cas02,
col="red")
boxplot(data$cas02, las=2)
describe(data$cas02)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1011 1.71 1.21 1 1.44 0 1 7 6 1.76 2.46 0.04
shapiro.test (data$cas02)
##
## Shapiro-Wilk normality test
##
## data: data$cas02
## W = 0.64591, p-value < 2.2e-16
par(mfrow = c(1, 1)) # Return plotting panel to 1 section
I have nightmares about climate change. Ich habe Albträume über den Klimawandel.
par(mfrow = c(1, 2)) # Split the plotting panel into a 1 x 2 grid
plotNormalHistogram(data$cas03)
qqnorm(data$cas03,
ylab="Sample Quantiles for cas03")
qqline(data$cas03,
col="red")
boxplot(data$cas03, las=2)
describe(data$cas03)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1011 1.4 0.93 1 1.15 0 1 7 6 2.65 7.13 0.03
shapiro.test (data$cas03)
##
## Shapiro-Wilk normality test
##
## data: data$cas03
## W = 0.50153, p-value < 2.2e-16
par(mfrow = c(1, 1)) # Return plotting panel to 1 section
I find myself crying because of climate change. Ich ertappe mich dabei, dass ich wegen des Klimawandels weine.
par(mfrow = c(1, 2)) # Split the plotting panel into a 1 x 2 grid
plotNormalHistogram(data$cas04)
qqnorm(data$cas04,
ylab="Sample Quantiles for cas04")
qqline(data$cas04,
col="red")
boxplot(data$cas04, las=2)
describe(data$cas04)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1011 1.34 0.88 1 1.08 0 1 6 5 2.89 8.24 0.03
shapiro.test (data$cas04)
##
## Shapiro-Wilk normality test
##
## data: data$cas04
## W = 0.44609, p-value < 2.2e-16
par(mfrow = c(1, 1)) # Return plotting panel to 1 section
I think, “why can’t I handle climate change better?”. Ich frage mich, warum ich nicht besser mit dem Klimawandel umgehen kann.
par(mfrow = c(1, 2)) # Split the plotting panel into a 1 x 2 grid
plotNormalHistogram(data$cas05)
qqnorm(data$cas05,
ylab="Sample Quantiles for cas05")
qqline(data$cas05,
col="red")
boxplot(data$cas05, las=2)
describe(data$cas05)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1011 2.42 1.58 2 2.22 1.48 1 7 6 0.74 -0.62 0.05
shapiro.test (data$cas05)
##
## Shapiro-Wilk normality test
##
## data: data$cas05
## W = 0.81903, p-value < 2.2e-16
par(mfrow = c(1, 1)) # Return plotting panel to 1 section
I go away by myself and think about why I feel this way about climate change. Ich nehme mir bewusst Zeit, um über meine Gefühle bezüglich des Klimawandels nachzudenken.
par(mfrow = c(1, 2)) # Split the plotting panel into a 1 x 2 grid
plotNormalHistogram(data$cas06)
qqnorm(data$cas06,
ylab="Sample Quantiles for cas06")
qqline(data$cas06,
col="red")
boxplot(data$cas06, las=2)
describe(data$cas06)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1011 2.87 1.77 3 2.72 2.97 1 7 6 0.39 -1.15 0.06
shapiro.test (data$cas06)
##
## Shapiro-Wilk normality test
##
## data: data$cas06
## W = 0.86117, p-value < 2.2e-16
par(mfrow = c(1, 1)) # Return plotting panel to 1 section
I write down my thoughts about climate change and analyze them. Ich schreibe meine Gedanken über den Klimawandel auf und analysiere sie.
par(mfrow = c(1, 2)) # Split the plotting panel into a 1 x 2 grid
plotNormalHistogram(data$cas07)
qqnorm(data$cas07,
ylab="Sample Quantiles for cas07")
qqline(data$cas07,
col="red")
boxplot(data$cas07, las=2)
describe(data$cas07)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1011 1.35 0.88 1 1.1 0 1 7 6 2.99 9.58 0.03
shapiro.test (data$cas07)
##
## Shapiro-Wilk normality test
##
## data: data$cas07
## W = 0.45464, p-value < 2.2e-16
par(mfrow = c(1, 1)) # Return plotting panel to 1 section
I think, “why do I react to climate change this way?”. Ich frage mich, warum ich so und nicht anders auf den Klimawandel reagiere.
par(mfrow = c(1, 2)) # Split the plotting panel into a 1 x 2 grid
plotNormalHistogram(data$cas08)
qqnorm(data$cas08,
ylab="Sample Quantiles for cas08")
qqline(data$cas08,
col="red")
boxplot(data$cas08, las=2)
describe(data$cas08)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1011 2.38 1.52 2 2.2 1.48 1 7 6 0.71 -0.58 0.05
shapiro.test (data$cas08)
##
## Shapiro-Wilk normality test
##
## data: data$cas08
## W = 0.81946, p-value < 2.2e-16
par(mfrow = c(1, 1)) # Return plotting panel to 1 section
My concerns about climate change make it hard for me to have fun with my family or friends. Meine Sorgen um den Klimawandel erschweren es mir, Spaß mit meiner Familie und mit Freund*innen zu haben.
par(mfrow = c(1, 2)) # Split the plotting panel into a 1 x 2 grid
plotNormalHistogram(data$cas09)
qqnorm(data$cas09,
ylab="Sample Quantiles for cas09")
qqline(data$cas09,
col="red")
boxplot(data$cas09, las=2)
describe(data$cas09)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1011 1.82 1.21 1 1.59 0 1 7 6 1.36 0.84 0.04
shapiro.test (data$cas09)
##
## Shapiro-Wilk normality test
##
## data: data$cas09
## W = 0.70947, p-value < 2.2e-16
par(mfrow = c(1, 1)) # Return plotting panel to 1 section
I have problems balancing my concerns about sustainability with the needs of my family. Ich habe Schwierigkeiten, meine Sorgen um Nachhaltigkeit mit den Bedürfnissen meiner Familie unter einen Hut zu kriegen.
par(mfrow = c(1, 2)) # Split the plotting panel into a 1 x 2 grid
plotNormalHistogram(data$cas10)
qqnorm(data$cas10,
ylab="Sample Quantiles for cas10")
qqline(data$cas10,
col="red")
boxplot(data$cas10, las=2)
describe(data$cas10)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1011 2.36 1.6 2 2.13 1.48 1 7 6 0.95 -0.16 0.05
shapiro.test (data$cas10)
##
## Shapiro-Wilk normality test
##
## data: data$cas10
## W = 0.80818, p-value < 2.2e-16
par(mfrow = c(1, 1)) # Return plotting panel to 1 section
My concerns about climate change interfere with my ability to get work or school assignments done. Meine Sorgen um den Klimawandel beeinträchtigen meine Fähigkeit, Arbeits- oder Schulaufgaben zu bewältigen.
par(mfrow = c(1, 2)) # Split the plotting panel into a 1 x 2 grid
plotNormalHistogram(data$cas11)
qqnorm(data$cas11,
ylab="Sample Quantiles for cas11")
qqline(data$cas11,
col="red")
boxplot(data$cas11, las=2)
describe(data$cas11)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1011 1.57 1.05 1 1.31 0 1 7 6 1.96 3.36 0.03
shapiro.test (data$cas11)
##
## Shapiro-Wilk normality test
##
## data: data$cas11
## W = 0.60457, p-value < 2.2e-16
par(mfrow = c(1, 1)) # Return plotting panel to 1 section
My concerns about climate change undermine my ability to work to my potential. Meine Sorgen um den Klimawandel untergraben meine Fähigkeit, mein volles Potential auszuschöpfen/zu entfalten.
par(mfrow = c(1, 2)) # Split the plotting panel into a 1 x 2 grid
plotNormalHistogram(data$cas12)
qqnorm(data$cas12,
ylab="Sample Quantiles for cas12")
qqline(data$cas12,
col="red")
boxplot(data$cas12, las=2)
describe(data$cas12)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1011 1.76 1.18 1 1.53 0 1 7 6 1.53 1.71 0.04
shapiro.test (data$cas12)
##
## Shapiro-Wilk normality test
##
## data: data$cas12
## W = 0.68784, p-value < 2.2e-16
par(mfrow = c(1, 1)) # Return plotting panel to 1 section
My friends say I think about climate change too much. Meine Freund*innen sagen, dass ich zu viel über den Klimawandel nachdenke.
par(mfrow = c(1, 2)) # Split the plotting panel into a 1 x 2 grid
plotNormalHistogram(data$cas13)
qqnorm(data$cas13,
ylab="Sample Quantiles for cas13")
qqline(data$cas13,
col="red")
boxplot(data$cas13, las=2)
describe(data$cas13)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1011 1.79 1.25 1 1.53 0 1 7 6 1.54 1.45 0.04
shapiro.test (data$cas13)
##
## Shapiro-Wilk normality test
##
## data: data$cas13
## W = 0.67718, p-value < 2.2e-16
par(mfrow = c(1, 1)) # Return plotting panel to 1 section
par(mfrow = c(1, 2)) # Split the plotting panel into a 1 x 2 grid
plotNormalHistogram(data$phq)
qqnorm(data$phq,
ylab="Sample Quantiles for phq")
qqline(data$phq,
col="red")
describe(data$phq)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1011 1.67 0.72 1.5 1.55 0.74 1 4 3 1.29 1.27 0.02
shapiro.test (data$phq)
##
## Shapiro-Wilk normality test
##
## data: data$phq
## W = 0.84165, p-value < 2.2e-16
par(mfrow = c(1, 1)) # Return plotting panel to 1 section
par(mfrow = c(1, 2)) # Split the plotting panel into a 1 x 2 grid
plotNormalHistogram(data$phq.tt)
qqnorm(data$phq.tt,
ylab="Sample Quantiles for phq.tt")
qqline(data$phq.tt,
col="red")
describe(data$phq.tt)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1011 0.43 0.39 0.41 0.39 0.43 0 1.39 1.39 0.55 -0.6 0.01
shapiro.test (data$phq.tt)
##
## Shapiro-Wilk normality test
##
## data: data$phq.tt
## W = 0.90138, p-value < 2.2e-16
par(mfrow = c(1, 1)) # Return plotting panel to 1 section
par(mfrow = c(1, 2)) # Split the plotting panel into a 1 x 2 grid
plotNormalHistogram(data$ps)
qqnorm(data$ps,
ylab="Sample Quantiles for ps")
qqline(data$ps,
col="red")
describe(data$ps)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 973 71.35 20.88 73.5 73.13 21.5 1 101 100 -0.86 0.83 0.67
shapiro.test (data$ps)
##
## Shapiro-Wilk normality test
##
## data: data$ps
## W = 0.94444, p-value < 2.2e-16
par(mfrow = c(1, 1)) # Return plotting panel to 1 section
par(mfrow = c(1, 2)) # Split the plotting panel into a 1 x 2 grid
plotNormalHistogram(data$int)
qqnorm(data$int,
ylab="Sample Quantiles for int")
qqline(data$int,
col="red")
describe(data$int)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1011 3.49 1.26 3.33 3.46 1.48 1 7 6 0.26 -0.26 0.04
shapiro.test (data$int)
##
## Shapiro-Wilk normality test
##
## data: data$int
## W = 0.98128, p-value = 4.115e-10
par(mfrow = c(1, 1)) # Return plotting panel to 1 section
subset.sd <- subset (data, select = c(age, income, pol.orient))
describe (subset.sd)
## vars n mean sd median trimmed mad min max range skew
## age 1 1011 43.91 13.97 44 44.00 17.79 18 69 51 -0.07
## income 2 1011 4.90 2.89 4 4.64 2.97 1 11 10 0.73
## pol.orient 3 1011 44.61 18.80 48 44.65 14.83 1 101 100 -0.02
## kurtosis se
## age -1.10 0.44
## income -0.38 0.09
## pol.orient 0.18 0.59
par(mfrow = c(1, 2)) # Split the plotting panel into a 1 x 2 grid
plotNormalHistogram(data$age)
qqnorm(data$age,
ylab="Sample Quantiles for age")
qqline(data$age,
col="red")
describe(data$age)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1011 43.91 13.97 44 44 17.79 18 69 51 -0.07 -1.1 0.44
shapiro.test (data$age)
##
## Shapiro-Wilk normality test
##
## data: data$age
## W = 0.96403, p-value = 4.282e-15
par(mfrow = c(1, 1)) # Return plotting panel to 1 section
table (data$gender.d)
##
## 0 1
## 494 517
prop.table (table (data$gender.d))
##
## 0 1
## 0.4886251 0.5113749
table (data$income)
##
## 1 2 3 4 5 6 7 8 9 10 11
## 92 122 163 162 134 93 59 34 30 42 80
prop.table (table (data$income))
##
## 1 2 3 4 5 6 7
## 0.09099901 0.12067260 0.16122651 0.16023739 0.13254204 0.09198813 0.05835806
## 8 9 10 11
## 0.03363007 0.02967359 0.04154303 0.07912957
table (data$edu)
##
## 1 2 3 4 5 6 7 8
## 5 2 52 156 230 266 298 2
prop.table (table (data$edu))
##
## 1 2 3 4 5 6
## 0.004945598 0.001978239 0.051434224 0.154302671 0.227497527 0.263105836
## 7 8
## 0.294757666 0.001978239
par(mfrow = c(1, 2)) # Split the plotting panel into a 1 x 2 grid
plotNormalHistogram(data$pol.orient)
qqnorm(data$pol.orient,
ylab="Sample Quantiles for pol.orient")
qqline(data$pol.orient,
col="red")
describe(data$pol.orient)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1011 44.61 18.8 48 44.65 14.83 1 101 100 -0.02 0.18 0.59
shapiro.test (data$pol.orient)
##
## Shapiro-Wilk normality test
##
## data: data$pol.orient
## W = 0.97778, p-value = 2.585e-11
par(mfrow = c(1, 1)) # Return plotting panel to 1 section
All variables
corr.test (data [,c("sp", "sp.1", "sp.2", "sp.3", "sp.4", "sp.5", "sp.6",
"gb.rs", "gb.as", "gb.cs", "gb.rf", "gb.af", "gb.cf",
"asimp.all", "aspro.all",
"sj", "sdo", "nd", "rwa",
"cas",
"phq",
"ps", "int",
"age", "income", "pol.orient")],
method = "spearman")
## Call:corr.test(x = data[, c("sp", "sp.1", "sp.2", "sp.3", "sp.4",
## "sp.5", "sp.6", "gb.rs", "gb.as", "gb.cs", "gb.rf", "gb.af",
## "gb.cf", "asimp.all", "aspro.all", "sj", "sdo", "nd", "rwa",
## "cas", "phq", "ps", "int", "age", "income", "pol.orient")],
## method = "spearman")
## Correlation matrix
## sp sp.1 sp.2 sp.3 sp.4 sp.5 sp.6 gb.rs gb.as gb.cs gb.rf
## sp 1.00 0.87 0.65 0.78 0.84 0.65 0.80 -0.15 -0.07 -0.03 0.08
## sp.1 0.87 1.00 0.44 0.61 0.65 0.57 0.61 -0.16 -0.06 -0.05 0.03
## sp.2 0.65 0.44 1.00 0.45 0.42 0.10 0.37 -0.13 -0.12 -0.08 0.19
## sp.3 0.78 0.61 0.45 1.00 0.72 0.46 0.63 -0.13 -0.06 0.01 0.10
## sp.4 0.84 0.65 0.42 0.72 1.00 0.57 0.83 -0.10 -0.05 0.04 0.07
## sp.5 0.65 0.57 0.10 0.46 0.57 1.00 0.53 -0.02 0.06 0.05 -0.10
## sp.6 0.80 0.61 0.37 0.63 0.83 0.53 1.00 -0.09 -0.05 0.01 0.07
## gb.rs -0.15 -0.16 -0.13 -0.13 -0.10 -0.02 -0.09 1.00 0.44 0.28 -0.41
## gb.as -0.07 -0.06 -0.12 -0.06 -0.05 0.06 -0.05 0.44 1.00 0.29 -0.34
## gb.cs -0.03 -0.05 -0.08 0.01 0.04 0.05 0.01 0.28 0.29 1.00 -0.02
## gb.rf 0.08 0.03 0.19 0.10 0.07 -0.10 0.07 -0.41 -0.34 -0.02 1.00
## gb.af 0.08 0.06 0.13 0.04 0.07 -0.06 0.06 -0.28 -0.48 0.03 0.63
## gb.cf 0.02 0.00 0.16 0.02 0.00 -0.18 0.00 -0.32 -0.38 -0.12 0.65
## asimp.all 0.23 0.16 0.25 0.23 0.22 0.02 0.18 -0.15 -0.14 0.11 0.20
## aspro.all 0.20 0.19 0.21 0.19 0.14 0.02 0.12 -0.20 -0.20 0.02 0.22
## sj -0.17 -0.18 -0.06 -0.02 -0.14 -0.20 -0.18 0.12 0.07 0.10 -0.11
## sdo 0.39 0.34 0.22 0.34 0.35 0.25 0.34 -0.08 -0.04 0.05 0.06
## nd 0.40 0.34 0.25 0.38 0.37 0.22 0.34 -0.05 -0.04 0.04 0.04
## rwa 0.43 0.34 0.27 0.31 0.39 0.33 0.40 -0.05 0.04 0.04 0.04
## cas -0.13 -0.17 0.17 -0.05 -0.15 -0.37 -0.13 -0.10 -0.14 0.01 0.27
## phq -0.10 -0.10 0.07 -0.11 -0.13 -0.19 -0.14 -0.30 -0.35 -0.21 0.45
## ps -0.54 -0.42 -0.27 -0.46 -0.56 -0.40 -0.54 0.05 0.06 -0.04 -0.03
## int -0.52 -0.49 -0.27 -0.38 -0.44 -0.40 -0.39 0.06 0.02 0.13 0.11
## age 0.07 0.08 0.04 0.02 0.02 0.14 0.03 0.05 0.16 -0.10 -0.20
## income 0.00 0.01 -0.04 0.02 0.02 0.00 0.01 0.05 0.00 0.13 -0.10
## pol.orient 0.38 0.34 0.14 0.29 0.36 0.32 0.34 -0.03 0.01 0.01 -0.01
## gb.af gb.cf asimp.all aspro.all sj sdo nd rwa cas phq
## sp 0.08 0.02 0.23 0.20 -0.17 0.39 0.40 0.43 -0.13 -0.10
## sp.1 0.06 0.00 0.16 0.19 -0.18 0.34 0.34 0.34 -0.17 -0.10
## sp.2 0.13 0.16 0.25 0.21 -0.06 0.22 0.25 0.27 0.17 0.07
## sp.3 0.04 0.02 0.23 0.19 -0.02 0.34 0.38 0.31 -0.05 -0.11
## sp.4 0.07 0.00 0.22 0.14 -0.14 0.35 0.37 0.39 -0.15 -0.13
## sp.5 -0.06 -0.18 0.02 0.02 -0.20 0.25 0.22 0.33 -0.37 -0.19
## sp.6 0.06 0.00 0.18 0.12 -0.18 0.34 0.34 0.40 -0.13 -0.14
## gb.rs -0.28 -0.32 -0.15 -0.20 0.12 -0.08 -0.05 -0.05 -0.10 -0.30
## gb.as -0.48 -0.38 -0.14 -0.20 0.07 -0.04 -0.04 0.04 -0.14 -0.35
## gb.cs 0.03 -0.12 0.11 0.02 0.10 0.05 0.04 0.04 0.01 -0.21
## gb.rf 0.63 0.65 0.20 0.22 -0.11 0.06 0.04 0.04 0.27 0.45
## gb.af 1.00 0.61 0.14 0.22 -0.15 0.05 0.04 -0.01 0.20 0.47
## gb.cf 0.61 1.00 0.15 0.20 -0.07 -0.03 0.05 -0.07 0.29 0.55
## asimp.all 0.14 0.15 1.00 0.59 0.05 0.28 0.29 0.26 0.13 0.03
## aspro.all 0.22 0.20 0.59 1.00 -0.06 0.22 0.18 0.18 0.09 0.13
## sj -0.15 -0.07 0.05 -0.06 1.00 0.06 0.07 -0.18 0.04 -0.15
## sdo 0.05 -0.03 0.28 0.22 0.06 1.00 0.34 0.45 -0.03 -0.12
## nd 0.04 0.05 0.29 0.18 0.07 0.34 1.00 0.31 0.08 -0.06
## rwa -0.01 -0.07 0.26 0.18 -0.18 0.45 0.31 1.00 0.00 -0.10
## cas 0.20 0.29 0.13 0.09 0.04 -0.03 0.08 0.00 1.00 0.25
## phq 0.47 0.55 0.03 0.13 -0.15 -0.12 -0.06 -0.10 0.25 1.00
## ps -0.02 0.04 -0.21 -0.12 0.04 -0.33 -0.38 -0.30 0.17 0.12
## int 0.06 0.15 -0.05 -0.10 0.07 -0.27 -0.17 -0.26 0.44 0.13
## age -0.21 -0.28 -0.25 -0.21 -0.04 0.10 0.02 0.21 0.03 -0.15
## income -0.08 -0.13 0.08 0.06 0.09 0.13 0.05 0.03 -0.04 -0.14
## pol.orient -0.01 -0.09 0.12 0.10 -0.04 0.41 0.23 0.46 -0.11 -0.09
## ps int age income pol.orient
## sp -0.54 -0.52 0.07 0.00 0.38
## sp.1 -0.42 -0.49 0.08 0.01 0.34
## sp.2 -0.27 -0.27 0.04 -0.04 0.14
## sp.3 -0.46 -0.38 0.02 0.02 0.29
## sp.4 -0.56 -0.44 0.02 0.02 0.36
## sp.5 -0.40 -0.40 0.14 0.00 0.32
## sp.6 -0.54 -0.39 0.03 0.01 0.34
## gb.rs 0.05 0.06 0.05 0.05 -0.03
## gb.as 0.06 0.02 0.16 0.00 0.01
## gb.cs -0.04 0.13 -0.10 0.13 0.01
## gb.rf -0.03 0.11 -0.20 -0.10 -0.01
## gb.af -0.02 0.06 -0.21 -0.08 -0.01
## gb.cf 0.04 0.15 -0.28 -0.13 -0.09
## asimp.all -0.21 -0.05 -0.25 0.08 0.12
## aspro.all -0.12 -0.10 -0.21 0.06 0.10
## sj 0.04 0.07 -0.04 0.09 -0.04
## sdo -0.33 -0.27 0.10 0.13 0.41
## nd -0.38 -0.17 0.02 0.05 0.23
## rwa -0.30 -0.26 0.21 0.03 0.46
## cas 0.17 0.44 0.03 -0.04 -0.11
## phq 0.12 0.13 -0.15 -0.14 -0.09
## ps 1.00 0.40 0.08 -0.03 -0.36
## int 0.40 1.00 -0.10 -0.02 -0.33
## age 0.08 -0.10 1.00 0.11 0.05
## income -0.03 -0.02 0.11 1.00 0.10
## pol.orient -0.36 -0.33 0.05 0.10 1.00
## Sample Size
## sp sp.1 sp.2 sp.3 sp.4 sp.5 sp.6 gb.rs gb.as gb.cs gb.rf gb.af
## sp 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011
## sp.1 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011
## sp.2 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011
## sp.3 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011
## sp.4 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011
## sp.5 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011
## sp.6 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011
## gb.rs 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011
## gb.as 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011
## gb.cs 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011
## gb.rf 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011
## gb.af 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011
## gb.cf 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011
## asimp.all 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011
## aspro.all 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011
## sj 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011
## sdo 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011
## nd 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011
## rwa 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011
## cas 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011
## phq 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011
## ps 973 973 973 973 973 973 973 973 973 973 973 973
## int 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011
## age 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011
## income 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011
## pol.orient 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011 1011
## gb.cf asimp.all aspro.all sj sdo nd rwa cas phq ps int
## sp 1011 1011 1011 1011 1011 1011 1011 1011 1011 973 1011
## sp.1 1011 1011 1011 1011 1011 1011 1011 1011 1011 973 1011
## sp.2 1011 1011 1011 1011 1011 1011 1011 1011 1011 973 1011
## sp.3 1011 1011 1011 1011 1011 1011 1011 1011 1011 973 1011
## sp.4 1011 1011 1011 1011 1011 1011 1011 1011 1011 973 1011
## sp.5 1011 1011 1011 1011 1011 1011 1011 1011 1011 973 1011
## sp.6 1011 1011 1011 1011 1011 1011 1011 1011 1011 973 1011
## gb.rs 1011 1011 1011 1011 1011 1011 1011 1011 1011 973 1011
## gb.as 1011 1011 1011 1011 1011 1011 1011 1011 1011 973 1011
## gb.cs 1011 1011 1011 1011 1011 1011 1011 1011 1011 973 1011
## gb.rf 1011 1011 1011 1011 1011 1011 1011 1011 1011 973 1011
## gb.af 1011 1011 1011 1011 1011 1011 1011 1011 1011 973 1011
## gb.cf 1011 1011 1011 1011 1011 1011 1011 1011 1011 973 1011
## asimp.all 1011 1011 1011 1011 1011 1011 1011 1011 1011 973 1011
## aspro.all 1011 1011 1011 1011 1011 1011 1011 1011 1011 973 1011
## sj 1011 1011 1011 1011 1011 1011 1011 1011 1011 973 1011
## sdo 1011 1011 1011 1011 1011 1011 1011 1011 1011 973 1011
## nd 1011 1011 1011 1011 1011 1011 1011 1011 1011 973 1011
## rwa 1011 1011 1011 1011 1011 1011 1011 1011 1011 973 1011
## cas 1011 1011 1011 1011 1011 1011 1011 1011 1011 973 1011
## phq 1011 1011 1011 1011 1011 1011 1011 1011 1011 973 1011
## ps 973 973 973 973 973 973 973 973 973 973 973
## int 1011 1011 1011 1011 1011 1011 1011 1011 1011 973 1011
## age 1011 1011 1011 1011 1011 1011 1011 1011 1011 973 1011
## income 1011 1011 1011 1011 1011 1011 1011 1011 1011 973 1011
## pol.orient 1011 1011 1011 1011 1011 1011 1011 1011 1011 973 1011
## age income pol.orient
## sp 1011 1011 1011
## sp.1 1011 1011 1011
## sp.2 1011 1011 1011
## sp.3 1011 1011 1011
## sp.4 1011 1011 1011
## sp.5 1011 1011 1011
## sp.6 1011 1011 1011
## gb.rs 1011 1011 1011
## gb.as 1011 1011 1011
## gb.cs 1011 1011 1011
## gb.rf 1011 1011 1011
## gb.af 1011 1011 1011
## gb.cf 1011 1011 1011
## asimp.all 1011 1011 1011
## aspro.all 1011 1011 1011
## sj 1011 1011 1011
## sdo 1011 1011 1011
## nd 1011 1011 1011
## rwa 1011 1011 1011
## cas 1011 1011 1011
## phq 1011 1011 1011
## ps 973 973 973
## int 1011 1011 1011
## age 1011 1011 1011
## income 1011 1011 1011
## pol.orient 1011 1011 1011
## Probability values (Entries above the diagonal are adjusted for multiple tests.)
## sp sp.1 sp.2 sp.3 sp.4 sp.5 sp.6 gb.rs gb.as gb.cs gb.rf gb.af
## sp 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 1.00 1.00 1.00 1.00
## sp.1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 1.00 1.00 1.00 1.00
## sp.2 0.00 0.00 0.00 0.00 0.00 0.15 0.00 0.01 0.02 1.00 0.00 0.00
## sp.3 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 1.00 1.00 0.27 1.00
## sp.4 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.27 1.00 1.00 1.00 1.00
## sp.5 0.00 0.00 0.00 0.00 0.00 0.00 0.00 1.00 1.00 1.00 0.11 1.00
## sp.6 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.43 1.00 1.00 1.00 1.00
## gb.rs 0.00 0.00 0.00 0.00 0.00 0.45 0.00 0.00 0.00 0.00 0.00 0.00
## gb.as 0.02 0.07 0.00 0.04 0.12 0.07 0.11 0.00 0.00 0.00 0.00 0.00
## gb.cs 0.27 0.09 0.01 0.71 0.26 0.11 0.82 0.00 0.00 0.00 1.00 1.00
## gb.rf 0.01 0.27 0.00 0.00 0.03 0.00 0.03 0.00 0.00 0.59 0.00 0.00
## gb.af 0.01 0.08 0.00 0.26 0.03 0.06 0.04 0.00 0.00 0.29 0.00 0.00
## gb.cf 0.60 0.92 0.00 0.56 0.96 0.00 0.91 0.00 0.00 0.00 0.00 0.00
## asimp.all 0.00 0.00 0.00 0.00 0.00 0.49 0.00 0.00 0.00 0.00 0.00 0.00
## aspro.all 0.00 0.00 0.00 0.00 0.00 0.50 0.00 0.00 0.00 0.62 0.00 0.00
## sj 0.00 0.00 0.08 0.59 0.00 0.00 0.00 0.00 0.04 0.00 0.00 0.00
## sdo 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.01 0.17 0.09 0.06 0.10
## nd 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.09 0.24 0.21 0.24 0.19
## rwa 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.13 0.26 0.17 0.19 0.73
## cas 0.00 0.00 0.00 0.08 0.00 0.00 0.00 0.00 0.00 0.72 0.00 0.00
## phq 0.00 0.00 0.04 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## ps 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.09 0.05 0.24 0.35 0.45
## int 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.05 0.44 0.00 0.00 0.05
## age 0.02 0.02 0.22 0.44 0.49 0.00 0.37 0.15 0.00 0.00 0.00 0.00
## income 0.97 0.71 0.20 0.47 0.43 0.89 0.68 0.10 0.99 0.00 0.00 0.01
## pol.orient 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.27 0.69 0.74 0.81 0.73
## gb.cf asimp.all aspro.all sj sdo nd rwa cas phq ps int
## sp 1.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.14 0.00 0.00
## sp.1 1.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.22 0.00 0.00
## sp.2 0.00 0.00 0.00 1.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00
## sp.3 1.00 0.00 0.00 1.00 0.00 0.00 0.00 1.00 0.07 0.00 0.00
## sp.4 1.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## sp.5 0.00 1.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## sp.6 1.00 0.00 0.02 0.00 0.00 0.00 0.00 0.01 0.00 0.00 0.00
## gb.rs 0.00 0.00 0.00 0.01 0.86 1.00 1.00 0.12 0.00 1.00 1.00
## gb.as 0.00 0.00 0.00 1.00 1.00 1.00 1.00 0.00 0.00 1.00 1.00
## gb.cs 0.01 0.11 1.00 0.27 1.00 1.00 1.00 1.00 0.00 1.00 0.01
## gb.rf 0.00 0.00 0.00 0.04 1.00 1.00 1.00 0.00 0.00 1.00 0.07
## gb.af 0.00 0.00 0.00 0.00 1.00 1.00 1.00 0.00 0.00 1.00 1.00
## gb.cf 0.00 0.00 0.00 1.00 1.00 1.00 1.00 0.00 0.00 1.00 0.00
## asimp.all 0.00 0.00 0.00 1.00 0.00 0.00 0.00 0.00 1.00 0.00 1.00
## aspro.all 0.00 0.00 0.00 1.00 0.00 0.00 0.00 0.35 0.00 0.02 0.27
## sj 0.02 0.11 0.07 0.00 1.00 1.00 0.00 1.00 0.00 1.00 1.00
## sdo 0.40 0.00 0.00 0.07 0.00 0.00 0.00 1.00 0.02 0.00 0.00
## nd 0.11 0.00 0.00 0.02 0.00 0.00 0.00 1.00 1.00 0.00 0.00
## rwa 0.02 0.00 0.00 0.00 0.00 0.00 0.00 1.00 0.27 0.00 0.00
## cas 0.00 0.00 0.00 0.18 0.41 0.02 0.95 0.00 0.00 0.00 0.00
## phq 0.00 0.39 0.00 0.00 0.00 0.04 0.00 0.00 0.00 0.04 0.01
## ps 0.24 0.00 0.00 0.19 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## int 0.00 0.09 0.00 0.02 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## age 0.00 0.00 0.00 0.19 0.00 0.57 0.00 0.42 0.00 0.01 0.00
## income 0.00 0.01 0.06 0.00 0.00 0.14 0.32 0.22 0.00 0.36 0.46
## pol.orient 0.01 0.00 0.00 0.18 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## age income pol.orient
## sp 1.00 1.00 0.00
## sp.1 1.00 1.00 0.00
## sp.2 1.00 1.00 0.00
## sp.3 1.00 1.00 0.00
## sp.4 1.00 1.00 0.00
## sp.5 0.00 1.00 0.00
## sp.6 1.00 1.00 0.00
## gb.rs 1.00 1.00 1.00
## gb.as 0.00 1.00 1.00
## gb.cs 0.17 0.01 1.00
## gb.rf 0.00 0.28 1.00
## gb.af 0.00 1.00 1.00
## gb.cf 0.00 0.00 0.75
## asimp.all 0.00 0.95 0.02
## aspro.all 0.00 1.00 0.12
## sj 1.00 0.51 1.00
## sdo 0.23 0.00 0.00
## nd 1.00 1.00 0.00
## rwa 0.00 1.00 0.00
## cas 1.00 1.00 0.04
## phq 0.00 0.00 0.58
## ps 1.00 1.00 0.00
## int 0.22 1.00 0.00
## age 0.00 0.04 1.00
## income 0.00 0.00 0.13
## pol.orient 0.09 0.00 0.00
##
## To see confidence intervals of the correlations, print with the short=FALSE option
#bootstrapped confidence intervals#
data.ci <- cor.ci(data [,c("sp", "sp.1", "sp.2", "sp.3", "sp.4", "sp.5", "sp.6",
"gb.rs", "gb.as", "gb.cs", "gb.rf", "gb.af", "gb.cf",
"asimp.all", "aspro.all",
"sj", "sdo", "nd", "rwa",
"cas",
"phq",
"ps", "int",
"age", "income", "pol.orient")])
#to show the upper and lower confidence intervals#
ci <- cor.plot.upperLowerCi(data.ci)
#print the confidence intervals in matrix form#
ci
##
## High and low confidence intervals
## sp sp.1 sp.2 sp.3 sp.4 sp.5 sp.6 gb.rs gb.s gb.cs gb.rf
## sp 1.00 0.90 0.66 0.81 0.88 0.72 0.85 -0.18 -0.09 -0.06 0.12
## sp.1 0.87 1.00 0.46 0.66 0.73 0.67 0.71 -0.21 -0.09 -0.08 0.08
## sp.2 0.57 0.35 1.00 0.46 0.41 0.15 0.37 -0.15 -0.16 -0.14 0.23
## sp.3 0.76 0.57 0.34 1.00 0.75 0.53 0.68 -0.17 -0.10 0.09 0.11
## sp.4 0.85 0.66 0.30 0.67 1.00 0.67 0.88 -0.13 0.06 0.11 0.09
## sp.5 0.64 0.58 0.01 0.42 0.59 1.00 0.64 -0.08 0.14 0.13 -0.16
## sp.6 0.81 0.63 0.26 0.58 0.84 0.55 1.00 -0.13 -0.06 0.08 0.10
## gb.rs -0.06 -0.08 -0.03 -0.06 -0.01 0.04 0.00 1.00 0.49 0.34 -0.44
## gb.as 0.03 0.04 -0.04 0.04 -0.06 0.02 0.05 0.35 1.00 0.37 -0.39
## gb.cs 0.06 0.03 0.00 -0.05 0.00 0.01 -0.03 0.22 0.24 1.00 0.06
## gb.rf 0.00 -0.04 0.11 -0.01 -0.03 -0.03 -0.03 -0.33 -0.27 -0.07 1.00
## gb.af 0.00 -0.01 0.06 -0.04 -0.02 0.01 -0.02 -0.19 -0.44 -0.03 0.59
## gb.cf 0.05 0.04 0.09 0.05 0.02 -0.12 0.01 -0.25 -0.32 -0.07 0.59
## asimp.all 0.16 0.09 0.21 0.19 0.12 -0.03 0.07 -0.06 -0.07 0.03 0.10
## aspro.all 0.12 0.12 0.14 0.12 0.06 -0.05 0.03 -0.13 -0.15 -0.05 0.13
## sj -0.14 -0.14 0.01 0.04 -0.12 -0.16 -0.17 0.07 -0.01 0.04 -0.05
## sdo 0.32 0.27 0.13 0.27 0.28 0.21 0.24 0.00 0.04 0.01 -0.04
## nd 0.34 0.30 0.15 0.32 0.30 0.19 0.24 0.04 0.05 0.00 -0.04
## rwa 0.39 0.31 0.21 0.26 0.32 0.27 0.33 0.02 -0.03 -0.03 -0.01
## cas -0.07 -0.10 0.11 0.00 -0.13 -0.30 -0.09 -0.02 -0.06 -0.02 0.19
## phq -0.03 -0.01 0.00 -0.07 -0.07 -0.09 -0.09 -0.27 -0.33 -0.19 0.41
## ps -0.52 -0.42 -0.17 -0.42 -0.54 -0.39 -0.51 -0.03 -0.03 0.02 0.05
## int -0.49 -0.47 -0.22 -0.34 -0.43 -0.37 -0.37 0.00 -0.04 0.07 0.03
## age 0.01 0.02 -0.03 -0.04 -0.03 0.07 -0.02 -0.02 0.08 -0.05 -0.13
## income 0.05 0.05 0.02 -0.05 -0.05 0.06 0.06 0.00 -0.05 0.04 -0.04
## pol.orient 0.31 0.30 0.07 0.22 0.29 0.25 0.28 0.01 0.06 -0.04 0.06
## gb.f gb.cf asm. asp. sj sdo nd rwa cas phq ps
## sp 0.13 -0.07 0.27 0.25 -0.27 0.45 0.44 0.48 -0.18 -0.16 -0.62
## sp.1 0.12 -0.08 0.21 0.23 -0.28 0.40 0.39 0.40 -0.21 -0.15 -0.53
## sp.2 0.19 0.21 0.31 0.27 -0.12 0.28 0.27 0.34 0.23 0.14 -0.30
## sp.3 0.08 -0.07 0.29 0.24 -0.10 0.39 0.44 0.37 -0.12 -0.18 -0.54
## sp.4 0.12 -0.10 0.23 0.18 -0.26 0.41 0.40 0.43 -0.24 -0.19 -0.65
## sp.5 -0.12 -0.23 0.09 0.09 -0.29 0.35 0.31 0.39 -0.39 -0.23 -0.51
## sp.6 0.13 -0.11 0.19 0.16 -0.30 0.38 0.37 0.45 -0.20 -0.20 -0.62
## gb.rs -0.32 -0.36 -0.19 -0.26 0.20 -0.12 -0.08 -0.10 -0.14 -0.38 0.10
## gb.as -0.54 -0.43 -0.18 -0.26 0.13 -0.10 -0.06 0.09 -0.18 -0.45 0.10
## gb.cs 0.11 -0.21 0.15 0.07 0.17 0.14 0.12 0.10 0.09 -0.33 -0.11
## gb.rf 0.67 0.68 0.23 0.26 -0.18 0.08 0.08 0.11 0.32 0.53 -0.08
## gb.af 1.00 0.65 0.19 0.27 -0.22 0.10 0.09 -0.09 0.26 0.54 -0.09
## gb.cf 0.55 1.00 0.21 0.26 -0.11 -0.11 0.10 -0.14 0.34 0.62 0.11
## asimp.all 0.06 0.09 1.00 0.64 0.13 0.33 0.34 0.32 0.21 0.08 -0.25
## aspro.all 0.16 0.15 0.55 1.00 -0.12 0.26 0.24 0.25 0.17 0.19 -0.19
## sj -0.09 0.00 0.01 0.01 1.00 0.10 0.14 -0.24 0.11 -0.20 0.15
## sdo -0.04 0.02 0.23 0.16 -0.04 1.00 0.38 0.53 -0.09 -0.18 -0.42
## nd -0.02 -0.01 0.22 0.12 0.00 0.27 1.00 0.36 0.12 -0.13 -0.46
## rwa 0.05 -0.01 0.21 0.13 -0.10 0.44 0.25 1.00 0.09 -0.12 -0.37
## cas 0.15 0.22 0.08 0.04 -0.01 0.02 0.01 -0.02 1.00 0.29 0.22
## phq 0.44 0.53 -0.04 0.07 -0.09 -0.06 -0.01 0.00 0.16 1.00 0.18
## ps 0.04 -0.02 -0.13 -0.06 0.02 -0.30 -0.33 -0.25 0.11 0.05 1.00
## int -0.01 0.08 -0.01 -0.05 0.01 -0.24 -0.15 -0.21 0.35 0.02 0.38
## age -0.15 -0.22 -0.20 -0.16 0.01 0.04 -0.06 0.12 -0.07 -0.06 0.00
## income -0.02 -0.05 0.01 0.00 0.02 0.05 -0.01 -0.05 0.03 -0.07 0.03
## pol.orient 0.05 -0.01 0.06 0.06 0.03 0.36 0.19 0.42 0.02 0.01 -0.29
## int age incm pl.r
## sp -0.58 0.14 -0.08 0.42
## sp.1 -0.55 0.14 -0.06 0.40
## sp.2 -0.33 0.10 -0.12 0.20
## sp.3 -0.44 0.08 0.08 0.34
## sp.4 -0.53 0.09 0.08 0.40
## sp.5 -0.48 0.20 -0.06 0.37
## sp.6 -0.48 0.11 -0.08 0.40
## gb.rs 0.11 0.09 0.12 -0.11
## gb.as 0.08 0.22 0.06 -0.06
## gb.cs 0.19 -0.16 0.17 0.08
## gb.rf 0.15 -0.23 -0.17 -0.07
## gb.af 0.11 -0.25 -0.13 -0.07
## gb.cf 0.19 -0.33 -0.19 -0.12
## asimp.all -0.12 -0.31 0.13 0.18
## aspro.all -0.16 -0.27 0.12 0.18
## sj 0.15 -0.11 0.14 -0.11
## sdo -0.36 0.15 0.18 0.48
## nd -0.26 0.07 0.10 0.30
## rwa -0.32 0.27 0.08 0.52
## cas 0.46 0.07 -0.09 -0.13
## phq 0.15 -0.18 -0.19 -0.12
## ps 0.49 0.13 -0.11 -0.41
## int 1.00 -0.17 -0.08 -0.40
## age -0.05 1.00 0.15 0.12
## income 0.05 0.04 1.00 0.15
## pol.orient -0.28 -0.01 0.03 1.00
alpha (data[c("sp01", "sp02", "sp03", "sp04", "sp05", "sp06", "sp07",
"sp08", "sp09", "sp10", "sp11", "sp12", "sp13", "sp14", "sp15",
"sp19", "sp20", "sp21", "sp22",
"sp16", "sp17", "sp18",
"sp23.i", "sp24.i", "sp25", "sp26",
"sp27", "sp28", "sp29", "sp30")])
##
## Reliability analysis
## Call: alpha(x = data[c("sp01", "sp02", "sp03", "sp04", "sp05", "sp06",
## "sp07", "sp08", "sp09", "sp10", "sp11", "sp12", "sp13", "sp14",
## "sp15", "sp19", "sp20", "sp21", "sp22", "sp16", "sp17", "sp18",
## "sp23.i", "sp24.i", "sp25", "sp26", "sp27", "sp28", "sp29",
## "sp30")])
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.95 0.95 0.97 0.39 19 0.0021 3 1.1 0.39
##
## lower alpha upper 95% confidence boundaries
## 0.95 0.95 0.96
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## sp01 0.95 0.95 0.97 0.39 19 0.0022 0.043 0.38
## sp02 0.95 0.95 0.97 0.38 18 0.0023 0.041 0.38
## sp03 0.95 0.95 0.97 0.39 18 0.0023 0.042 0.38
## sp04 0.95 0.95 0.97 0.40 19 0.0022 0.043 0.39
## sp05 0.95 0.95 0.97 0.39 19 0.0022 0.043 0.38
## sp06 0.95 0.95 0.97 0.39 18 0.0022 0.042 0.38
## sp07 0.95 0.95 0.97 0.39 18 0.0023 0.042 0.38
## sp08 0.95 0.95 0.97 0.40 20 0.0021 0.040 0.40
## sp09 0.95 0.95 0.97 0.41 20 0.0020 0.035 0.41
## sp10 0.95 0.95 0.97 0.40 19 0.0021 0.041 0.41
## sp11 0.95 0.95 0.97 0.40 19 0.0022 0.044 0.41
## sp12 0.95 0.95 0.97 0.39 19 0.0022 0.043 0.40
## sp13 0.95 0.95 0.97 0.40 19 0.0022 0.042 0.40
## sp14 0.95 0.95 0.97 0.40 19 0.0021 0.042 0.41
## sp15 0.95 0.95 0.97 0.40 19 0.0021 0.041 0.40
## sp19 0.95 0.95 0.97 0.39 18 0.0022 0.042 0.38
## sp20 0.95 0.95 0.97 0.39 19 0.0022 0.043 0.38
## sp21 0.95 0.95 0.97 0.39 19 0.0022 0.043 0.38
## sp22 0.95 0.95 0.97 0.39 19 0.0022 0.042 0.38
## sp16 0.95 0.95 0.97 0.39 18 0.0023 0.041 0.38
## sp17 0.95 0.95 0.97 0.39 18 0.0023 0.041 0.38
## sp18 0.95 0.95 0.97 0.39 18 0.0023 0.041 0.38
## sp23.i 0.95 0.95 0.97 0.41 20 0.0021 0.038 0.41
## sp24.i 0.95 0.95 0.97 0.40 20 0.0021 0.040 0.41
## sp25 0.95 0.95 0.97 0.39 19 0.0022 0.042 0.38
## sp26 0.95 0.95 0.97 0.39 18 0.0023 0.042 0.37
## sp27 0.95 0.95 0.97 0.39 18 0.0022 0.041 0.38
## sp28 0.95 0.95 0.97 0.39 18 0.0023 0.041 0.38
## sp29 0.95 0.95 0.97 0.39 18 0.0023 0.041 0.38
## sp30 0.95 0.95 0.97 0.39 18 0.0023 0.041 0.38
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## sp01 1011 0.68 0.68 0.66 0.65 3.0 1.8
## sp02 1011 0.82 0.81 0.81 0.80 2.7 1.8
## sp03 1011 0.79 0.78 0.77 0.76 3.1 1.8
## sp04 1011 0.60 0.59 0.57 0.56 3.9 1.8
## sp05 1011 0.70 0.69 0.68 0.67 3.5 1.8
## sp06 1011 0.74 0.73 0.73 0.72 3.4 1.8
## sp07 1011 0.80 0.80 0.79 0.78 2.7 1.6
## sp08 1011 0.39 0.41 0.39 0.35 3.0 1.4
## sp09 1011 0.22 0.23 0.21 0.17 2.8 1.6
## sp10 1011 0.44 0.45 0.43 0.40 2.8 1.6
## sp11 1011 0.56 0.57 0.55 0.53 3.8 1.6
## sp12 1011 0.62 0.63 0.62 0.58 3.2 1.7
## sp13 1011 0.55 0.56 0.55 0.51 2.8 1.5
## sp14 1011 0.48 0.49 0.46 0.44 2.8 1.5
## sp15 1011 0.51 0.53 0.52 0.48 3.1 1.6
## sp19 1011 0.72 0.73 0.72 0.70 2.1 1.4
## sp20 1011 0.65 0.66 0.65 0.63 2.4 1.5
## sp21 1011 0.63 0.63 0.62 0.60 2.8 1.5
## sp22 1011 0.68 0.69 0.68 0.66 2.1 1.3
## sp16 1011 0.79 0.79 0.79 0.78 2.4 1.6
## sp17 1011 0.80 0.80 0.80 0.78 2.7 1.7
## sp18 1011 0.81 0.80 0.80 0.79 2.7 1.9
## sp23.i 1011 0.34 0.33 0.31 0.29 4.6 1.6
## sp24.i 1011 0.42 0.41 0.39 0.38 4.1 1.7
## sp25 1011 0.69 0.68 0.67 0.66 3.7 1.7
## sp26 1011 0.76 0.75 0.75 0.73 3.3 1.8
## sp27 1011 0.74 0.74 0.73 0.72 2.2 1.6
## sp28 1011 0.76 0.75 0.75 0.73 2.4 1.7
## sp29 1011 0.78 0.77 0.77 0.75 2.6 1.7
## sp30 1011 0.79 0.79 0.79 0.77 2.6 1.7
##
## Non missing response frequency for each item
## 1 2 3 4 5 6 7 miss
## sp01 0.26 0.18 0.21 0.13 0.11 0.05 0.05 0
## sp02 0.33 0.18 0.21 0.11 0.08 0.04 0.05 0
## sp03 0.25 0.15 0.21 0.13 0.13 0.06 0.06 0
## sp04 0.14 0.12 0.16 0.15 0.25 0.09 0.09 0
## sp05 0.19 0.15 0.22 0.13 0.17 0.08 0.07 0
## sp06 0.20 0.13 0.23 0.17 0.15 0.06 0.06 0
## sp07 0.31 0.20 0.24 0.11 0.06 0.04 0.04 0
## sp08 0.23 0.16 0.19 0.29 0.11 0.02 0.00 0
## sp09 0.31 0.15 0.17 0.20 0.11 0.04 0.02 0
## sp10 0.29 0.15 0.19 0.22 0.10 0.03 0.02 0
## sp11 0.10 0.11 0.18 0.29 0.19 0.08 0.06 0
## sp12 0.24 0.12 0.18 0.25 0.13 0.04 0.04 0
## sp13 0.30 0.15 0.20 0.24 0.08 0.02 0.01 0
## sp14 0.25 0.19 0.21 0.20 0.10 0.03 0.01 0
## sp15 0.25 0.13 0.19 0.24 0.13 0.04 0.02 0
## sp19 0.48 0.19 0.18 0.10 0.03 0.02 0.01 0
## sp20 0.40 0.20 0.16 0.15 0.06 0.02 0.01 0
## sp21 0.28 0.19 0.20 0.21 0.08 0.02 0.02 0
## sp22 0.45 0.23 0.16 0.10 0.05 0.01 0.01 0
## sp16 0.41 0.22 0.15 0.10 0.06 0.02 0.03 0
## sp17 0.34 0.20 0.17 0.12 0.10 0.04 0.04 0
## sp18 0.38 0.19 0.15 0.09 0.07 0.05 0.06 0
## sp23.i 0.01 0.06 0.23 0.20 0.19 0.13 0.18 0
## sp24.i 0.05 0.11 0.28 0.18 0.16 0.10 0.12 0
## sp25 0.12 0.12 0.25 0.22 0.13 0.08 0.08 0
## sp26 0.21 0.16 0.21 0.16 0.12 0.07 0.08 0
## sp27 0.52 0.16 0.12 0.10 0.05 0.03 0.03 0
## sp28 0.44 0.20 0.12 0.11 0.06 0.04 0.04 0
## sp29 0.36 0.20 0.17 0.14 0.06 0.04 0.04 0
## sp30 0.37 0.20 0.15 0.13 0.07 0.04 0.04 0
alpha (data[c("sp01", "sp02", "sp03", "sp04", "sp05", "sp06", "sp07")])
##
## Reliability analysis
## Call: alpha(x = data[c("sp01", "sp02", "sp03", "sp04", "sp05", "sp06",
## "sp07")])
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.92 0.92 0.92 0.64 12 0.0037 3.2 1.5 0.65
##
## lower alpha upper 95% confidence boundaries
## 0.92 0.92 0.93
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## sp01 0.92 0.92 0.91 0.65 11.3 0.0040 0.0060 0.67
## sp02 0.91 0.91 0.90 0.62 9.8 0.0046 0.0053 0.64
## sp03 0.91 0.91 0.90 0.62 9.6 0.0047 0.0062 0.62
## sp04 0.92 0.92 0.91 0.67 12.2 0.0037 0.0035 0.67
## sp05 0.91 0.91 0.90 0.64 10.5 0.0043 0.0080 0.65
## sp06 0.91 0.91 0.90 0.63 10.1 0.0044 0.0081 0.64
## sp07 0.91 0.91 0.90 0.62 9.9 0.0045 0.0050 0.62
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## sp01 1011 0.78 0.78 0.73 0.70 3.0 1.8
## sp02 1011 0.87 0.87 0.85 0.81 2.7 1.8
## sp03 1011 0.88 0.88 0.86 0.83 3.1 1.8
## sp04 1011 0.74 0.74 0.67 0.65 3.9 1.8
## sp05 1011 0.83 0.82 0.79 0.76 3.5 1.8
## sp06 1011 0.85 0.85 0.82 0.79 3.4 1.8
## sp07 1011 0.86 0.86 0.84 0.80 2.7 1.6
##
## Non missing response frequency for each item
## 1 2 3 4 5 6 7 miss
## sp01 0.26 0.18 0.21 0.13 0.11 0.05 0.05 0
## sp02 0.33 0.18 0.21 0.11 0.08 0.04 0.05 0
## sp03 0.25 0.15 0.21 0.13 0.13 0.06 0.06 0
## sp04 0.14 0.12 0.16 0.15 0.25 0.09 0.09 0
## sp05 0.19 0.15 0.22 0.13 0.17 0.08 0.07 0
## sp06 0.20 0.13 0.23 0.17 0.15 0.06 0.06 0
## sp07 0.31 0.20 0.24 0.11 0.06 0.04 0.04 0
alpha (data[c("sp08", "sp09", "sp10", "sp11", "sp12", "sp13", "sp14", "sp15")])
##
## Reliability analysis
## Call: alpha(x = data[c("sp08", "sp09", "sp10", "sp11", "sp12", "sp13",
## "sp14", "sp15")])
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.89 0.89 0.89 0.51 8.4 0.0051 3 1.2 0.52
##
## lower alpha upper 95% confidence boundaries
## 0.88 0.89 0.9
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## sp08 0.88 0.88 0.88 0.51 7.2 0.0058 0.0144 0.49
## sp09 0.89 0.89 0.88 0.53 7.9 0.0053 0.0110 0.53
## sp10 0.88 0.88 0.87 0.50 7.1 0.0059 0.0136 0.49
## sp11 0.89 0.89 0.89 0.54 8.2 0.0052 0.0099 0.54
## sp12 0.87 0.87 0.86 0.49 6.7 0.0063 0.0107 0.47
## sp13 0.87 0.87 0.87 0.50 6.9 0.0061 0.0122 0.52
## sp14 0.89 0.89 0.89 0.54 8.2 0.0053 0.0121 0.55
## sp15 0.87 0.87 0.86 0.48 6.5 0.0064 0.0097 0.47
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## sp08 1011 0.76 0.76 0.72 0.68 3.0 1.4
## sp09 1011 0.69 0.69 0.63 0.59 2.8 1.6
## sp10 1011 0.78 0.78 0.74 0.70 2.8 1.6
## sp11 1011 0.66 0.66 0.59 0.55 3.8 1.6
## sp12 1011 0.84 0.83 0.82 0.77 3.2 1.7
## sp13 1011 0.81 0.81 0.78 0.74 2.8 1.5
## sp14 1011 0.66 0.66 0.58 0.55 2.8 1.5
## sp15 1011 0.86 0.86 0.85 0.80 3.1 1.6
##
## Non missing response frequency for each item
## 1 2 3 4 5 6 7 miss
## sp08 0.23 0.16 0.19 0.29 0.11 0.02 0.00 0
## sp09 0.31 0.15 0.17 0.20 0.11 0.04 0.02 0
## sp10 0.29 0.15 0.19 0.22 0.10 0.03 0.02 0
## sp11 0.10 0.11 0.18 0.29 0.19 0.08 0.06 0
## sp12 0.24 0.12 0.18 0.25 0.13 0.04 0.04 0
## sp13 0.30 0.15 0.20 0.24 0.08 0.02 0.01 0
## sp14 0.25 0.19 0.21 0.20 0.10 0.03 0.01 0
## sp15 0.25 0.13 0.19 0.24 0.13 0.04 0.02 0
alpha (data[c("sp19", "sp20", "sp21", "sp22")])
##
## Reliability analysis
## Call: alpha(x = data[c("sp19", "sp20", "sp21", "sp22")])
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.87 0.88 0.85 0.64 7.1 0.0066 2.3 1.2 0.63
##
## lower alpha upper 95% confidence boundaries
## 0.86 0.87 0.89
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## sp19 0.82 0.82 0.76 0.61 4.7 0.0098 0.0027 0.58
## sp20 0.84 0.84 0.79 0.64 5.3 0.0090 0.0079 0.59
## sp21 0.87 0.87 0.82 0.69 6.8 0.0071 0.0017 0.67
## sp22 0.82 0.83 0.76 0.61 4.7 0.0096 0.0024 0.59
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## sp19 1011 0.87 0.88 0.83 0.77 2.1 1.4
## sp20 1011 0.85 0.85 0.78 0.73 2.4 1.5
## sp21 1011 0.81 0.81 0.69 0.65 2.8 1.5
## sp22 1011 0.87 0.88 0.83 0.77 2.1 1.3
##
## Non missing response frequency for each item
## 1 2 3 4 5 6 7 miss
## sp19 0.48 0.19 0.18 0.10 0.03 0.02 0.01 0
## sp20 0.40 0.20 0.16 0.15 0.06 0.02 0.01 0
## sp21 0.28 0.19 0.20 0.21 0.08 0.02 0.02 0
## sp22 0.45 0.23 0.16 0.10 0.05 0.01 0.01 0
alpha (data[c("sp16", "sp17", "sp18")])
##
## Reliability analysis
## Call: alpha(x = data[c("sp16", "sp17", "sp18")])
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.91 0.92 0.88 0.78 11 0.0047 2.6 1.6 0.77
##
## lower alpha upper 95% confidence boundaries
## 0.9 0.91 0.92
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## sp16 0.86 0.86 0.76 0.76 6.3 0.0087 NA 0.76
## sp17 0.86 0.87 0.77 0.77 6.5 0.0085 NA 0.77
## sp18 0.91 0.91 0.83 0.83 9.8 0.0059 NA 0.83
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## sp16 1011 0.93 0.94 0.89 0.85 2.4 1.6
## sp17 1011 0.93 0.93 0.89 0.84 2.7 1.7
## sp18 1011 0.92 0.91 0.83 0.80 2.7 1.9
##
## Non missing response frequency for each item
## 1 2 3 4 5 6 7 miss
## sp16 0.41 0.22 0.15 0.10 0.06 0.02 0.03 0
## sp17 0.34 0.20 0.17 0.12 0.10 0.04 0.04 0
## sp18 0.38 0.19 0.15 0.09 0.07 0.05 0.06 0
alpha (data[c("sp23.i", "sp24.i", "sp25", "sp26")])
##
## Reliability analysis
## Call: alpha(x = data[c("sp23.i", "sp24.i", "sp25", "sp26")])
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.83 0.83 0.81 0.56 5 0.0086 3.9 1.4 0.54
##
## lower alpha upper 95% confidence boundaries
## 0.82 0.83 0.85
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## sp23.i 0.82 0.82 0.76 0.60 4.4 0.010 0.0096 0.55
## sp24.i 0.79 0.79 0.73 0.55 3.7 0.012 0.0205 0.51
## sp25 0.76 0.77 0.70 0.52 3.3 0.013 0.0080 0.53
## sp26 0.79 0.79 0.72 0.56 3.8 0.011 0.0025 0.55
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## sp23.i 1011 0.77 0.78 0.67 0.60 4.6 1.6
## sp24.i 1011 0.82 0.82 0.74 0.67 4.1 1.7
## sp25 1011 0.85 0.85 0.79 0.72 3.7 1.7
## sp26 1011 0.83 0.82 0.75 0.67 3.3 1.8
##
## Non missing response frequency for each item
## 1 2 3 4 5 6 7 miss
## sp23.i 0.01 0.06 0.23 0.20 0.19 0.13 0.18 0
## sp24.i 0.05 0.11 0.28 0.18 0.16 0.10 0.12 0
## sp25 0.12 0.12 0.25 0.22 0.13 0.08 0.08 0
## sp26 0.21 0.16 0.21 0.16 0.12 0.07 0.08 0
alpha (data[c("sp27", "sp28", "sp29", "sp30")])
##
## Reliability analysis
## Call: alpha(x = data[c("sp27", "sp28", "sp29", "sp30")])
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.94 0.94 0.92 0.79 15 0.0031 2.5 1.5 0.79
##
## lower alpha upper 95% confidence boundaries
## 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
## sp27 0.94 0.94 0.91 0.83 15 0.0034 0.00083 0.83
## sp28 0.92 0.92 0.89 0.78 11 0.0046 0.00483 0.76
## sp29 0.92 0.92 0.88 0.79 11 0.0045 0.00151 0.77
## sp30 0.91 0.91 0.87 0.77 10 0.0050 0.00141 0.77
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## sp27 1011 0.88 0.89 0.82 0.80 2.2 1.6
## sp28 1011 0.93 0.93 0.89 0.87 2.4 1.7
## sp29 1011 0.92 0.92 0.90 0.86 2.6 1.7
## sp30 1011 0.94 0.94 0.92 0.89 2.6 1.7
##
## Non missing response frequency for each item
## 1 2 3 4 5 6 7 miss
## sp27 0.52 0.16 0.12 0.10 0.05 0.03 0.03 0
## sp28 0.44 0.20 0.12 0.11 0.06 0.04 0.04 0
## sp29 0.36 0.20 0.17 0.14 0.06 0.04 0.04 0
## sp30 0.37 0.20 0.15 0.13 0.07 0.04 0.04 0
alpha (data[c("gb01", "gb03", "gb02", "gb20")])
##
## Reliability analysis
## Call: alpha(x = data[c("gb01", "gb03", "gb02", "gb20")])
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.79 0.79 0.76 0.49 3.8 0.011 5.1 1 0.47
##
## lower alpha upper 95% confidence boundaries
## 0.77 0.79 0.81
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## gb01 0.77 0.77 0.70 0.53 3.4 0.013 0.0108 0.49
## gb03 0.73 0.74 0.67 0.48 2.8 0.015 0.0204 0.41
## gb02 0.72 0.73 0.65 0.47 2.7 0.015 0.0061 0.49
## gb20 0.72 0.73 0.64 0.47 2.6 0.015 0.0041 0.45
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## gb01 1011 0.77 0.75 0.61 0.54 5.0 1.5
## gb03 1011 0.79 0.79 0.68 0.61 5.0 1.3
## gb02 1011 0.79 0.80 0.72 0.62 5.0 1.3
## gb20 1011 0.79 0.80 0.72 0.62 5.3 1.2
##
## Non missing response frequency for each item
## 1 2 3 4 5 6 7 miss
## gb01 0.02 0.05 0.10 0.10 0.30 0.29 0.14 0
## gb03 0.01 0.03 0.10 0.13 0.35 0.26 0.11 0
## gb02 0.01 0.03 0.07 0.22 0.31 0.23 0.12 0
## gb20 0.01 0.02 0.05 0.14 0.33 0.29 0.16 0
alpha (data[c("gb05", "gb04", "gb06")])
##
## Reliability analysis
## Call: alpha(x = data[c("gb05", "gb04", "gb06")])
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.75 0.75 0.67 0.5 3 0.014 3.1 1.4 0.48
##
## lower alpha upper 95% confidence boundaries
## 0.72 0.75 0.77
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## gb05 0.72 0.72 0.56 0.56 2.6 0.018 NA 0.56
## gb04 0.65 0.65 0.48 0.48 1.9 0.022 NA 0.48
## gb06 0.61 0.62 0.45 0.45 1.6 0.024 NA 0.45
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## gb05 1011 0.77 0.79 0.60 0.53 2.9 1.6
## gb04 1011 0.84 0.82 0.68 0.59 3.6 1.9
## gb06 1011 0.83 0.84 0.71 0.62 2.9 1.7
##
## Non missing response frequency for each item
## 1 2 3 4 5 6 7 miss
## gb05 0.26 0.20 0.18 0.17 0.14 0.04 0.02 0
## gb04 0.22 0.16 0.11 0.14 0.20 0.11 0.07 0
## gb06 0.31 0.18 0.14 0.14 0.15 0.04 0.02 0
alpha (data[c("gb15", "gb14", "gb16")])
##
## Reliability analysis
## Call: alpha(x = data[c("gb15", "gb14", "gb16")])
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.78 0.79 0.72 0.56 3.8 0.011 4.4 1.3 0.58
##
## lower alpha upper 95% confidence boundaries
## 0.76 0.78 0.81
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## gb15 0.72 0.74 0.59 0.59 2.9 0.016 NA 0.59
## gb14 0.66 0.67 0.51 0.51 2.0 0.021 NA 0.51
## gb16 0.73 0.74 0.58 0.58 2.8 0.017 NA 0.58
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## gb15 1011 0.84 0.83 0.69 0.62 4.2 1.6
## gb14 1011 0.88 0.86 0.76 0.67 4.2 1.8
## gb16 1011 0.80 0.83 0.69 0.62 4.8 1.3
##
## Non missing response frequency for each item
## 1 2 3 4 5 6 7 miss
## gb15 0.08 0.08 0.11 0.30 0.22 0.13 0.07 0
## gb14 0.13 0.07 0.09 0.27 0.22 0.14 0.09 0
## gb16 0.02 0.03 0.06 0.28 0.34 0.19 0.08 0
alpha (data[c("gb17", "gb19","gb18")])
##
## Reliability analysis
## Call: alpha(x = data[c("gb17", "gb19", "gb18")])
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.77 0.77 0.7 0.52 3.3 0.012 2.7 1.3 0.54
##
## lower alpha upper 95% confidence boundaries
## 0.74 0.77 0.79
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## gb17 0.60 0.60 0.43 0.43 1.5 0.025 NA 0.43
## gb19 0.69 0.70 0.54 0.54 2.3 0.019 NA 0.54
## gb18 0.75 0.75 0.60 0.60 3.1 0.016 NA 0.60
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## gb17 1011 0.88 0.86 0.77 0.68 2.9 1.8
## gb19 1011 0.82 0.82 0.68 0.60 3.0 1.6
## gb18 1011 0.77 0.79 0.61 0.54 2.1 1.5
##
## Non missing response frequency for each item
## 1 2 3 4 5 6 7 miss
## gb17 0.31 0.18 0.14 0.15 0.14 0.05 0.04 0
## gb19 0.26 0.19 0.17 0.18 0.15 0.04 0.01 0
## gb18 0.53 0.17 0.11 0.09 0.06 0.02 0.01 0
alpha (data[c("asimp01", "asimp12", "asimp02", "asimp13",
"asimp10", "asimp21", "asimp07", "asimp18",
"asimp09", "asimp20", "asimp04", "asimp15",
"asimp06", "asimp17", "asimp08", "asimp19",
"asimp03", "asimp14", "asimp05", "asimp16",
"asimp11", "asimp22")])
##
## Reliability analysis
## Call: alpha(x = data[c("asimp01", "asimp12", "asimp02", "asimp13",
## "asimp10", "asimp21", "asimp07", "asimp18", "asimp09", "asimp20",
## "asimp04", "asimp15", "asimp06", "asimp17", "asimp08", "asimp19",
## "asimp03", "asimp14", "asimp05", "asimp16", "asimp11", "asimp22")])
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.84 0.84 0.87 0.19 5.3 0.0073 4.5 0.76 0.19
##
## lower alpha upper 95% confidence boundaries
## 0.82 0.84 0.85
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## asimp01 0.83 0.84 0.87 0.20 5.1 0.0075 0.014 0.19
## asimp12 0.83 0.83 0.86 0.19 4.9 0.0077 0.014 0.18
## asimp02 0.83 0.83 0.87 0.19 5.0 0.0077 0.014 0.19
## asimp13 0.83 0.84 0.87 0.20 5.1 0.0075 0.014 0.19
## asimp10 0.83 0.83 0.87 0.19 5.0 0.0077 0.014 0.18
## asimp21 0.83 0.84 0.87 0.19 5.1 0.0075 0.013 0.19
## asimp07 0.83 0.83 0.87 0.19 5.0 0.0076 0.013 0.19
## asimp18 0.83 0.83 0.86 0.19 5.0 0.0076 0.013 0.19
## asimp09 0.84 0.84 0.87 0.20 5.2 0.0075 0.013 0.19
## asimp20 0.83 0.84 0.87 0.19 5.1 0.0075 0.013 0.19
## asimp04 0.83 0.83 0.87 0.19 5.0 0.0076 0.014 0.19
## asimp15 0.83 0.83 0.87 0.19 5.0 0.0077 0.014 0.18
## asimp06 0.83 0.84 0.87 0.20 5.1 0.0076 0.013 0.19
## asimp17 0.83 0.83 0.86 0.19 5.0 0.0078 0.013 0.19
## asimp08 0.83 0.83 0.86 0.19 5.0 0.0078 0.012 0.19
## asimp19 0.83 0.83 0.87 0.19 5.0 0.0077 0.013 0.19
## asimp03 0.84 0.84 0.87 0.20 5.2 0.0075 0.014 0.20
## asimp14 0.83 0.83 0.87 0.19 5.0 0.0078 0.014 0.18
## asimp05 0.83 0.83 0.87 0.19 4.9 0.0078 0.014 0.18
## asimp16 0.83 0.83 0.86 0.19 4.9 0.0079 0.014 0.18
## asimp11 0.83 0.84 0.86 0.20 5.1 0.0075 0.012 0.19
## asimp22 0.83 0.84 0.86 0.20 5.1 0.0075 0.012 0.19
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## asimp01 1011 0.41 0.43 0.38 0.34 5.8 1.5
## asimp12 1011 0.53 0.55 0.52 0.46 5.5 1.5
## asimp02 1011 0.52 0.52 0.49 0.44 4.8 1.7
## asimp13 1011 0.44 0.44 0.40 0.35 4.8 1.7
## asimp10 1011 0.49 0.52 0.49 0.43 5.7 1.3
## asimp21 1011 0.42 0.46 0.42 0.35 5.9 1.3
## asimp07 1011 0.45 0.49 0.46 0.38 5.9 1.3
## asimp18 1011 0.44 0.48 0.46 0.38 6.3 1.2
## asimp09 1011 0.36 0.40 0.36 0.30 6.2 1.2
## asimp20 1011 0.42 0.46 0.43 0.36 6.0 1.2
## asimp04 1011 0.50 0.48 0.44 0.41 4.8 2.0
## asimp15 1011 0.51 0.50 0.46 0.42 4.6 1.7
## asimp06 1011 0.45 0.42 0.38 0.36 2.6 1.7
## asimp17 1011 0.54 0.52 0.49 0.46 2.6 1.6
## asimp08 1011 0.56 0.53 0.51 0.48 2.7 1.7
## asimp19 1011 0.52 0.49 0.46 0.44 2.6 1.6
## asimp03 1011 0.39 0.38 0.32 0.30 4.5 1.7
## asimp14 1011 0.53 0.53 0.49 0.46 4.4 1.7
## asimp05 1011 0.56 0.54 0.51 0.48 4.2 1.8
## asimp16 1011 0.58 0.57 0.55 0.51 4.3 1.7
## asimp11 1011 0.45 0.42 0.42 0.36 2.3 1.8
## asimp22 1011 0.45 0.42 0.42 0.36 2.2 1.7
##
## Non missing response frequency for each item
## 1 2 3 4 5 6 7 miss
## asimp01 0.03 0.01 0.02 0.12 0.13 0.21 0.47 0
## asimp12 0.02 0.02 0.05 0.17 0.18 0.24 0.31 0
## asimp02 0.06 0.05 0.09 0.22 0.21 0.17 0.20 0
## asimp13 0.07 0.04 0.06 0.22 0.22 0.18 0.21 0
## asimp10 0.01 0.01 0.02 0.14 0.18 0.29 0.34 0
## asimp21 0.01 0.01 0.03 0.11 0.15 0.25 0.44 0
## asimp07 0.01 0.01 0.02 0.10 0.16 0.24 0.45 0
## asimp18 0.01 0.01 0.02 0.05 0.09 0.20 0.62 0
## asimp09 0.01 0.01 0.01 0.08 0.09 0.20 0.60 0
## asimp20 0.01 0.01 0.03 0.09 0.12 0.28 0.47 0
## asimp04 0.15 0.02 0.04 0.17 0.16 0.20 0.26 0
## asimp15 0.08 0.05 0.10 0.24 0.20 0.16 0.18 0
## asimp06 0.41 0.15 0.11 0.20 0.08 0.03 0.03 0
## asimp17 0.37 0.16 0.13 0.20 0.07 0.04 0.02 0
## asimp08 0.35 0.18 0.15 0.19 0.07 0.04 0.03 0
## asimp19 0.37 0.19 0.15 0.16 0.06 0.04 0.03 0
## asimp03 0.06 0.07 0.10 0.28 0.18 0.16 0.14 0
## asimp14 0.08 0.06 0.09 0.29 0.21 0.16 0.11 0
## asimp05 0.10 0.08 0.10 0.28 0.19 0.13 0.12 0
## asimp16 0.09 0.06 0.10 0.29 0.21 0.16 0.10 0
## asimp11 0.55 0.14 0.07 0.09 0.05 0.05 0.05 0
## asimp22 0.57 0.13 0.07 0.09 0.05 0.05 0.04 0
alpha (data[c("aspro01", "aspro12", "aspro02", "aspro13",
"aspro10", "aspro21", "aspro07", "aspro18",
"aspro09", "aspro20", "aspro04", "aspro15",
"aspro06", "aspro17", "aspro08", "aspro19",
"aspro03", "aspro14", "aspro05", "aspro16",
"aspro11", "aspro22")])
##
## Reliability analysis
## Call: alpha(x = data[c("aspro01", "aspro12", "aspro02", "aspro13",
## "aspro10", "aspro21", "aspro07", "aspro18", "aspro09", "aspro20",
## "aspro04", "aspro15", "aspro06", "aspro17", "aspro08", "aspro19",
## "aspro03", "aspro14", "aspro05", "aspro16", "aspro11", "aspro22")])
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.89 0.89 0.91 0.27 8.2 0.005 4.1 0.95 0.27
##
## lower alpha upper 95% confidence boundaries
## 0.88 0.89 0.9
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## aspro01 0.89 0.89 0.91 0.27 7.8 0.0052 0.012 0.27
## aspro12 0.88 0.88 0.90 0.27 7.7 0.0053 0.012 0.26
## aspro02 0.89 0.89 0.91 0.27 7.8 0.0052 0.013 0.27
## aspro13 0.89 0.89 0.91 0.28 8.0 0.0051 0.012 0.28
## aspro10 0.88 0.89 0.91 0.27 7.7 0.0052 0.013 0.26
## aspro21 0.88 0.88 0.90 0.27 7.7 0.0053 0.012 0.27
## aspro07 0.88 0.88 0.90 0.27 7.6 0.0053 0.012 0.26
## aspro18 0.88 0.88 0.90 0.27 7.6 0.0053 0.011 0.26
## aspro09 0.89 0.89 0.91 0.28 8.0 0.0051 0.012 0.27
## aspro20 0.89 0.89 0.91 0.27 7.8 0.0052 0.012 0.27
## aspro04 0.88 0.89 0.91 0.27 7.7 0.0052 0.012 0.26
## aspro15 0.88 0.88 0.90 0.27 7.7 0.0053 0.012 0.26
## aspro06 0.89 0.89 0.91 0.27 7.9 0.0051 0.013 0.27
## aspro17 0.88 0.88 0.90 0.27 7.7 0.0053 0.012 0.26
## aspro08 0.88 0.88 0.90 0.27 7.6 0.0053 0.012 0.26
## aspro19 0.88 0.89 0.91 0.27 7.7 0.0053 0.012 0.26
## aspro03 0.89 0.89 0.91 0.28 8.2 0.0050 0.012 0.28
## aspro14 0.88 0.88 0.90 0.27 7.6 0.0053 0.013 0.26
## aspro05 0.88 0.88 0.91 0.27 7.7 0.0053 0.013 0.26
## aspro16 0.88 0.88 0.90 0.26 7.5 0.0054 0.012 0.26
## aspro11 0.89 0.89 0.90 0.28 8.1 0.0050 0.011 0.28
## aspro22 0.89 0.89 0.90 0.27 7.9 0.0051 0.011 0.27
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## aspro01 1011 0.53 0.54 0.51 0.47 5.1 1.7
## aspro12 1011 0.59 0.60 0.58 0.54 4.9 1.6
## aspro02 1011 0.53 0.53 0.50 0.47 4.1 1.7
## aspro13 1011 0.44 0.44 0.40 0.37 4.4 1.8
## aspro10 1011 0.55 0.57 0.54 0.50 5.1 1.4
## aspro21 1011 0.58 0.59 0.57 0.52 4.8 1.6
## aspro07 1011 0.61 0.62 0.61 0.56 4.6 1.6
## aspro18 1011 0.61 0.62 0.61 0.56 4.6 1.7
## aspro09 1011 0.42 0.44 0.40 0.36 5.9 1.4
## aspro20 1011 0.52 0.53 0.51 0.46 4.8 1.6
## aspro04 1011 0.58 0.57 0.54 0.51 4.0 2.1
## aspro15 1011 0.60 0.60 0.57 0.54 3.6 1.9
## aspro06 1011 0.50 0.49 0.45 0.43 3.2 1.9
## aspro17 1011 0.61 0.60 0.58 0.55 2.9 1.7
## aspro08 1011 0.63 0.62 0.61 0.58 3.0 1.7
## aspro19 1011 0.59 0.58 0.55 0.53 3.0 1.9
## aspro03 1011 0.35 0.35 0.30 0.28 4.7 1.7
## aspro14 1011 0.61 0.62 0.60 0.56 4.2 1.6
## aspro05 1011 0.60 0.60 0.57 0.54 4.2 1.8
## aspro16 1011 0.69 0.69 0.67 0.64 3.9 1.7
## aspro11 1011 0.45 0.43 0.42 0.37 2.4 1.9
## aspro22 1011 0.51 0.49 0.48 0.43 2.4 1.9
##
## Non missing response frequency for each item
## 1 2 3 4 5 6 7 miss
## aspro01 0.05 0.03 0.05 0.19 0.20 0.22 0.26 0
## aspro12 0.04 0.05 0.07 0.22 0.21 0.21 0.20 0
## aspro02 0.11 0.08 0.11 0.28 0.20 0.12 0.09 0
## aspro13 0.08 0.08 0.09 0.25 0.20 0.14 0.15 0
## aspro10 0.02 0.03 0.06 0.21 0.27 0.24 0.17 0
## aspro21 0.05 0.06 0.08 0.21 0.23 0.20 0.17 0
## aspro07 0.07 0.06 0.10 0.22 0.25 0.20 0.11 0
## aspro18 0.09 0.06 0.08 0.22 0.22 0.23 0.11 0
## aspro09 0.02 0.02 0.02 0.11 0.14 0.20 0.49 0
## aspro20 0.05 0.05 0.07 0.21 0.23 0.25 0.14 0
## aspro04 0.22 0.06 0.08 0.18 0.18 0.14 0.13 0
## aspro15 0.22 0.10 0.12 0.24 0.14 0.10 0.08 0
## aspro06 0.31 0.11 0.11 0.24 0.11 0.05 0.07 0
## aspro17 0.31 0.15 0.13 0.23 0.10 0.04 0.04 0
## aspro08 0.30 0.14 0.14 0.25 0.10 0.03 0.04 0
## aspro19 0.30 0.16 0.13 0.19 0.09 0.06 0.06 0
## aspro03 0.06 0.05 0.08 0.26 0.19 0.19 0.17 0
## aspro14 0.09 0.07 0.09 0.33 0.20 0.15 0.08 0
## aspro05 0.11 0.08 0.12 0.27 0.16 0.13 0.12 0
## aspro16 0.13 0.12 0.11 0.27 0.20 0.10 0.08 0
## aspro11 0.54 0.11 0.07 0.11 0.06 0.04 0.07 0
## aspro22 0.56 0.11 0.07 0.10 0.06 0.05 0.05 0
alpha (data[c("asimp01", "asimp12",
"asimp02", "asimp13",
"asimp10", "asimp21",
"asimp04", "asimp15",
"asimp06", "asimp17",
"asimp08", "asimp19",
"asimp03", "asimp14",
"asimp07", "asimp18",
"asimp09", "asimp20")])
##
## Reliability analysis
## Call: alpha(x = data[c("asimp01", "asimp12", "asimp02", "asimp13",
## "asimp10", "asimp21", "asimp04", "asimp15", "asimp06", "asimp17",
## "asimp08", "asimp19", "asimp03", "asimp14", "asimp07", "asimp18",
## "asimp09", "asimp20")])
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.81 0.81 0.84 0.19 4.4 0.0088 4.8 0.75 0.18
##
## lower alpha upper 95% confidence boundaries
## 0.79 0.81 0.83
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## asimp01 0.80 0.81 0.83 0.20 4.2 0.0091 0.014 0.19
## asimp12 0.79 0.80 0.83 0.19 4.0 0.0094 0.014 0.18
## asimp02 0.80 0.80 0.83 0.19 4.1 0.0092 0.014 0.19
## asimp13 0.80 0.81 0.83 0.20 4.2 0.0090 0.014 0.19
## asimp10 0.80 0.80 0.83 0.19 4.0 0.0092 0.014 0.18
## asimp21 0.80 0.81 0.83 0.20 4.1 0.0091 0.013 0.18
## asimp04 0.80 0.80 0.83 0.20 4.1 0.0092 0.014 0.18
## asimp15 0.80 0.80 0.83 0.19 4.1 0.0093 0.014 0.18
## asimp06 0.80 0.81 0.83 0.20 4.3 0.0090 0.012 0.19
## asimp17 0.80 0.80 0.83 0.19 4.1 0.0093 0.012 0.19
## asimp08 0.80 0.80 0.83 0.19 4.1 0.0094 0.012 0.19
## asimp19 0.80 0.81 0.83 0.20 4.1 0.0093 0.012 0.19
## asimp03 0.80 0.81 0.84 0.20 4.3 0.0090 0.014 0.20
## asimp14 0.80 0.80 0.83 0.19 4.0 0.0094 0.015 0.17
## asimp07 0.80 0.80 0.83 0.19 4.1 0.0092 0.013 0.18
## asimp18 0.80 0.80 0.83 0.19 4.1 0.0092 0.012 0.18
## asimp09 0.80 0.81 0.83 0.20 4.2 0.0090 0.014 0.18
## asimp20 0.80 0.80 0.83 0.19 4.1 0.0092 0.013 0.18
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## asimp01 1011 0.44 0.46 0.40 0.35 5.8 1.5
## asimp12 1011 0.55 0.57 0.54 0.47 5.5 1.5
## asimp02 1011 0.51 0.50 0.46 0.40 4.8 1.7
## asimp13 1011 0.43 0.43 0.38 0.32 4.8 1.7
## asimp10 1011 0.51 0.54 0.50 0.43 5.7 1.3
## asimp21 1011 0.44 0.48 0.43 0.36 5.9 1.3
## asimp04 1011 0.52 0.49 0.44 0.40 4.8 2.0
## asimp15 1011 0.53 0.51 0.47 0.43 4.6 1.7
## asimp06 1011 0.44 0.40 0.35 0.33 2.6 1.7
## asimp17 1011 0.53 0.50 0.47 0.43 2.6 1.6
## asimp08 1011 0.55 0.51 0.49 0.45 2.7 1.7
## asimp19 1011 0.51 0.48 0.44 0.41 2.6 1.6
## asimp03 1011 0.42 0.40 0.33 0.31 4.5 1.7
## asimp14 1011 0.55 0.54 0.50 0.46 4.4 1.7
## asimp07 1011 0.48 0.52 0.49 0.40 5.9 1.3
## asimp18 1011 0.48 0.52 0.50 0.41 6.3 1.2
## asimp09 1011 0.41 0.45 0.39 0.33 6.2 1.2
## asimp20 1011 0.47 0.52 0.48 0.40 6.0 1.2
##
## Non missing response frequency for each item
## 1 2 3 4 5 6 7 miss
## asimp01 0.03 0.01 0.02 0.12 0.13 0.21 0.47 0
## asimp12 0.02 0.02 0.05 0.17 0.18 0.24 0.31 0
## asimp02 0.06 0.05 0.09 0.22 0.21 0.17 0.20 0
## asimp13 0.07 0.04 0.06 0.22 0.22 0.18 0.21 0
## asimp10 0.01 0.01 0.02 0.14 0.18 0.29 0.34 0
## asimp21 0.01 0.01 0.03 0.11 0.15 0.25 0.44 0
## asimp04 0.15 0.02 0.04 0.17 0.16 0.20 0.26 0
## asimp15 0.08 0.05 0.10 0.24 0.20 0.16 0.18 0
## asimp06 0.41 0.15 0.11 0.20 0.08 0.03 0.03 0
## asimp17 0.37 0.16 0.13 0.20 0.07 0.04 0.02 0
## asimp08 0.35 0.18 0.15 0.19 0.07 0.04 0.03 0
## asimp19 0.37 0.19 0.15 0.16 0.06 0.04 0.03 0
## asimp03 0.06 0.07 0.10 0.28 0.18 0.16 0.14 0
## asimp14 0.08 0.06 0.09 0.29 0.21 0.16 0.11 0
## asimp07 0.01 0.01 0.02 0.10 0.16 0.24 0.45 0
## asimp18 0.01 0.01 0.02 0.05 0.09 0.20 0.62 0
## asimp09 0.01 0.01 0.01 0.08 0.09 0.20 0.60 0
## asimp20 0.01 0.01 0.03 0.09 0.12 0.28 0.47 0
alpha (data[c("aspro01", "aspro12",
"aspro02", "aspro13",
"aspro10", "aspro21",
"aspro04", "aspro15",
"aspro06", "aspro17",
"aspro08", "aspro19",
"aspro03", "aspro14",
"aspro07", "aspro18",
"aspro09", "aspro20")])
##
## Reliability analysis
## Call: alpha(x = data[c("aspro01", "aspro12", "aspro02", "aspro13",
## "aspro10", "aspro21", "aspro04", "aspro15", "aspro06", "aspro17",
## "aspro08", "aspro19", "aspro03", "aspro14", "aspro07", "aspro18",
## "aspro09", "aspro20")])
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.87 0.87 0.89 0.27 6.8 0.0059 4.3 0.95 0.27
##
## lower alpha upper 95% confidence boundaries
## 0.86 0.87 0.88
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## aspro01 0.86 0.86 0.88 0.27 6.4 0.0062 0.0112 0.27
## aspro12 0.86 0.86 0.88 0.27 6.3 0.0063 0.0111 0.26
## aspro02 0.87 0.87 0.88 0.28 6.5 0.0061 0.0113 0.28
## aspro13 0.87 0.87 0.88 0.28 6.7 0.0059 0.0103 0.28
## aspro10 0.86 0.86 0.88 0.27 6.4 0.0062 0.0113 0.27
## aspro21 0.86 0.86 0.88 0.27 6.3 0.0063 0.0107 0.27
## aspro04 0.86 0.86 0.88 0.27 6.4 0.0063 0.0112 0.26
## aspro15 0.86 0.86 0.88 0.27 6.3 0.0063 0.0106 0.27
## aspro06 0.87 0.87 0.88 0.28 6.6 0.0060 0.0108 0.28
## aspro17 0.86 0.86 0.88 0.27 6.4 0.0062 0.0103 0.27
## aspro08 0.86 0.86 0.88 0.27 6.3 0.0063 0.0106 0.27
## aspro19 0.86 0.87 0.88 0.27 6.4 0.0062 0.0107 0.27
## aspro03 0.87 0.87 0.89 0.29 6.9 0.0059 0.0098 0.28
## aspro14 0.86 0.86 0.88 0.27 6.3 0.0063 0.0113 0.26
## aspro07 0.86 0.86 0.87 0.27 6.2 0.0064 0.0098 0.26
## aspro18 0.86 0.86 0.87 0.27 6.2 0.0064 0.0095 0.26
## aspro09 0.87 0.87 0.88 0.28 6.6 0.0061 0.0105 0.27
## aspro20 0.86 0.86 0.88 0.27 6.4 0.0062 0.0104 0.27
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## aspro01 1011 0.57 0.58 0.54 0.50 5.1 1.7
## aspro12 1011 0.62 0.62 0.60 0.55 4.9 1.6
## aspro02 1011 0.52 0.52 0.48 0.44 4.1 1.7
## aspro13 1011 0.44 0.43 0.38 0.35 4.4 1.8
## aspro10 1011 0.57 0.59 0.55 0.51 5.1 1.4
## aspro21 1011 0.61 0.62 0.59 0.54 4.8 1.6
## aspro04 1011 0.60 0.59 0.55 0.52 4.0 2.1
## aspro15 1011 0.62 0.61 0.59 0.55 3.6 1.9
## aspro06 1011 0.49 0.47 0.42 0.40 3.2 1.9
## aspro17 1011 0.58 0.57 0.54 0.51 2.9 1.7
## aspro08 1011 0.61 0.60 0.58 0.54 3.0 1.7
## aspro19 1011 0.57 0.56 0.53 0.49 3.0 1.9
## aspro03 1011 0.37 0.37 0.30 0.28 4.7 1.7
## aspro14 1011 0.63 0.63 0.60 0.57 4.2 1.6
## aspro07 1011 0.64 0.64 0.63 0.58 4.6 1.6
## aspro18 1011 0.65 0.65 0.64 0.58 4.6 1.7
## aspro09 1011 0.45 0.47 0.42 0.39 5.9 1.4
## aspro20 1011 0.56 0.57 0.54 0.49 4.8 1.6
##
## Non missing response frequency for each item
## 1 2 3 4 5 6 7 miss
## aspro01 0.05 0.03 0.05 0.19 0.20 0.22 0.26 0
## aspro12 0.04 0.05 0.07 0.22 0.21 0.21 0.20 0
## aspro02 0.11 0.08 0.11 0.28 0.20 0.12 0.09 0
## aspro13 0.08 0.08 0.09 0.25 0.20 0.14 0.15 0
## aspro10 0.02 0.03 0.06 0.21 0.27 0.24 0.17 0
## aspro21 0.05 0.06 0.08 0.21 0.23 0.20 0.17 0
## aspro04 0.22 0.06 0.08 0.18 0.18 0.14 0.13 0
## aspro15 0.22 0.10 0.12 0.24 0.14 0.10 0.08 0
## aspro06 0.31 0.11 0.11 0.24 0.11 0.05 0.07 0
## aspro17 0.31 0.15 0.13 0.23 0.10 0.04 0.04 0
## aspro08 0.30 0.14 0.14 0.25 0.10 0.03 0.04 0
## aspro19 0.30 0.16 0.13 0.19 0.09 0.06 0.06 0
## aspro03 0.06 0.05 0.08 0.26 0.19 0.19 0.17 0
## aspro14 0.09 0.07 0.09 0.33 0.20 0.15 0.08 0
## aspro07 0.07 0.06 0.10 0.22 0.25 0.20 0.11 0
## aspro18 0.09 0.06 0.08 0.22 0.22 0.23 0.11 0
## aspro09 0.02 0.02 0.02 0.11 0.14 0.20 0.49 0
## aspro20 0.05 0.05 0.07 0.21 0.23 0.25 0.14 0
alpha (data[c("sj01", "sj02", "sj03.i", "sj04",
"sj05", "sj06", "sj07.i", "sj08")])
##
## Reliability analysis
## Call: alpha(x = data[c("sj01", "sj02", "sj03.i", "sj04", "sj05", "sj06",
## "sj07.i", "sj08")])
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.83 0.83 0.84 0.39 5.1 0.008 3.9 1.1 0.42
##
## lower alpha upper 95% confidence boundaries
## 0.82 0.83 0.85
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## sj01 0.79 0.80 0.80 0.36 3.9 0.0100 0.019 0.38
## sj02 0.79 0.80 0.79 0.36 3.9 0.0101 0.015 0.39
## sj03.i 0.82 0.82 0.82 0.40 4.6 0.0088 0.019 0.42
## sj04 0.82 0.83 0.83 0.40 4.7 0.0086 0.021 0.42
## sj05 0.79 0.80 0.80 0.36 4.0 0.0099 0.018 0.39
## sj06 0.84 0.84 0.83 0.42 5.1 0.0079 0.015 0.42
## sj07.i 0.82 0.83 0.83 0.40 4.7 0.0086 0.016 0.42
## sj08 0.82 0.82 0.82 0.39 4.6 0.0089 0.020 0.42
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## sj01 1011 0.79 0.80 0.78 0.71 4.0 1.5
## sj02 1011 0.80 0.80 0.79 0.71 4.4 1.6
## sj03.i 1011 0.64 0.64 0.56 0.51 4.3 1.6
## sj04 1011 0.62 0.62 0.53 0.48 4.3 1.7
## sj05 1011 0.78 0.77 0.75 0.68 3.8 1.6
## sj06 1011 0.57 0.55 0.46 0.40 3.9 1.8
## sj07.i 1011 0.62 0.62 0.54 0.48 3.4 1.6
## sj08 1011 0.64 0.65 0.59 0.53 3.5 1.4
##
## Non missing response frequency for each item
## 1 2 3 4 5 6 7 miss
## sj01 0.07 0.12 0.18 0.23 0.26 0.11 0.03 0
## sj02 0.08 0.08 0.13 0.14 0.30 0.21 0.06 0
## sj03.i 0.06 0.08 0.18 0.25 0.18 0.14 0.11 0
## sj04 0.09 0.07 0.12 0.27 0.21 0.17 0.09 0
## sj05 0.11 0.13 0.18 0.19 0.24 0.11 0.04 0
## sj06 0.11 0.13 0.21 0.14 0.19 0.12 0.10 0
## sj07.i 0.16 0.15 0.25 0.21 0.10 0.09 0.04 0
## sj08 0.09 0.17 0.26 0.24 0.17 0.07 0.01 0
alpha (data[c("nd01", "nd02", "nd03.i", "nd04", "nd05.i",
"nd06.i", "nd07", "nd08", "nd09.i", "nd10.i")])
##
## Reliability analysis
## Call: alpha(x = data[c("nd01", "nd02", "nd03.i", "nd04", "nd05.i",
## "nd06.i", "nd07", "nd08", "nd09.i", "nd10.i")])
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.89 0.89 0.9 0.45 8.2 0.0051 2.5 1.1 0.4
##
## lower alpha upper 95% confidence boundaries
## 0.88 0.89 0.9
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## nd01 0.87 0.87 0.88 0.43 6.8 0.0060 0.010 0.40
## nd02 0.88 0.88 0.88 0.44 7.2 0.0058 0.011 0.40
## nd03.i 0.88 0.88 0.89 0.45 7.5 0.0055 0.014 0.40
## nd04 0.88 0.88 0.88 0.44 7.2 0.0057 0.011 0.40
## nd05.i 0.89 0.89 0.90 0.48 8.2 0.0052 0.011 0.44
## nd06.i 0.88 0.88 0.88 0.45 7.4 0.0055 0.012 0.40
## nd07 0.88 0.88 0.88 0.45 7.3 0.0056 0.010 0.40
## nd08 0.88 0.88 0.89 0.45 7.4 0.0056 0.012 0.40
## nd09.i 0.88 0.89 0.89 0.46 7.7 0.0054 0.013 0.41
## nd10.i 0.88 0.88 0.88 0.45 7.4 0.0055 0.012 0.40
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## nd01 1011 0.81 0.81 0.80 0.76 2.3 1.5
## nd02 1011 0.75 0.75 0.72 0.68 2.8 1.7
## nd03.i 1011 0.68 0.70 0.65 0.61 2.0 1.4
## nd04 1011 0.75 0.74 0.72 0.67 2.7 1.6
## nd05.i 1011 0.56 0.59 0.51 0.48 1.9 1.2
## nd06.i 1011 0.72 0.71 0.69 0.63 2.6 1.8
## nd07 1011 0.73 0.73 0.70 0.65 2.7 1.6
## nd08 1011 0.72 0.72 0.68 0.64 2.7 1.6
## nd09.i 1011 0.67 0.66 0.60 0.57 2.6 1.7
## nd10.i 1011 0.72 0.71 0.68 0.62 2.8 1.8
##
## Non missing response frequency for each item
## 1 2 3 4 5 6 7 miss
## nd01 0.48 0.15 0.14 0.13 0.06 0.02 0.02 0
## nd02 0.35 0.13 0.15 0.18 0.12 0.05 0.02 0
## nd03.i 0.50 0.21 0.16 0.07 0.03 0.02 0.01 0
## nd04 0.36 0.18 0.15 0.16 0.10 0.04 0.02 0
## nd05.i 0.52 0.21 0.16 0.06 0.03 0.01 0.01 0
## nd06.i 0.39 0.17 0.17 0.10 0.10 0.04 0.04 0
## nd07 0.36 0.17 0.15 0.16 0.11 0.03 0.02 0
## nd08 0.33 0.18 0.17 0.20 0.08 0.03 0.02 0
## nd09.i 0.36 0.19 0.17 0.14 0.07 0.03 0.04 0
## nd10.i 0.35 0.17 0.16 0.13 0.09 0.06 0.05 0
alpha (data[c("cas01", "cas02", "cas03", "cas04",
"cas05", "cas07", "cas08",
"cas09", "cas10", "cas11", "cas12", "cas13")])
##
## Reliability analysis
## Call: alpha(x = data[c("cas01", "cas02", "cas03", "cas04", "cas05",
## "cas07", "cas08", "cas09", "cas10", "cas11", "cas12", "cas13")])
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.89 0.89 0.9 0.41 8.4 0.0052 1.8 0.82 0.4
##
## lower alpha upper 95% confidence boundaries
## 0.87 0.89 0.9
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## cas01 0.87 0.88 0.88 0.40 7.5 0.0058 0.0075 0.40
## cas02 0.87 0.88 0.88 0.40 7.4 0.0058 0.0071 0.40
## cas03 0.88 0.88 0.89 0.41 7.7 0.0056 0.0082 0.40
## cas04 0.88 0.89 0.89 0.42 7.8 0.0055 0.0077 0.40
## cas05 0.88 0.89 0.89 0.42 7.8 0.0056 0.0083 0.40
## cas07 0.88 0.89 0.89 0.42 8.1 0.0055 0.0075 0.41
## cas08 0.88 0.89 0.89 0.42 8.0 0.0055 0.0077 0.41
## cas09 0.87 0.88 0.88 0.40 7.3 0.0059 0.0075 0.38
## cas10 0.88 0.89 0.89 0.42 8.1 0.0054 0.0075 0.41
## cas11 0.87 0.88 0.88 0.40 7.3 0.0059 0.0072 0.38
## cas12 0.87 0.88 0.88 0.41 7.5 0.0058 0.0078 0.41
## cas13 0.88 0.89 0.89 0.41 7.8 0.0056 0.0090 0.41
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## cas01 1011 0.72 0.72 0.70 0.65 1.8 1.21
## cas02 1011 0.73 0.74 0.72 0.67 1.7 1.21
## cas03 1011 0.65 0.69 0.65 0.59 1.4 0.93
## cas04 1011 0.61 0.65 0.61 0.55 1.3 0.88
## cas05 1011 0.68 0.64 0.60 0.58 2.4 1.58
## cas07 1011 0.56 0.59 0.54 0.49 1.3 0.88
## cas08 1011 0.65 0.62 0.57 0.55 2.4 1.52
## cas09 1011 0.75 0.75 0.73 0.69 1.8 1.21
## cas10 1011 0.63 0.59 0.53 0.51 2.4 1.60
## cas11 1011 0.75 0.77 0.75 0.70 1.6 1.05
## cas12 1011 0.71 0.72 0.69 0.65 1.8 1.18
## cas13 1011 0.66 0.66 0.61 0.58 1.8 1.25
##
## Non missing response frequency for each item
## 1 2 3 4 5 6 7 miss
## cas01 0.61 0.15 0.11 0.09 0.03 0.00 0.00 0
## cas02 0.67 0.13 0.08 0.07 0.04 0.00 0.00 0
## cas03 0.79 0.10 0.05 0.04 0.02 0.00 0.00 0
## cas04 0.83 0.07 0.05 0.03 0.01 0.00 0.00 0
## cas05 0.45 0.13 0.13 0.16 0.10 0.02 0.01 0
## cas07 0.82 0.08 0.04 0.04 0.01 0.00 0.00 0
## cas08 0.45 0.14 0.12 0.20 0.07 0.01 0.01 0
## cas09 0.60 0.16 0.10 0.10 0.04 0.00 0.00 0
## cas10 0.46 0.17 0.12 0.12 0.10 0.02 0.02 0
## cas11 0.71 0.14 0.06 0.08 0.01 0.00 0.00 0
## cas12 0.62 0.16 0.09 0.11 0.02 0.00 0.00 0
## cas13 0.64 0.14 0.09 0.09 0.04 0.01 0.00 0
alpha (data[c("phq01", "phq02", "phq03", "phq04")])
##
## Reliability analysis
## Call: alpha(x = data[c("phq01", "phq02", "phq03", "phq04")])
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.88 0.88 0.85 0.64 7.2 0.0063 1.7 0.72 0.66
##
## lower alpha upper 95% confidence boundaries
## 0.87 0.88 0.89
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## phq01 0.86 0.86 0.81 0.67 6.2 0.0076 0.0012 0.67
## phq02 0.82 0.82 0.75 0.60 4.5 0.0099 0.0012 0.59
## phq03 0.85 0.85 0.80 0.66 5.8 0.0081 0.0038 0.67
## phq04 0.84 0.84 0.79 0.64 5.4 0.0086 0.0035 0.67
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## phq01 1011 0.83 0.83 0.74 0.69 1.7 0.84
## phq02 1011 0.89 0.89 0.86 0.80 1.7 0.83
## phq03 1011 0.85 0.84 0.76 0.72 1.7 0.85
## phq04 1011 0.86 0.86 0.79 0.74 1.6 0.83
##
## Non missing response frequency for each item
## 1 2 3 4 miss
## phq01 0.48 0.38 0.09 0.05 0
## phq02 0.54 0.32 0.10 0.04 0
## phq03 0.49 0.37 0.08 0.06 0
## phq04 0.58 0.30 0.07 0.05 0
corr.test (data [,c("ps01", "ps02")],
method = "spearman")
## Call:corr.test(x = data[, c("ps01", "ps02")], method = "spearman")
## Correlation matrix
## ps01 ps02
## ps01 1.00 0.67
## ps02 0.67 1.00
## Sample Size
## ps01 ps02
## ps01 974 973
## ps02 973 976
## Probability values (Entries above the diagonal are adjusted for multiple tests.)
## ps01 ps02
## ps01 0 0
## ps02 0 0
##
## To see confidence intervals of the correlations, print with the short=FALSE option
#bootstrapped confidence intervals#
data.ci <- cor.ci(data [,c("ps01", "ps02")])
#to show the upper and lower confidence intervals#
ci <- cor.plot.upperLowerCi(data.ci)
#print the confidence intervals in matrix form#
ci
##
## High and low confidence intervals
## ps01 ps02
## ps01 1.00 0.74
## ps02 0.63 1.00
alpha (data[c("int01", "int02", "int03")])
##
## Reliability analysis
## Call: alpha(x = data[c("int01", "int02", "int03")])
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.74 0.73 0.7 0.48 2.7 0.014 3.5 1.3 0.38
##
## lower alpha upper 95% confidence boundaries
## 0.71 0.74 0.77
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## int01 0.55 0.55 0.38 0.38 1.22 0.0282 NA 0.38
## int02 0.48 0.48 0.32 0.32 0.92 0.0326 NA 0.32
## int03 0.85 0.85 0.73 0.73 5.48 0.0097 NA 0.73
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## int01 1011 0.86 0.85 0.78 0.65 2.7 1.6
## int02 1011 0.89 0.87 0.83 0.70 2.7 1.6
## int03 1011 0.67 0.70 0.42 0.37 5.1 1.4
##
## Non missing response frequency for each item
## 1 2 3 4 5 6 7 miss
## int01 0.36 0.16 0.14 0.20 0.09 0.03 0.02 0
## int02 0.36 0.15 0.15 0.19 0.09 0.04 0.01 0
## int03 0.04 0.02 0.04 0.15 0.35 0.23 0.17 0
Load relevant packages
library(HH)
## Loading required package: lattice
## Loading required package: grid
## Loading required package: latticeExtra
## Loading required package: multcomp
## Loading required package: mvtnorm
## Loading required package: survival
## Loading required package: TH.data
##
## Attaching package: 'TH.data'
## The following object is masked from 'package:MASS':
##
## geyser
## Loading required package: gridExtra
##
## Attaching package: 'HH'
## The following objects are masked from 'package:car':
##
## logit, vif
## The following object is masked from 'package:psych':
##
## logit
library(tidyverse)
## Found more than one class "atomicVector" in cache; using the first, from namespace 'Matrix'
## Also defined by 'Rmpfr'
## Found more than one class "atomicVector" in cache; using the first, from namespace 'Matrix'
## Also defined by 'Rmpfr'
## Found more than one class "atomicVector" in cache; using the first, from namespace 'Matrix'
## Also defined by 'Rmpfr'
## Found more than one class "atomicVector" in cache; using the first, from namespace 'Matrix'
## Also defined by 'Rmpfr'
## Found more than one class "atomicVector" in cache; using the first, from namespace 'Matrix'
## Also defined by 'Rmpfr'
## Found more than one class "atomicVector" in cache; using the first, from namespace 'Matrix'
## Also defined by 'Rmpfr'
## Found more than one class "atomicVector" in cache; using the first, from namespace 'Matrix'
## Also defined by 'Rmpfr'
## Found more than one class "atomicVector" in cache; using the first, from namespace 'Matrix'
## Also defined by 'Rmpfr'
## Found more than one class "atomicVector" in cache; using the first, from namespace 'Matrix'
## Also defined by 'Rmpfr'
## Found more than one class "atomicVector" in cache; using the first, from namespace 'Matrix'
## Also defined by 'Rmpfr'
## Found more than one class "atomicVector" in cache; using the first, from namespace 'Matrix'
## Also defined by 'Rmpfr'
## Found more than one class "atomicVector" in cache; using the first, from namespace 'Matrix'
## Also defined by 'Rmpfr'
## -- Attaching packages --------------------------------------- tidyverse 1.3.0 --
## v ggplot2 3.3.2 v purrr 0.3.4
## v tibble 3.0.4 v dplyr 1.0.2
## v tidyr 1.1.2 v stringr 1.4.0
## v readr 1.4.0 v forcats 0.5.0
## -- Conflicts ------------------------------------------ tidyverse_conflicts() --
## x ggplot2::%+%() masks psych::%+%()
## x ggplot2::alpha() masks psych::alpha()
## x dplyr::combine() masks gridExtra::combine()
## x dplyr::filter() masks stats::filter()
## x dplyr::lag() masks stats::lag()
## x ggplot2::layer() masks latticeExtra::layer()
## x dplyr::recode() masks car::recode()
## x dplyr::select() masks MASS::select()
## x purrr::some() masks car::some()
## x purrr::transpose() masks HH::transpose()
Create data frame with all CAS items
df = data.frame(data$cas01, data$cas02, data$cas03, data$cas04, data$cas05,
data$cas06, data$cas07, data$cas08, data$cas09, data$cas10,
data$cas11, data$cas12, data$cas13)
Convert to long format
survey <- gather(df, measure, response, c(1:13))
Convert to factors
survey$measure <- as.factor(survey$measure)
survey$response <- as.factor(survey$response)
Create contingency table
survey_df <- table(survey$measure, survey$response) %>% as.data.frame.matrix()
Rename rows and columns
colnames(survey_df) <- c("strongly disagree","disagree","somewhat disagree","neutral","somewhat agree","agree", "strongly agree")
rownames(survey_df)<-c("1: Thinking about climate change makes it difficult for me to concentrate.",
"2: Thinking about climate change makes it difficult for me to sleep.",
"3: I have nightmares about climate change",
"4: I find myself crying because of climate change.",
"5: I think, “why can’t I handle climate change better?”.",
"6: I go away by myself and think about why I feel this way about climate change.",
"7: I write down my thoughts about climate change and analyze them.",
"8: I think, “why do I react to climate change this way?”.",
"9: My concerns about climate change make it hard for me to have fun with my family or friends.",
"10: I have problems balancing my concerns about sustainability with the needs of my family.",
"11: My concerns about climate change interfere with my ability to get work or school assignments done.",
"12: My concerns about climate change undermine my ability to work to my potential.",
"13: My friends say I think about climate change too much.")
survey_df <- tibble::rownames_to_column(survey_df, var="Measure")
Plotting the graph
likert(Measure ~ ., data=survey_df,
ylab=NULL,
scales = list(y = list(cex = 1.2)),
auto.key=list(cex = 1.2,just = 0.95),
ReferenceZero=4, as.percent=TRUE,
main = list(" ",x=unit(.55, "npc")),
xlim=c(-100, -80, -60, -40, -20, 0, 20, 40),
strip=FALSE,
par.strip.text=list(cex=.7))
corr.test (data [,c("cas01", "cas02", "cas03", "cas04", "cas05",
"cas06", "cas07", "cas08", "cas09", "cas10",
"cas11", "cas12", "cas13",
"age", "income", "pol.orient")],
method = "spearman")
## Call:corr.test(x = data[, c("cas01", "cas02", "cas03", "cas04", "cas05",
## "cas06", "cas07", "cas08", "cas09", "cas10", "cas11", "cas12",
## "cas13", "age", "income", "pol.orient")], method = "spearman")
## Correlation matrix
## cas01 cas02 cas03 cas04 cas05 cas06 cas07 cas08 cas09 cas10 cas11
## cas01 1.00 0.58 0.47 0.41 0.42 0.27 0.38 0.44 0.56 0.44 0.56
## cas02 0.58 1.00 0.57 0.50 0.40 0.35 0.39 0.38 0.58 0.42 0.57
## cas03 0.47 0.57 1.00 0.51 0.38 0.36 0.45 0.33 0.48 0.34 0.53
## cas04 0.41 0.50 0.51 1.00 0.31 0.36 0.44 0.25 0.44 0.32 0.46
## cas05 0.42 0.40 0.38 0.31 1.00 0.34 0.32 0.55 0.45 0.45 0.46
## cas06 0.27 0.35 0.36 0.36 0.34 1.00 0.34 0.27 0.39 0.28 0.30
## cas07 0.38 0.39 0.45 0.44 0.32 0.34 1.00 0.32 0.37 0.28 0.45
## cas08 0.44 0.38 0.33 0.25 0.55 0.27 0.32 1.00 0.45 0.42 0.44
## cas09 0.56 0.58 0.48 0.44 0.45 0.39 0.37 0.45 1.00 0.50 0.59
## cas10 0.44 0.42 0.34 0.32 0.45 0.28 0.28 0.42 0.50 1.00 0.43
## cas11 0.56 0.57 0.53 0.46 0.46 0.30 0.45 0.44 0.59 0.43 1.00
## cas12 0.57 0.54 0.46 0.43 0.42 0.33 0.42 0.42 0.57 0.43 0.62
## cas13 0.46 0.48 0.41 0.38 0.43 0.38 0.40 0.37 0.49 0.40 0.50
## age 0.04 0.05 0.03 0.00 0.02 0.09 0.02 0.04 0.02 -0.03 0.00
## income -0.04 0.01 -0.02 -0.01 0.01 -0.02 0.02 -0.03 -0.03 -0.02 -0.04
## pol.orient -0.08 -0.05 -0.08 -0.06 -0.06 -0.12 -0.08 -0.02 -0.09 -0.09 -0.07
## cas12 cas13 age income pol.orient
## cas01 0.57 0.46 0.04 -0.04 -0.08
## cas02 0.54 0.48 0.05 0.01 -0.05
## cas03 0.46 0.41 0.03 -0.02 -0.08
## cas04 0.43 0.38 0.00 -0.01 -0.06
## cas05 0.42 0.43 0.02 0.01 -0.06
## cas06 0.33 0.38 0.09 -0.02 -0.12
## cas07 0.42 0.40 0.02 0.02 -0.08
## cas08 0.42 0.37 0.04 -0.03 -0.02
## cas09 0.57 0.49 0.02 -0.03 -0.09
## cas10 0.43 0.40 -0.03 -0.02 -0.09
## cas11 0.62 0.50 0.00 -0.04 -0.07
## cas12 1.00 0.47 0.05 -0.03 -0.04
## cas13 0.47 1.00 0.03 -0.01 -0.07
## age 0.05 0.03 1.00 0.11 0.05
## income -0.03 -0.01 0.11 1.00 0.10
## pol.orient -0.04 -0.07 0.05 0.10 1.00
## Sample Size
## [1] 1011
## Probability values (Entries above the diagonal are adjusted for multiple tests.)
## cas01 cas02 cas03 cas04 cas05 cas06 cas07 cas08 cas09 cas10 cas11
## cas01 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas02 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas03 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas04 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas05 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas06 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas07 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas08 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas09 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas10 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas11 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas12 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas13 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## age 0.19 0.15 0.38 0.94 0.52 0.01 0.58 0.26 0.50 0.38 0.96
## income 0.20 0.84 0.51 0.83 0.84 0.55 0.50 0.40 0.42 0.55 0.19
## pol.orient 0.01 0.13 0.01 0.05 0.04 0.00 0.01 0.63 0.00 0.00 0.03
## cas12 cas13 age income pol.orient
## cas01 0.00 0.00 1.00 1.00 0.37
## cas02 0.00 0.00 1.00 1.00 1.00
## cas03 0.00 0.00 1.00 1.00 0.30
## cas04 0.00 0.00 1.00 1.00 1.00
## cas05 0.00 0.00 1.00 1.00 1.00
## cas06 0.00 0.00 0.24 1.00 0.00
## cas07 0.00 0.00 1.00 1.00 0.30
## cas08 0.00 0.00 1.00 1.00 1.00
## cas09 0.00 0.00 1.00 1.00 0.16
## cas10 0.00 0.00 1.00 1.00 0.10
## cas11 0.00 0.00 1.00 1.00 0.98
## cas12 0.00 0.00 1.00 1.00 1.00
## cas13 0.00 0.00 1.00 1.00 0.64
## age 0.15 0.33 0.00 0.01 1.00
## income 0.32 0.82 0.00 0.00 0.04
## pol.orient 0.16 0.02 0.09 0.00 0.00
##
## To see confidence intervals of the correlations, print with the short=FALSE option
#bootstrapped confidence intervals#
data.ci <- cor.ci(data [,c("cas01", "cas02", "cas03", "cas04", "cas05",
"cas06", "cas07", "cas08", "cas09", "cas10",
"cas11", "cas12", "cas13",
"age", "income", "pol.orient")])
#to show the upper and lower confidence intervals#
ci <- cor.plot.upperLowerCi(data.ci)
#print the confidence intervals in matrix form#
ci
##
## High and low confidence intervals
## cs01 cs02 cs03 cs04 cs05 cs06 cs07 cs08 cs09 cs10 cs11
## cas01 1.00 0.64 0.49 0.46 0.42 0.28 0.42 0.44 0.60 0.44 0.62
## cas02 0.51 1.00 0.62 0.56 0.42 0.36 0.42 0.38 0.61 0.43 0.59
## cas03 0.34 0.47 1.00 0.58 0.41 0.37 0.50 0.36 0.51 0.36 0.55
## cas04 0.33 0.43 0.42 1.00 0.34 0.37 0.51 0.29 0.49 0.34 0.54
## cas05 0.28 0.30 0.29 0.20 1.00 0.37 0.37 0.60 0.47 0.47 0.49
## cas06 0.16 0.25 0.27 0.28 0.25 1.00 0.39 0.30 0.41 0.30 0.32
## cas07 0.24 0.27 0.33 0.32 0.25 0.28 1.00 0.37 0.40 0.25 0.50
## cas08 0.31 0.25 0.23 0.15 0.49 0.19 0.24 1.00 0.48 0.45 0.47
## cas09 0.48 0.50 0.37 0.36 0.34 0.30 0.23 0.34 1.00 0.50 0.63
## cas10 0.30 0.30 0.24 0.23 0.35 0.18 0.13 0.30 0.38 1.00 0.41
## cas11 0.48 0.45 0.40 0.37 0.36 0.22 0.35 0.34 0.51 0.29 1.00
## cas12 0.48 0.44 0.30 0.31 0.32 0.22 0.29 0.31 0.47 0.29 0.53
## cas13 0.33 0.35 0.31 0.29 0.35 0.31 0.28 0.28 0.40 0.30 0.37
## age -0.03 -0.02 -0.04 0.03 0.05 0.01 -0.06 -0.05 -0.04 0.01 0.05
## income 0.01 0.03 0.05 -0.07 0.05 0.06 -0.04 0.04 0.02 0.05 0.00
## pol.orient 0.02 0.04 -0.02 0.02 0.02 -0.06 -0.01 -0.05 -0.01 -0.01 0.03
## cs12 cs13 age incm pl.r
## cas01 0.61 0.47 0.09 -0.11 -0.11
## cas02 0.57 0.50 0.10 -0.08 -0.09
## cas03 0.45 0.45 0.08 -0.07 -0.14
## cas04 0.46 0.44 -0.11 0.08 -0.11
## cas05 0.45 0.48 -0.07 -0.07 -0.10
## cas06 0.33 0.42 0.14 -0.06 -0.18
## cas07 0.45 0.41 0.07 0.11 -0.13
## cas08 0.45 0.41 0.08 -0.09 0.08
## cas09 0.59 0.53 0.08 -0.10 -0.13
## cas10 0.40 0.41 -0.11 -0.08 -0.13
## cas11 0.65 0.51 -0.08 -0.12 -0.09
## cas12 1.00 0.48 0.10 -0.10 -0.06
## cas13 0.33 1.00 0.08 -0.08 -0.12
## age -0.02 -0.04 1.00 0.16 0.12
## income 0.04 0.05 0.03 1.00 0.14
## pol.orient 0.06 0.02 0.00 0.02 1.00
group_pch <- data$gender # Create variable for symbols
group_pch[group_pch == 1] <- 16
group_pch[group_pch == 2] <- 8
group_col <- data$gender # Create variable for colors
group_col[group_col == 1] <- "black"
group_col[group_col == 2] <- "black"
plot(data$age, data$cas,
main = "CAS and Age Scatterplot",
xlab = "Age",
ylab = "CAS",
pch = group_pch,
col = group_col)
abline(lm(data$cas ~ data$age), col = "red") #regression line
lines(lowess(data$age, data$cas), col = "blue") #smooth fitting line
legend("topright", #add legend to scatterplot
legend = c("male", "female"),
col = c("black", "black"),
pch = c(16, 8))
Increases the number of rows that can be printed
options(max.print = 10000000)
Load package
library(MVN)
## Registered S3 method overwritten by 'GGally':
## method from
## +.gg ggplot2
## sROC 0.1-2 loaded
Create data frame with all CAS items
data.cas.items = data.frame(data$cas01, data$cas02, data$cas03, data$cas04, data$cas05,
data$cas06, data$cas07, data$cas08, data$cas09, data$cas10,
data$cas11, data$cas12, data$cas13)
Check for overall multivariate normality (Doornik-Hansen’s test)
result <- mvn(data = data.cas.items, mvnTest = "dh")
result$multivariateNormality
## Test E df p value MVN
## 1 Doornik-Hansen 2144.395 26 0 NO
Inspect data visually
mvn(data = data.cas.items, mvnTest = "royston", univariatePlot = "histogram") #create histograms for all items
## $multivariateNormality
## Test H p value MVN
## 1 Royston 2364.616 0 NO
##
## $univariateNormality
## Test Variable Statistic p value Normality
## 1 Shapiro-Wilk data.cas01 0.6995 <0.001 NO
## 2 Shapiro-Wilk data.cas02 0.6459 <0.001 NO
## 3 Shapiro-Wilk data.cas03 0.5015 <0.001 NO
## 4 Shapiro-Wilk data.cas04 0.4461 <0.001 NO
## 5 Shapiro-Wilk data.cas05 0.8190 <0.001 NO
## 6 Shapiro-Wilk data.cas06 0.8612 <0.001 NO
## 7 Shapiro-Wilk data.cas07 0.4546 <0.001 NO
## 8 Shapiro-Wilk data.cas08 0.8195 <0.001 NO
## 9 Shapiro-Wilk data.cas09 0.7095 <0.001 NO
## 10 Shapiro-Wilk data.cas10 0.8082 <0.001 NO
## 11 Shapiro-Wilk data.cas11 0.6046 <0.001 NO
## 12 Shapiro-Wilk data.cas12 0.6878 <0.001 NO
## 13 Shapiro-Wilk data.cas13 0.6772 <0.001 NO
##
## $Descriptives
## n Mean Std.Dev Median Min Max 25th 75th Skew
## data.cas01 1011 1.797230 1.2127345 1 1 7 1 2 1.4967847
## data.cas02 1011 1.709199 1.2115388 1 1 7 1 2 1.7644041
## data.cas03 1011 1.404550 0.9321215 1 1 7 1 1 2.6490997
## data.cas04 1011 1.340257 0.8815780 1 1 6 1 1 2.8944303
## data.cas05 1011 2.415430 1.5831787 2 1 7 1 4 0.7434305
## data.cas06 1011 2.865480 1.7743233 3 1 7 1 4 0.3937495
## data.cas07 1011 1.347181 0.8839266 1 1 7 1 1 2.9857836
## data.cas08 1011 2.382789 1.5204417 2 1 7 1 4 0.7145041
## data.cas09 1011 1.818002 1.2090879 1 1 7 1 2 1.3622052
## data.cas10 1011 2.359050 1.5997106 2 1 7 1 4 0.9505459
## data.cas11 1011 1.569733 1.0529703 1 1 7 1 2 1.9562626
## data.cas12 1011 1.761622 1.1779958 1 1 7 1 2 1.5254178
## data.cas13 1011 1.785361 1.2532822 1 1 7 1 2 1.5398025
## Kurtosis
## data.cas01 1.5709958
## data.cas02 2.4588235
## data.cas03 7.1313151
## data.cas04 8.2444201
## data.cas05 -0.6184192
## data.cas06 -1.1504658
## data.cas07 9.5771361
## data.cas08 -0.5767031
## data.cas09 0.8431063
## data.cas10 -0.1573717
## data.cas11 3.3583627
## data.cas12 1.7141854
## data.cas13 1.4531344
mvn(data = data.cas.items, mvnTest = "royston", univariatePlot = "qqplot") #create Q-Q-plots for all items
## $multivariateNormality
## Test H p value MVN
## 1 Royston 2364.616 0 NO
##
## $univariateNormality
## Test Variable Statistic p value Normality
## 1 Shapiro-Wilk data.cas01 0.6995 <0.001 NO
## 2 Shapiro-Wilk data.cas02 0.6459 <0.001 NO
## 3 Shapiro-Wilk data.cas03 0.5015 <0.001 NO
## 4 Shapiro-Wilk data.cas04 0.4461 <0.001 NO
## 5 Shapiro-Wilk data.cas05 0.8190 <0.001 NO
## 6 Shapiro-Wilk data.cas06 0.8612 <0.001 NO
## 7 Shapiro-Wilk data.cas07 0.4546 <0.001 NO
## 8 Shapiro-Wilk data.cas08 0.8195 <0.001 NO
## 9 Shapiro-Wilk data.cas09 0.7095 <0.001 NO
## 10 Shapiro-Wilk data.cas10 0.8082 <0.001 NO
## 11 Shapiro-Wilk data.cas11 0.6046 <0.001 NO
## 12 Shapiro-Wilk data.cas12 0.6878 <0.001 NO
## 13 Shapiro-Wilk data.cas13 0.6772 <0.001 NO
##
## $Descriptives
## n Mean Std.Dev Median Min Max 25th 75th Skew
## data.cas01 1011 1.797230 1.2127345 1 1 7 1 2 1.4967847
## data.cas02 1011 1.709199 1.2115388 1 1 7 1 2 1.7644041
## data.cas03 1011 1.404550 0.9321215 1 1 7 1 1 2.6490997
## data.cas04 1011 1.340257 0.8815780 1 1 6 1 1 2.8944303
## data.cas05 1011 2.415430 1.5831787 2 1 7 1 4 0.7434305
## data.cas06 1011 2.865480 1.7743233 3 1 7 1 4 0.3937495
## data.cas07 1011 1.347181 0.8839266 1 1 7 1 1 2.9857836
## data.cas08 1011 2.382789 1.5204417 2 1 7 1 4 0.7145041
## data.cas09 1011 1.818002 1.2090879 1 1 7 1 2 1.3622052
## data.cas10 1011 2.359050 1.5997106 2 1 7 1 4 0.9505459
## data.cas11 1011 1.569733 1.0529703 1 1 7 1 2 1.9562626
## data.cas12 1011 1.761622 1.1779958 1 1 7 1 2 1.5254178
## data.cas13 1011 1.785361 1.2532822 1 1 7 1 2 1.5398025
## Kurtosis
## data.cas01 1.5709958
## data.cas02 2.4588235
## data.cas03 7.1313151
## data.cas04 8.2444201
## data.cas05 -0.6184192
## data.cas06 -1.1504658
## data.cas07 9.5771361
## data.cas08 -0.5767031
## data.cas09 0.8431063
## data.cas10 -0.1573717
## data.cas11 3.3583627
## data.cas12 1.7141854
## data.cas13 1.4531344
Load package
library(lavaan)
## This is lavaan 0.6-7
## lavaan is BETA software! Please report any bugs.
##
## Attaching package: 'lavaan'
## The following object is masked from 'package:psych':
##
## cor2cov
CFA
CFA.2 <- ' cas.ce =~ cas01 + cas02 + cas03 + cas04 + cas05 + cas06 + cas07 + cas08
cas.f =~ cas09 + cas10 + cas11 + cas12 + cas13'
fit.2 <- cfa(CFA.2, std.lv=TRUE, data=data, estimator = "MLM")
summary(fit.2, fit.measures=TRUE, standardized=TRUE, rsquare=TRUE)
## lavaan 0.6-7 ended normally after 22 iterations
##
## Estimator ML
## Optimization method NLMINB
## Number of free parameters 27
##
## Number of observations 1011
##
## Model Test User Model:
## Standard Robust
## Test Statistic 566.324 321.335
## Degrees of freedom 64 64
## P-value (Chi-square) 0.000 0.000
## Scaling correction factor 1.762
## Satorra-Bentler correction
##
## Model Test Baseline Model:
##
## Test statistic 5194.208 2748.574
## Degrees of freedom 78 78
## P-value 0.000 0.000
## Scaling correction factor 1.890
##
## User Model versus Baseline Model:
##
## Comparative Fit Index (CFI) 0.902 0.904
## Tucker-Lewis Index (TLI) 0.880 0.883
##
## Robust Comparative Fit Index (CFI) 0.910
## Robust Tucker-Lewis Index (TLI) 0.890
##
## Loglikelihood and Information Criteria:
##
## Loglikelihood user model (H0) -18975.253 -18975.253
## Loglikelihood unrestricted model (H1) -18692.091 -18692.091
##
## Akaike (AIC) 38004.505 38004.505
## Bayesian (BIC) 38137.310 38137.310
## Sample-size adjusted Bayesian (BIC) 38051.556 38051.556
##
## Root Mean Square Error of Approximation:
##
## RMSEA 0.088 0.063
## 90 Percent confidence interval - lower 0.082 0.058
## 90 Percent confidence interval - upper 0.095 0.068
## P-value RMSEA <= 0.05 0.000 0.000
##
## Robust RMSEA 0.084
## 90 Percent confidence interval - lower 0.075
## 90 Percent confidence interval - upper 0.093
##
## Standardized Root Mean Square Residual:
##
## SRMR 0.052 0.052
##
## Parameter Estimates:
##
## Standard errors Robust.sem
## Information Expected
## Information saturated (h1) model Structured
##
## Latent Variables:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## cas.ce =~
## cas01 0.859 0.040 21.283 0.000 0.859 0.709
## cas02 0.897 0.041 22.005 0.000 0.897 0.741
## cas03 0.614 0.047 12.971 0.000 0.614 0.659
## cas04 0.545 0.045 12.048 0.000 0.545 0.618
## cas05 0.913 0.043 21.361 0.000 0.913 0.577
## cas06 0.806 0.049 16.581 0.000 0.806 0.454
## cas07 0.478 0.045 10.642 0.000 0.478 0.541
## cas08 0.828 0.043 19.122 0.000 0.828 0.545
## cas.f =~
## cas09 0.913 0.038 24.039 0.000 0.913 0.756
## cas10 0.843 0.049 17.308 0.000 0.843 0.527
## cas11 0.804 0.042 19.281 0.000 0.804 0.764
## cas12 0.836 0.036 23.230 0.000 0.836 0.710
## cas13 0.770 0.043 17.885 0.000 0.770 0.614
##
## Covariances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## cas.ce ~~
## cas.f 0.967 0.016 60.473 0.000 0.967 0.967
##
## Variances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .cas01 0.731 0.062 11.779 0.000 0.731 0.497
## .cas02 0.661 0.063 10.470 0.000 0.661 0.451
## .cas03 0.491 0.051 9.613 0.000 0.491 0.565
## .cas04 0.480 0.046 10.387 0.000 0.480 0.618
## .cas05 1.670 0.093 17.924 0.000 1.670 0.667
## .cas06 2.496 0.109 22.837 0.000 2.496 0.794
## .cas07 0.552 0.058 9.557 0.000 0.552 0.707
## .cas08 1.625 0.086 18.962 0.000 1.625 0.703
## .cas09 0.626 0.053 11.808 0.000 0.626 0.429
## .cas10 1.845 0.114 16.246 0.000 1.845 0.722
## .cas11 0.461 0.042 10.932 0.000 0.461 0.416
## .cas12 0.687 0.066 10.457 0.000 0.687 0.496
## .cas13 0.977 0.071 13.703 0.000 0.977 0.623
## cas.ce 1.000 1.000 1.000
## cas.f 1.000 1.000 1.000
##
## R-Square:
## Estimate
## cas01 0.503
## cas02 0.549
## cas03 0.435
## cas04 0.382
## cas05 0.333
## cas06 0.206
## cas07 0.293
## cas08 0.297
## cas09 0.571
## cas10 0.278
## cas11 0.584
## cas12 0.504
## cas13 0.377
parameterEstimates(fit.2, standardized=TRUE) #shows complete list of parameters in model 1
## lhs op rhs est se z pvalue ci.lower ci.upper std.lv std.all
## 1 cas.ce =~ cas01 0.859 0.040 21.283 0 0.780 0.938 0.859 0.709
## 2 cas.ce =~ cas02 0.897 0.041 22.005 0 0.817 0.977 0.897 0.741
## 3 cas.ce =~ cas03 0.614 0.047 12.971 0 0.522 0.707 0.614 0.659
## 4 cas.ce =~ cas04 0.545 0.045 12.048 0 0.456 0.633 0.545 0.618
## 5 cas.ce =~ cas05 0.913 0.043 21.361 0 0.829 0.997 0.913 0.577
## 6 cas.ce =~ cas06 0.806 0.049 16.581 0 0.711 0.901 0.806 0.454
## 7 cas.ce =~ cas07 0.478 0.045 10.642 0 0.390 0.566 0.478 0.541
## 8 cas.ce =~ cas08 0.828 0.043 19.122 0 0.743 0.912 0.828 0.545
## 9 cas.f =~ cas09 0.913 0.038 24.039 0 0.839 0.988 0.913 0.756
## 10 cas.f =~ cas10 0.843 0.049 17.308 0 0.748 0.939 0.843 0.527
## 11 cas.f =~ cas11 0.804 0.042 19.281 0 0.722 0.886 0.804 0.764
## 12 cas.f =~ cas12 0.836 0.036 23.230 0 0.766 0.907 0.836 0.710
## 13 cas.f =~ cas13 0.770 0.043 17.885 0 0.685 0.854 0.770 0.614
## 14 cas01 ~~ cas01 0.731 0.062 11.779 0 0.609 0.853 0.731 0.497
## 15 cas02 ~~ cas02 0.661 0.063 10.470 0 0.538 0.785 0.661 0.451
## 16 cas03 ~~ cas03 0.491 0.051 9.613 0 0.391 0.591 0.491 0.565
## 17 cas04 ~~ cas04 0.480 0.046 10.387 0 0.389 0.570 0.480 0.618
## 18 cas05 ~~ cas05 1.670 0.093 17.924 0 1.488 1.853 1.670 0.667
## 19 cas06 ~~ cas06 2.496 0.109 22.837 0 2.281 2.710 2.496 0.794
## 20 cas07 ~~ cas07 0.552 0.058 9.557 0 0.439 0.665 0.552 0.707
## 21 cas08 ~~ cas08 1.625 0.086 18.962 0 1.457 1.793 1.625 0.703
## 22 cas09 ~~ cas09 0.626 0.053 11.808 0 0.522 0.730 0.626 0.429
## 23 cas10 ~~ cas10 1.845 0.114 16.246 0 1.623 2.068 1.845 0.722
## 24 cas11 ~~ cas11 0.461 0.042 10.932 0 0.378 0.544 0.461 0.416
## 25 cas12 ~~ cas12 0.687 0.066 10.457 0 0.558 0.816 0.687 0.496
## 26 cas13 ~~ cas13 0.977 0.071 13.703 0 0.837 1.117 0.977 0.623
## 27 cas.ce ~~ cas.ce 1.000 0.000 NA NA 1.000 1.000 1.000 1.000
## 28 cas.f ~~ cas.f 1.000 0.000 NA NA 1.000 1.000 1.000 1.000
## 29 cas.ce ~~ cas.f 0.967 0.016 60.473 0 0.936 0.999 0.967 0.967
## std.nox
## 1 0.709
## 2 0.741
## 3 0.659
## 4 0.618
## 5 0.577
## 6 0.454
## 7 0.541
## 8 0.545
## 9 0.756
## 10 0.527
## 11 0.764
## 12 0.710
## 13 0.614
## 14 0.497
## 15 0.451
## 16 0.565
## 17 0.618
## 18 0.667
## 19 0.794
## 20 0.707
## 21 0.703
## 22 0.429
## 23 0.722
## 24 0.416
## 25 0.496
## 26 0.623
## 27 1.000
## 28 1.000
## 29 0.967
Factor loadings
library(dplyr)
library(tidyr)
library(knitr)
options(knitr.kable.NA = '')
parameterEstimates(fit.2, standardized=TRUE) %>%
filter(op == "=~") %>%
select('Latent Factor'=lhs, Indicator=rhs, B=est, SE=se, Z=z, 'p-value'= pvalue, Beta=std.all) %>%
kable(digits = 3, format="pandoc", caption="Factor Loadings")
| Latent Factor | Indicator | B | SE | Z | p-value | Beta |
|---|---|---|---|---|---|---|
| cas.ce | cas01 | 0.859 | 0.040 | 21.283 | 0 | 0.709 |
| cas.ce | cas02 | 0.897 | 0.041 | 22.005 | 0 | 0.741 |
| cas.ce | cas03 | 0.614 | 0.047 | 12.971 | 0 | 0.659 |
| cas.ce | cas04 | 0.545 | 0.045 | 12.048 | 0 | 0.618 |
| cas.ce | cas05 | 0.913 | 0.043 | 21.361 | 0 | 0.577 |
| cas.ce | cas06 | 0.806 | 0.049 | 16.581 | 0 | 0.454 |
| cas.ce | cas07 | 0.478 | 0.045 | 10.642 | 0 | 0.541 |
| cas.ce | cas08 | 0.828 | 0.043 | 19.122 | 0 | 0.545 |
| cas.f | cas09 | 0.913 | 0.038 | 24.039 | 0 | 0.756 |
| cas.f | cas10 | 0.843 | 0.049 | 17.308 | 0 | 0.527 |
| cas.f | cas11 | 0.804 | 0.042 | 19.281 | 0 | 0.764 |
| cas.f | cas12 | 0.836 | 0.036 | 23.230 | 0 | 0.710 |
| cas.f | cas13 | 0.770 | 0.043 | 17.885 | 0 | 0.614 |
Modification indices
mod_ind <- modificationindices(fit.2)
head(mod_ind[order(mod_ind$mi, decreasing=TRUE), ], 10) #Spotting the top 10
## lhs op rhs mi epc sepc.lv sepc.all sepc.nox
## 87 cas05 ~~ cas08 128.007 0.623 0.623 0.378 0.378
## 66 cas03 ~~ cas04 42.000 0.109 0.109 0.225 0.225
## 79 cas04 ~~ cas08 33.133 -0.171 -0.171 -0.194 -0.194
## 89 cas05 ~~ cas10 30.502 0.322 0.322 0.184 0.184
## 60 cas02 ~~ cas08 28.127 -0.195 -0.195 -0.188 -0.188
## 35 cas.f =~ cas01 27.690 1.844 1.844 1.521 1.521
## 47 cas01 ~~ cas06 27.534 -0.243 -0.243 -0.180 -0.180
## 37 cas.f =~ cas03 25.639 -1.376 -1.376 -1.477 -1.477
## 99 cas06 ~~ cas13 24.109 0.254 0.254 0.163 0.163
## 43 cas01 ~~ cas02 22.579 0.126 0.126 0.181 0.181
subset(mod_ind[order(mod_ind$mi, decreasing=TRUE), ], mi > 5) #bigger than 5
## lhs op rhs mi epc sepc.lv sepc.all sepc.nox
## 87 cas05 ~~ cas08 128.007 0.623 0.623 0.378 0.378
## 66 cas03 ~~ cas04 42.000 0.109 0.109 0.225 0.225
## 79 cas04 ~~ cas08 33.133 -0.171 -0.171 -0.194 -0.194
## 89 cas05 ~~ cas10 30.502 0.322 0.322 0.184 0.184
## 60 cas02 ~~ cas08 28.127 -0.195 -0.195 -0.188 -0.188
## 35 cas.f =~ cas01 27.690 1.844 1.844 1.521 1.521
## 47 cas01 ~~ cas06 27.534 -0.243 -0.243 -0.180 -0.180
## 37 cas.f =~ cas03 25.639 -1.376 -1.376 -1.477 -1.477
## 99 cas06 ~~ cas13 24.109 0.254 0.254 0.163 0.163
## 43 cas01 ~~ cas02 22.579 0.126 0.126 0.181 0.181
## 78 cas04 ~~ cas07 21.875 0.081 0.081 0.158 0.158
## 118 cas11 ~~ cas12 21.326 0.103 0.103 0.183 0.183
## 53 cas01 ~~ cas12 19.768 0.115 0.115 0.162 0.162
## 74 cas03 ~~ cas12 19.337 -0.091 -0.091 -0.157 -0.157
## 55 cas02 ~~ cas03 19.191 0.092 0.092 0.162 0.162
## 76 cas04 ~~ cas05 19.024 -0.133 -0.133 -0.148 -0.148
## 101 cas07 ~~ cas09 18.789 -0.090 -0.090 -0.153 -0.153
## 107 cas08 ~~ cas10 18.529 0.246 0.246 0.142 0.142
## 57 cas02 ~~ cas05 18.408 -0.161 -0.161 -0.153 -0.153
## 93 cas06 ~~ cas07 17.814 0.163 0.163 0.139 0.139
## 102 cas07 ~~ cas10 15.461 -0.131 -0.131 -0.130 -0.130
## 97 cas06 ~~ cas11 14.892 -0.145 -0.145 -0.135 -0.135
## 69 cas03 ~~ cas07 14.569 0.068 0.068 0.130 0.130
## 46 cas01 ~~ cas05 11.794 -0.133 -0.133 -0.121 -0.121
## 92 cas05 ~~ cas13 11.762 0.148 0.148 0.116 0.116
## 115 cas10 ~~ cas11 11.485 -0.113 -0.113 -0.122 -0.122
## 59 cas02 ~~ cas07 11.296 -0.072 -0.072 -0.119 -0.119
## 56 cas02 ~~ cas04 9.865 0.064 0.064 0.114 0.114
## 70 cas03 ~~ cas08 9.501 -0.094 -0.094 -0.105 -0.105
## 48 cas01 ~~ cas07 9.388 -0.068 -0.068 -0.107 -0.107
## 44 cas01 ~~ cas03 9.012 -0.065 -0.065 -0.108 -0.108
## 42 cas.f =~ cas08 8.646 1.349 1.349 0.888 0.888
## 38 cas.f =~ cas04 7.624 -0.718 -0.718 -0.814 -0.814
## 39 cas.f =~ cas05 6.698 1.224 1.224 0.773 0.773
## 85 cas05 ~~ cas06 6.413 0.171 0.171 0.084 0.084
## 111 cas09 ~~ cas10 6.158 0.096 0.096 0.089 0.089
## 45 cas01 ~~ cas04 5.932 -0.051 -0.051 -0.087 -0.087
## 41 cas.f =~ cas07 5.059 -0.601 -0.601 -0.680 -0.680
Variance-Covariance-Matrix
inspect(fit.2, "sampstat")$cov #empirisch
## cas01 cas02 cas03 cas04 cas05 cas06 cas07 cas08 cas09 cas10 cas11 cas12
## cas01 1.469
## cas02 0.857 1.466
## cas03 0.479 0.618 0.868
## cas04 0.428 0.537 0.424 0.776
## cas05 0.678 0.694 0.526 0.384 2.504
## cas06 0.488 0.648 0.532 0.510 0.891 3.145
## cas07 0.355 0.372 0.351 0.331 0.436 0.534 0.781
## cas08 0.709 0.589 0.429 0.302 1.307 0.680 0.417 2.309
## cas09 0.798 0.822 0.507 0.458 0.784 0.770 0.346 0.757 1.460
## cas10 0.723 0.711 0.453 0.407 1.045 0.682 0.269 0.910 0.844 2.557
## cas11 0.709 0.670 0.476 0.422 0.712 0.510 0.398 0.650 0.731 0.593 1.108
## cas12 0.787 0.731 0.417 0.400 0.712 0.585 0.391 0.686 0.756 0.651 0.737 1.386
## cas13 0.604 0.645 0.447 0.408 0.820 0.833 0.383 0.659 0.712 0.711 0.581 0.596
## cas13
## cas01
## cas02
## cas03
## cas04
## cas05
## cas06
## cas07
## cas08
## cas09
## cas10
## cas11
## cas12
## cas13 1.569
fitted(fit.2)$cov #modellimpliziert
## cas01 cas02 cas03 cas04 cas05 cas06 cas07 cas08 cas09 cas10 cas11 cas12
## cas01 1.469
## cas02 0.771 1.466
## cas03 0.528 0.551 0.868
## cas04 0.468 0.489 0.335 0.776
## cas05 0.785 0.819 0.561 0.498 2.504
## cas06 0.692 0.723 0.495 0.439 0.736 3.145
## cas07 0.411 0.429 0.294 0.260 0.436 0.385 0.781
## cas08 0.711 0.742 0.508 0.451 0.756 0.667 0.395 2.309
## cas09 0.759 0.793 0.543 0.481 0.807 0.712 0.422 0.731 1.460
## cas10 0.701 0.732 0.501 0.445 0.745 0.658 0.390 0.675 0.770 2.557
## cas11 0.669 0.698 0.478 0.424 0.710 0.627 0.372 0.644 0.735 0.678 1.108
## cas12 0.695 0.726 0.497 0.441 0.739 0.652 0.386 0.669 0.764 0.705 0.672 1.386
## cas13 0.640 0.668 0.457 0.406 0.680 0.600 0.356 0.616 0.703 0.649 0.619 0.643
## cas13
## cas01
## cas02
## cas03
## cas04
## cas05
## cas06
## cas07
## cas08
## cas09
## cas10
## cas11
## cas12
## cas13 1.569
Standardized residuals
cov_table <- resid(fit.2, type="standardized")$cov
cov_table[upper.tri(cov_table)] <- NA #erase the upper triangle
diag(cov_table) <- NA #erase the diagonal 0's
kable(cov_table, digits=2) #makes a nice table and rounds everyhing to 2 digits
| cas01 | cas02 | cas03 | cas04 | cas05 | cas06 | cas07 | cas08 | cas09 | cas10 | cas11 | cas12 | cas13 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| cas01 | |||||||||||||
| cas02 | 1.99 | ||||||||||||
| cas03 | -2.41 | 3.02 | |||||||||||
| cas04 | -1.79 | 1.98 | 3.88 | ||||||||||
| cas05 | -2.80 | -3.45 | -1.01 | -3.88 | |||||||||
| cas06 | -4.98 | -2.05 | 1.12 | 2.14 | 2.32 | ||||||||
| cas07 | -2.37 | -2.35 | 2.82 | 2.80 | 0.00 | 3.60 | |||||||
| cas08 | -0.06 | -4.45 | -2.92 | -4.99 | 7.62 | 0.19 | 0.59 | ||||||
| cas09 | 1.20 | 1.00 | -1.66 | -1.15 | -0.70 | 1.46 | -3.54 | 0.77 | |||||
| cas10 | 0.53 | -0.54 | -1.40 | -1.14 | 4.60 | 0.35 | -3.31 | 3.62 | 2.02 | ||||
| cas11 | 1.54 | -1.28 | -0.11 | -0.08 | 0.05 | -3.58 | 1.25 | 0.22 | -0.22 | -3.26 | |||
| cas12 | 2.25 | 0.12 | -3.81 | -1.93 | -0.64 | -1.55 | 0.21 | 0.37 | -0.35 | -1.45 | 2.47 | ||
| cas13 | -1.11 | -0.76 | -0.31 | 0.10 | 2.96 | 4.22 | 1.02 | 1.05 | 0.32 | 1.24 | -1.54 | -1.48 |
Load package
library(semPlot)
## Registered S3 methods overwritten by 'lme4':
## method from
## cooks.distance.influence.merMod car
## influence.merMod car
## dfbeta.influence.merMod car
## dfbetas.influence.merMod car
## Registered S3 methods overwritten by 'huge':
## method from
## plot.sim BDgraph
## print.sim BDgraph
semPaths(fit.2, rotation = 2, nodeLabels=1:13)
Create the vector for the node labels
nodeLabels <- c("1", "2", "3", "4", "5", "6", "7", "8",
"9", "10", "11", "12", "13",
"cognitive-emotional impairment",
"functional impairment"
)
Create a character vector for the order of latent variables
latents <- c("cas.ce", "cas.f")
Plot
semPaths(fit.2,
style = "lisrel", #small arrows for residuals instead of half-circles
whatLabels = "std.all", #labels paths with standardized coefficients
nCharNodes = 0, #factor names not abbreviated
rotation = 2, #rotates the graph around, #s 1, 2, 3, 4
layout = "tree3",
curvePivot = TRUE, #makes curves straight with rounded edges
curvePivotShape = 2.1, #influences how round the curve around the pivot is
edge.label.cex = .5, #size of the edge labels
cardinal = TRUE, #all edge labels end in the middle/cardinal point of a node
sizeMan = 5, #size of manifest variables
sizeMan2 = 2, #height of manifest variables
sizeLat =10, #size of latent variables
sizeLat2 = 10, #height of latent variables
nodeLabels = nodeLabels,#vector that names the nodes
latents = latents #vector that reorders the nodes
)
CFA.1 <- ' cas.1 =~ cas01 + cas02 + cas03 + cas04 + cas05 + cas06 + cas07 + cas08 + cas09 + cas10 + cas11 + cas12 + cas13'
fit.1 <- cfa(CFA.1, std.lv=TRUE, data=data, estimator = "MLM")
summary(fit.1, fit.measures=TRUE, standardized=TRUE, rsquare=TRUE)
## lavaan 0.6-7 ended normally after 20 iterations
##
## Estimator ML
## Optimization method NLMINB
## Number of free parameters 26
##
## Number of observations 1011
##
## Model Test User Model:
## Standard Robust
## Test Statistic 576.198 325.719
## Degrees of freedom 65 65
## P-value (Chi-square) 0.000 0.000
## Scaling correction factor 1.769
## Satorra-Bentler correction
##
## Model Test Baseline Model:
##
## Test statistic 5194.208 2748.574
## Degrees of freedom 78 78
## P-value 0.000 0.000
## Scaling correction factor 1.890
##
## User Model versus Baseline Model:
##
## Comparative Fit Index (CFI) 0.900 0.902
## Tucker-Lewis Index (TLI) 0.880 0.883
##
## Robust Comparative Fit Index (CFI) 0.909
## Robust Tucker-Lewis Index (TLI) 0.890
##
## Loglikelihood and Information Criteria:
##
## Loglikelihood user model (H0) -18980.190 -18980.190
## Loglikelihood unrestricted model (H1) -18692.091 -18692.091
##
## Akaike (AIC) 38012.379 38012.379
## Bayesian (BIC) 38140.265 38140.265
## Sample-size adjusted Bayesian (BIC) 38057.687 38057.687
##
## Root Mean Square Error of Approximation:
##
## RMSEA 0.088 0.063
## 90 Percent confidence interval - lower 0.082 0.058
## 90 Percent confidence interval - upper 0.095 0.068
## P-value RMSEA <= 0.05 0.000 0.000
##
## Robust RMSEA 0.084
## 90 Percent confidence interval - lower 0.075
## 90 Percent confidence interval - upper 0.093
##
## Standardized Root Mean Square Residual:
##
## SRMR 0.052 0.052
##
## Parameter Estimates:
##
## Standard errors Robust.sem
## Information Expected
## Information saturated (h1) model Structured
##
## Latent Variables:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## cas.1 =~
## cas01 0.859 0.040 21.451 0.000 0.859 0.708
## cas02 0.888 0.041 21.833 0.000 0.888 0.733
## cas03 0.604 0.047 12.843 0.000 0.604 0.648
## cas04 0.537 0.045 11.936 0.000 0.537 0.610
## cas05 0.914 0.042 21.677 0.000 0.914 0.577
## cas06 0.801 0.048 16.554 0.000 0.801 0.451
## cas07 0.472 0.045 10.558 0.000 0.472 0.534
## cas08 0.829 0.043 19.427 0.000 0.829 0.546
## cas09 0.902 0.037 24.368 0.000 0.902 0.747
## cas10 0.840 0.048 17.364 0.000 0.840 0.525
## cas11 0.795 0.041 19.165 0.000 0.795 0.755
## cas12 0.826 0.036 23.154 0.000 0.826 0.701
## cas13 0.767 0.043 17.992 0.000 0.767 0.612
##
## Variances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .cas01 0.732 0.061 11.931 0.000 0.732 0.498
## .cas02 0.678 0.063 10.717 0.000 0.678 0.462
## .cas03 0.504 0.052 9.742 0.000 0.504 0.580
## .cas04 0.488 0.047 10.452 0.000 0.488 0.629
## .cas05 1.669 0.093 17.907 0.000 1.669 0.667
## .cas06 2.504 0.109 23.018 0.000 2.504 0.796
## .cas07 0.558 0.059 9.517 0.000 0.558 0.715
## .cas08 1.622 0.086 18.956 0.000 1.622 0.702
## .cas09 0.646 0.051 12.609 0.000 0.646 0.443
## .cas10 1.852 0.112 16.466 0.000 1.852 0.724
## .cas11 0.476 0.042 11.295 0.000 0.476 0.430
## .cas12 0.705 0.064 11.047 0.000 0.705 0.508
## .cas13 0.981 0.071 13.894 0.000 0.981 0.625
## cas.1 1.000 1.000 1.000
##
## R-Square:
## Estimate
## cas01 0.502
## cas02 0.538
## cas03 0.420
## cas04 0.371
## cas05 0.333
## cas06 0.204
## cas07 0.285
## cas08 0.298
## cas09 0.557
## cas10 0.276
## cas11 0.570
## cas12 0.492
## cas13 0.375
parameterEstimates(fit.1, standardized=TRUE) #shows complete list of parameters in model 1
## lhs op rhs est se z pvalue ci.lower ci.upper std.lv std.all
## 1 cas.1 =~ cas01 0.859 0.040 21.451 0 0.780 0.937 0.859 0.708
## 2 cas.1 =~ cas02 0.888 0.041 21.833 0 0.808 0.968 0.888 0.733
## 3 cas.1 =~ cas03 0.604 0.047 12.843 0 0.512 0.696 0.604 0.648
## 4 cas.1 =~ cas04 0.537 0.045 11.936 0 0.449 0.625 0.537 0.610
## 5 cas.1 =~ cas05 0.914 0.042 21.677 0 0.831 0.996 0.914 0.577
## 6 cas.1 =~ cas06 0.801 0.048 16.554 0 0.706 0.895 0.801 0.451
## 7 cas.1 =~ cas07 0.472 0.045 10.558 0 0.384 0.559 0.472 0.534
## 8 cas.1 =~ cas08 0.829 0.043 19.427 0 0.746 0.913 0.829 0.546
## 9 cas.1 =~ cas09 0.902 0.037 24.368 0 0.830 0.975 0.902 0.747
## 10 cas.1 =~ cas10 0.840 0.048 17.364 0 0.745 0.934 0.840 0.525
## 11 cas.1 =~ cas11 0.795 0.041 19.165 0 0.713 0.876 0.795 0.755
## 12 cas.1 =~ cas12 0.826 0.036 23.154 0 0.756 0.896 0.826 0.701
## 13 cas.1 =~ cas13 0.767 0.043 17.992 0 0.683 0.850 0.767 0.612
## 14 cas01 ~~ cas01 0.732 0.061 11.931 0 0.612 0.852 0.732 0.498
## 15 cas02 ~~ cas02 0.678 0.063 10.717 0 0.554 0.802 0.678 0.462
## 16 cas03 ~~ cas03 0.504 0.052 9.742 0 0.402 0.605 0.504 0.580
## 17 cas04 ~~ cas04 0.488 0.047 10.452 0 0.396 0.579 0.488 0.629
## 18 cas05 ~~ cas05 1.669 0.093 17.907 0 1.487 1.852 1.669 0.667
## 19 cas06 ~~ cas06 2.504 0.109 23.018 0 2.291 2.717 2.504 0.796
## 20 cas07 ~~ cas07 0.558 0.059 9.517 0 0.443 0.673 0.558 0.715
## 21 cas08 ~~ cas08 1.622 0.086 18.956 0 1.454 1.789 1.622 0.702
## 22 cas09 ~~ cas09 0.646 0.051 12.609 0 0.546 0.747 0.646 0.443
## 23 cas10 ~~ cas10 1.852 0.112 16.466 0 1.631 2.072 1.852 0.724
## 24 cas11 ~~ cas11 0.476 0.042 11.295 0 0.393 0.559 0.476 0.430
## 25 cas12 ~~ cas12 0.705 0.064 11.047 0 0.580 0.830 0.705 0.508
## 26 cas13 ~~ cas13 0.981 0.071 13.894 0 0.843 1.120 0.981 0.625
## 27 cas.1 ~~ cas.1 1.000 0.000 NA NA 1.000 1.000 1.000 1.000
## std.nox
## 1 0.708
## 2 0.733
## 3 0.648
## 4 0.610
## 5 0.577
## 6 0.451
## 7 0.534
## 8 0.546
## 9 0.747
## 10 0.525
## 11 0.755
## 12 0.701
## 13 0.612
## 14 0.498
## 15 0.462
## 16 0.580
## 17 0.629
## 18 0.667
## 19 0.796
## 20 0.715
## 21 0.702
## 22 0.443
## 23 0.724
## 24 0.430
## 25 0.508
## 26 0.625
## 27 1.000
Factor loadings
options(knitr.kable.NA = '')
parameterEstimates(fit.1, standardized=TRUE) %>%
filter(op == "=~") %>%
select('Latent Factor'=lhs, Indicator=rhs, B=est, SE=se, Z=z, 'p-value'= pvalue, Beta=std.all) %>%
kable(digits = 3, format="pandoc", caption="Factor Loadings")
| Latent Factor | Indicator | B | SE | Z | p-value | Beta |
|---|---|---|---|---|---|---|
| cas.1 | cas01 | 0.859 | 0.040 | 21.451 | 0 | 0.708 |
| cas.1 | cas02 | 0.888 | 0.041 | 21.833 | 0 | 0.733 |
| cas.1 | cas03 | 0.604 | 0.047 | 12.843 | 0 | 0.648 |
| cas.1 | cas04 | 0.537 | 0.045 | 11.936 | 0 | 0.610 |
| cas.1 | cas05 | 0.914 | 0.042 | 21.677 | 0 | 0.577 |
| cas.1 | cas06 | 0.801 | 0.048 | 16.554 | 0 | 0.451 |
| cas.1 | cas07 | 0.472 | 0.045 | 10.558 | 0 | 0.534 |
| cas.1 | cas08 | 0.829 | 0.043 | 19.427 | 0 | 0.546 |
| cas.1 | cas09 | 0.902 | 0.037 | 24.368 | 0 | 0.747 |
| cas.1 | cas10 | 0.840 | 0.048 | 17.364 | 0 | 0.525 |
| cas.1 | cas11 | 0.795 | 0.041 | 19.165 | 0 | 0.755 |
| cas.1 | cas12 | 0.826 | 0.036 | 23.154 | 0 | 0.701 |
| cas.1 | cas13 | 0.767 | 0.043 | 17.992 | 0 | 0.612 |
Modification indices
mod_ind <- modificationindices(fit.1)
head(mod_ind[order(mod_ind$mi, decreasing=TRUE), ], 10) #Spotting the top 10
## lhs op rhs mi epc sepc.lv sepc.all sepc.nox
## 72 cas05 ~~ cas08 125.355 0.611 0.611 0.371 0.371
## 51 cas03 ~~ cas04 48.206 0.117 0.117 0.236 0.236
## 64 cas04 ~~ cas08 29.578 -0.161 -0.161 -0.181 -0.181
## 74 cas05 ~~ cas10 27.900 0.307 0.307 0.175 0.175
## 103 cas11 ~~ cas12 27.087 0.111 0.111 0.191 0.191
## 40 cas02 ~~ cas03 25.462 0.105 0.105 0.179 0.179
## 32 cas01 ~~ cas06 25.461 -0.231 -0.231 -0.171 -0.171
## 63 cas04 ~~ cas07 25.094 0.087 0.087 0.167 0.167
## 28 cas01 ~~ cas02 24.323 0.126 0.126 0.180 0.180
## 45 cas02 ~~ cas08 24.284 -0.179 -0.179 -0.171 -0.171
subset(mod_ind[order(mod_ind$mi, decreasing=TRUE), ], mi > 5) #bigger than 5
## lhs op rhs mi epc sepc.lv sepc.all sepc.nox
## 72 cas05 ~~ cas08 125.355 0.611 0.611 0.371 0.371
## 51 cas03 ~~ cas04 48.206 0.117 0.117 0.236 0.236
## 64 cas04 ~~ cas08 29.578 -0.161 -0.161 -0.181 -0.181
## 74 cas05 ~~ cas10 27.900 0.307 0.307 0.175 0.175
## 103 cas11 ~~ cas12 27.087 0.111 0.111 0.191 0.191
## 40 cas02 ~~ cas03 25.462 0.105 0.105 0.179 0.179
## 32 cas01 ~~ cas06 25.461 -0.231 -0.231 -0.171 -0.171
## 63 cas04 ~~ cas07 25.094 0.087 0.087 0.167 0.167
## 28 cas01 ~~ cas02 24.323 0.126 0.126 0.180 0.180
## 45 cas02 ~~ cas08 24.284 -0.179 -0.179 -0.171 -0.171
## 59 cas03 ~~ cas12 23.486 -0.101 -0.101 -0.170 -0.170
## 86 cas07 ~~ cas09 21.752 -0.098 -0.098 -0.162 -0.162
## 84 cas06 ~~ cas13 21.729 0.241 0.241 0.154 0.154
## 78 cas06 ~~ cas07 19.123 0.169 0.169 0.143 0.143
## 54 cas03 ~~ cas07 18.103 0.076 0.076 0.143 0.143
## 87 cas07 ~~ cas10 17.248 -0.139 -0.139 -0.137 -0.137
## 92 cas08 ~~ cas10 16.860 0.234 0.234 0.135 0.135
## 82 cas06 ~~ cas11 16.362 -0.153 -0.153 -0.140 -0.140
## 61 cas04 ~~ cas05 16.101 -0.121 -0.121 -0.135 -0.135
## 38 cas01 ~~ cas12 15.632 0.102 0.102 0.142 0.142
## 42 cas02 ~~ cas05 14.999 -0.144 -0.144 -0.135 -0.135
## 41 cas02 ~~ cas04 13.841 0.075 0.075 0.131 0.131
## 31 cas01 ~~ cas05 11.383 -0.129 -0.129 -0.116 -0.116
## 77 cas05 ~~ cas13 10.071 0.136 0.136 0.107 0.107
## 100 cas10 ~~ cas11 7.874 -0.092 -0.092 -0.098 -0.098
## 96 cas09 ~~ cas10 7.674 0.105 0.105 0.096 0.096
## 55 cas03 ~~ cas08 7.338 -0.082 -0.082 -0.091 -0.091
## 33 cas01 ~~ cas07 7.278 -0.059 -0.059 -0.092 -0.092
## 44 cas02 ~~ cas07 7.108 -0.057 -0.057 -0.092 -0.092
## 68 cas04 ~~ cas12 6.858 -0.053 -0.053 -0.091 -0.091
## 70 cas05 ~~ cas06 6.685 0.174 0.174 0.085 0.085
## 62 cas04 ~~ cas06 5.790 0.088 0.088 0.079 0.079
## 56 cas03 ~~ cas09 5.775 -0.049 -0.049 -0.086 -0.086
## 48 cas02 ~~ cas11 5.623 -0.050 -0.050 -0.089 -0.089
## 29 cas01 ~~ cas03 5.414 -0.050 -0.050 -0.082 -0.082
## 39 cas01 ~~ cas13 5.025 -0.066 -0.066 -0.078 -0.078
Variance-Covariance-Matrix
inspect(fit.1, "sampstat")$cov #empirisch
## cas01 cas02 cas03 cas04 cas05 cas06 cas07 cas08 cas09 cas10 cas11 cas12
## cas01 1.469
## cas02 0.857 1.466
## cas03 0.479 0.618 0.868
## cas04 0.428 0.537 0.424 0.776
## cas05 0.678 0.694 0.526 0.384 2.504
## cas06 0.488 0.648 0.532 0.510 0.891 3.145
## cas07 0.355 0.372 0.351 0.331 0.436 0.534 0.781
## cas08 0.709 0.589 0.429 0.302 1.307 0.680 0.417 2.309
## cas09 0.798 0.822 0.507 0.458 0.784 0.770 0.346 0.757 1.460
## cas10 0.723 0.711 0.453 0.407 1.045 0.682 0.269 0.910 0.844 2.557
## cas11 0.709 0.670 0.476 0.422 0.712 0.510 0.398 0.650 0.731 0.593 1.108
## cas12 0.787 0.731 0.417 0.400 0.712 0.585 0.391 0.686 0.756 0.651 0.737 1.386
## cas13 0.604 0.645 0.447 0.408 0.820 0.833 0.383 0.659 0.712 0.711 0.581 0.596
## cas13
## cas01
## cas02
## cas03
## cas04
## cas05
## cas06
## cas07
## cas08
## cas09
## cas10
## cas11
## cas12
## cas13 1.569
fitted(fit.1)$cov #modellimpliziert
## cas01 cas02 cas03 cas04 cas05 cas06 cas07 cas08 cas09 cas10 cas11 cas12
## cas01 1.469
## cas02 0.763 1.466
## cas03 0.518 0.536 0.868
## cas04 0.461 0.477 0.324 0.776
## cas05 0.785 0.811 0.552 0.491 2.504
## cas06 0.688 0.711 0.483 0.430 0.731 3.145
## cas07 0.405 0.419 0.285 0.253 0.431 0.378 0.781
## cas08 0.712 0.736 0.501 0.445 0.758 0.664 0.391 2.309
## cas09 0.775 0.801 0.545 0.485 0.824 0.722 0.426 0.748 1.460
## cas10 0.721 0.746 0.507 0.451 0.767 0.672 0.396 0.696 0.758 2.557
## cas11 0.682 0.706 0.480 0.427 0.726 0.636 0.375 0.659 0.717 0.667 1.108
## cas12 0.709 0.733 0.498 0.443 0.754 0.661 0.389 0.685 0.745 0.693 0.656 1.386
## cas13 0.658 0.681 0.463 0.412 0.700 0.614 0.362 0.636 0.692 0.644 0.609 0.633
## cas13
## cas01
## cas02
## cas03
## cas04
## cas05
## cas06
## cas07
## cas08
## cas09
## cas10
## cas11
## cas12
## cas13 1.569
Standardized residuals
cov_table <- resid(fit.1, type="standardized")$cov
cov_table[upper.tri(cov_table)] <- NA #erase the upper triangle
diag(cov_table) <- NA #erase the diagonal 0's
kable(cov_table, digits=2) #makes a nice table and rounds everyhing to 2 digits
| cas01 | cas02 | cas03 | cas04 | cas05 | cas06 | cas07 | cas08 | cas09 | cas10 | cas11 | cas12 | cas13 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| cas01 | |||||||||||||
| cas02 | 2.18 | ||||||||||||
| cas03 | -1.82 | 3.43 | |||||||||||
| cas04 | -1.44 | 2.31 | 4.12 | ||||||||||
| cas05 | -2.79 | -3.02 | -0.72 | -3.60 | |||||||||
| cas06 | -4.81 | -1.60 | 1.44 | 2.38 | 2.38 | ||||||||
| cas07 | -2.11 | -1.77 | 3.10 | 3.02 | 0.14 | 3.67 | |||||||
| cas08 | -0.09 | -4.05 | -2.63 | -4.79 | 7.56 | 0.24 | 0.69 | ||||||
| cas09 | 0.76 | 0.72 | -1.77 | -1.32 | -1.25 | 1.21 | -3.70 | 0.27 | |||||
| cas10 | 0.04 | -0.92 | -1.60 | -1.37 | 4.31 | 0.14 | -3.48 | 3.33 | 2.31 | ||||
| cas11 | 1.09 | -1.65 | -0.19 | -0.23 | -0.49 | -3.91 | 1.11 | -0.30 | 0.64 | -2.75 | |||
| cas12 | 1.97 | -0.06 | -3.86 | -2.10 | -1.04 | -1.79 | 0.08 | 0.02 | 0.42 | -1.06 | 2.73 | ||
| cas13 | -1.77 | -1.23 | -0.48 | -0.13 | 2.56 | 3.99 | 0.80 | 0.57 | 0.69 | 1.32 | -1.09 | -1.09 |
cas06: “I go away by myself and think about why I feel this way about climate change.”
Increases the number of rows that can be printed
options(max.print = 10000000)
Load package
library(MVN)
Create data frame with all CAS items
data.cas.items = data.frame(data$cas01, data$cas02, data$cas03, data$cas04, data$cas05,
data$cas07, data$cas08, data$cas09, data$cas10,
data$cas11, data$cas12, data$cas13)
Check for overall multivariate normality (Doornik-Hansen’s test)
result <- mvn(data = data.cas.items, mvnTest = "dh")
result$multivariateNormality
## Test E df p value MVN
## 1 Doornik-Hansen 3231.153 24 0 NO
Inspect data visually
mvn(data = data.cas.items, mvnTest = "royston", univariatePlot = "histogram") #create histograms for all items
## $multivariateNormality
## Test H p value MVN
## 1 Royston 2235.181 0 NO
##
## $univariateNormality
## Test Variable Statistic p value Normality
## 1 Shapiro-Wilk data.cas01 0.6995 <0.001 NO
## 2 Shapiro-Wilk data.cas02 0.6459 <0.001 NO
## 3 Shapiro-Wilk data.cas03 0.5015 <0.001 NO
## 4 Shapiro-Wilk data.cas04 0.4461 <0.001 NO
## 5 Shapiro-Wilk data.cas05 0.8190 <0.001 NO
## 6 Shapiro-Wilk data.cas07 0.4546 <0.001 NO
## 7 Shapiro-Wilk data.cas08 0.8195 <0.001 NO
## 8 Shapiro-Wilk data.cas09 0.7095 <0.001 NO
## 9 Shapiro-Wilk data.cas10 0.8082 <0.001 NO
## 10 Shapiro-Wilk data.cas11 0.6046 <0.001 NO
## 11 Shapiro-Wilk data.cas12 0.6878 <0.001 NO
## 12 Shapiro-Wilk data.cas13 0.6772 <0.001 NO
##
## $Descriptives
## n Mean Std.Dev Median Min Max 25th 75th Skew
## data.cas01 1011 1.797230 1.2127345 1 1 7 1 2 1.4967847
## data.cas02 1011 1.709199 1.2115388 1 1 7 1 2 1.7644041
## data.cas03 1011 1.404550 0.9321215 1 1 7 1 1 2.6490997
## data.cas04 1011 1.340257 0.8815780 1 1 6 1 1 2.8944303
## data.cas05 1011 2.415430 1.5831787 2 1 7 1 4 0.7434305
## data.cas07 1011 1.347181 0.8839266 1 1 7 1 1 2.9857836
## data.cas08 1011 2.382789 1.5204417 2 1 7 1 4 0.7145041
## data.cas09 1011 1.818002 1.2090879 1 1 7 1 2 1.3622052
## data.cas10 1011 2.359050 1.5997106 2 1 7 1 4 0.9505459
## data.cas11 1011 1.569733 1.0529703 1 1 7 1 2 1.9562626
## data.cas12 1011 1.761622 1.1779958 1 1 7 1 2 1.5254178
## data.cas13 1011 1.785361 1.2532822 1 1 7 1 2 1.5398025
## Kurtosis
## data.cas01 1.5709958
## data.cas02 2.4588235
## data.cas03 7.1313151
## data.cas04 8.2444201
## data.cas05 -0.6184192
## data.cas07 9.5771361
## data.cas08 -0.5767031
## data.cas09 0.8431063
## data.cas10 -0.1573717
## data.cas11 3.3583627
## data.cas12 1.7141854
## data.cas13 1.4531344
mvn(data = data.cas.items, mvnTest = "royston", univariatePlot = "qqplot") #create Q-Q-plots for all items
## $multivariateNormality
## Test H p value MVN
## 1 Royston 2235.181 0 NO
##
## $univariateNormality
## Test Variable Statistic p value Normality
## 1 Shapiro-Wilk data.cas01 0.6995 <0.001 NO
## 2 Shapiro-Wilk data.cas02 0.6459 <0.001 NO
## 3 Shapiro-Wilk data.cas03 0.5015 <0.001 NO
## 4 Shapiro-Wilk data.cas04 0.4461 <0.001 NO
## 5 Shapiro-Wilk data.cas05 0.8190 <0.001 NO
## 6 Shapiro-Wilk data.cas07 0.4546 <0.001 NO
## 7 Shapiro-Wilk data.cas08 0.8195 <0.001 NO
## 8 Shapiro-Wilk data.cas09 0.7095 <0.001 NO
## 9 Shapiro-Wilk data.cas10 0.8082 <0.001 NO
## 10 Shapiro-Wilk data.cas11 0.6046 <0.001 NO
## 11 Shapiro-Wilk data.cas12 0.6878 <0.001 NO
## 12 Shapiro-Wilk data.cas13 0.6772 <0.001 NO
##
## $Descriptives
## n Mean Std.Dev Median Min Max 25th 75th Skew
## data.cas01 1011 1.797230 1.2127345 1 1 7 1 2 1.4967847
## data.cas02 1011 1.709199 1.2115388 1 1 7 1 2 1.7644041
## data.cas03 1011 1.404550 0.9321215 1 1 7 1 1 2.6490997
## data.cas04 1011 1.340257 0.8815780 1 1 6 1 1 2.8944303
## data.cas05 1011 2.415430 1.5831787 2 1 7 1 4 0.7434305
## data.cas07 1011 1.347181 0.8839266 1 1 7 1 1 2.9857836
## data.cas08 1011 2.382789 1.5204417 2 1 7 1 4 0.7145041
## data.cas09 1011 1.818002 1.2090879 1 1 7 1 2 1.3622052
## data.cas10 1011 2.359050 1.5997106 2 1 7 1 4 0.9505459
## data.cas11 1011 1.569733 1.0529703 1 1 7 1 2 1.9562626
## data.cas12 1011 1.761622 1.1779958 1 1 7 1 2 1.5254178
## data.cas13 1011 1.785361 1.2532822 1 1 7 1 2 1.5398025
## Kurtosis
## data.cas01 1.5709958
## data.cas02 2.4588235
## data.cas03 7.1313151
## data.cas04 8.2444201
## data.cas05 -0.6184192
## data.cas07 9.5771361
## data.cas08 -0.5767031
## data.cas09 0.8431063
## data.cas10 -0.1573717
## data.cas11 3.3583627
## data.cas12 1.7141854
## data.cas13 1.4531344
CFA.4 <- ' cas.ce =~ cas01 + cas02 + cas03 + cas04 + cas05 + cas07 + cas08
cas.f =~ cas09 + cas10 + cas11 + cas12 + cas13'
fit.4 <- cfa(CFA.4, std.lv=TRUE, data=data, estimator = "MLM")
summary(fit.4, fit.measures=TRUE, standardized=TRUE, rsquare=TRUE)
## lavaan 0.6-7 ended normally after 21 iterations
##
## Estimator ML
## Optimization method NLMINB
## Number of free parameters 25
##
## Number of observations 1011
##
## Model Test User Model:
## Standard Robust
## Test Statistic 484.041 255.932
## Degrees of freedom 53 53
## P-value (Chi-square) 0.000 0.000
## Scaling correction factor 1.891
## Satorra-Bentler correction
##
## Model Test Baseline Model:
##
## Test statistic 4906.745 2417.433
## Degrees of freedom 66 66
## P-value 0.000 0.000
## Scaling correction factor 2.030
##
## User Model versus Baseline Model:
##
## Comparative Fit Index (CFI) 0.911 0.914
## Tucker-Lewis Index (TLI) 0.889 0.893
##
## Robust Comparative Fit Index (CFI) 0.920
## Robust Tucker-Lewis Index (TLI) 0.900
##
## Loglikelihood and Information Criteria:
##
## Loglikelihood user model (H0) -17064.070 -17064.070
## Loglikelihood unrestricted model (H1) -16822.049 -16822.049
##
## Akaike (AIC) 34178.139 34178.139
## Bayesian (BIC) 34301.107 34301.107
## Sample-size adjusted Bayesian (BIC) 34221.705 34221.705
##
## Root Mean Square Error of Approximation:
##
## RMSEA 0.090 0.062
## 90 Percent confidence interval - lower 0.082 0.056
## 90 Percent confidence interval - upper 0.097 0.067
## P-value RMSEA <= 0.05 0.000 0.000
##
## Robust RMSEA 0.085
## 90 Percent confidence interval - lower 0.074
## 90 Percent confidence interval - upper 0.095
##
## Standardized Root Mean Square Residual:
##
## SRMR 0.051 0.051
##
## Parameter Estimates:
##
## Standard errors Robust.sem
## Information Expected
## Information saturated (h1) model Structured
##
## Latent Variables:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## cas.ce =~
## cas01 0.871 0.041 21.486 0.000 0.871 0.718
## cas02 0.902 0.041 21.894 0.000 0.902 0.745
## cas03 0.612 0.048 12.787 0.000 0.612 0.657
## cas04 0.541 0.045 11.925 0.000 0.541 0.614
## cas05 0.905 0.043 20.954 0.000 0.905 0.572
## cas07 0.471 0.045 10.479 0.000 0.471 0.533
## cas08 0.826 0.044 18.967 0.000 0.826 0.543
## cas.f =~
## cas09 0.911 0.038 23.827 0.000 0.911 0.754
## cas10 0.841 0.049 17.131 0.000 0.841 0.526
## cas11 0.809 0.042 19.345 0.000 0.809 0.769
## cas12 0.839 0.036 23.320 0.000 0.839 0.713
## cas13 0.761 0.043 17.618 0.000 0.761 0.607
##
## Covariances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## cas.ce ~~
## cas.f 0.967 0.016 59.853 0.000 0.967 0.967
##
## Variances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .cas01 0.711 0.061 11.589 0.000 0.711 0.484
## .cas02 0.653 0.062 10.509 0.000 0.653 0.446
## .cas03 0.494 0.052 9.506 0.000 0.494 0.569
## .cas04 0.484 0.047 10.349 0.000 0.484 0.623
## .cas05 1.685 0.094 17.885 0.000 1.685 0.673
## .cas07 0.559 0.059 9.459 0.000 0.559 0.716
## .cas08 1.628 0.086 18.844 0.000 1.628 0.705
## .cas09 0.631 0.053 11.816 0.000 0.631 0.432
## .cas10 1.848 0.114 16.175 0.000 1.848 0.723
## .cas11 0.453 0.042 10.776 0.000 0.453 0.409
## .cas12 0.682 0.065 10.541 0.000 0.682 0.492
## .cas13 0.990 0.072 13.664 0.000 0.990 0.631
## cas.ce 1.000 1.000 1.000
## cas.f 1.000 1.000 1.000
##
## R-Square:
## Estimate
## cas01 0.516
## cas02 0.554
## cas03 0.431
## cas04 0.377
## cas05 0.327
## cas07 0.284
## cas08 0.295
## cas09 0.568
## cas10 0.277
## cas11 0.591
## cas12 0.508
## cas13 0.369
parameterEstimates(fit.4, standardized=TRUE) #shows complete list of parameters in model 1
## lhs op rhs est se z pvalue ci.lower ci.upper std.lv std.all
## 1 cas.ce =~ cas01 0.871 0.041 21.486 0 0.791 0.950 0.871 0.718
## 2 cas.ce =~ cas02 0.902 0.041 21.894 0 0.821 0.982 0.902 0.745
## 3 cas.ce =~ cas03 0.612 0.048 12.787 0 0.518 0.706 0.612 0.657
## 4 cas.ce =~ cas04 0.541 0.045 11.925 0 0.452 0.630 0.541 0.614
## 5 cas.ce =~ cas05 0.905 0.043 20.954 0 0.820 0.989 0.905 0.572
## 6 cas.ce =~ cas07 0.471 0.045 10.479 0 0.383 0.559 0.471 0.533
## 7 cas.ce =~ cas08 0.826 0.044 18.967 0 0.740 0.911 0.826 0.543
## 8 cas.f =~ cas09 0.911 0.038 23.827 0 0.836 0.986 0.911 0.754
## 9 cas.f =~ cas10 0.841 0.049 17.131 0 0.745 0.938 0.841 0.526
## 10 cas.f =~ cas11 0.809 0.042 19.345 0 0.727 0.891 0.809 0.769
## 11 cas.f =~ cas12 0.839 0.036 23.320 0 0.769 0.910 0.839 0.713
## 12 cas.f =~ cas13 0.761 0.043 17.618 0 0.676 0.845 0.761 0.607
## 13 cas01 ~~ cas01 0.711 0.061 11.589 0 0.591 0.832 0.711 0.484
## 14 cas02 ~~ cas02 0.653 0.062 10.509 0 0.532 0.775 0.653 0.446
## 15 cas03 ~~ cas03 0.494 0.052 9.506 0 0.392 0.595 0.494 0.569
## 16 cas04 ~~ cas04 0.484 0.047 10.349 0 0.392 0.575 0.484 0.623
## 17 cas05 ~~ cas05 1.685 0.094 17.885 0 1.501 1.870 1.685 0.673
## 18 cas07 ~~ cas07 0.559 0.059 9.459 0 0.443 0.675 0.559 0.716
## 19 cas08 ~~ cas08 1.628 0.086 18.844 0 1.458 1.797 1.628 0.705
## 20 cas09 ~~ cas09 0.631 0.053 11.816 0 0.526 0.735 0.631 0.432
## 21 cas10 ~~ cas10 1.848 0.114 16.175 0 1.624 2.072 1.848 0.723
## 22 cas11 ~~ cas11 0.453 0.042 10.776 0 0.370 0.535 0.453 0.409
## 23 cas12 ~~ cas12 0.682 0.065 10.541 0 0.555 0.808 0.682 0.492
## 24 cas13 ~~ cas13 0.990 0.072 13.664 0 0.848 1.132 0.990 0.631
## 25 cas.ce ~~ cas.ce 1.000 0.000 NA NA 1.000 1.000 1.000 1.000
## 26 cas.f ~~ cas.f 1.000 0.000 NA NA 1.000 1.000 1.000 1.000
## 27 cas.ce ~~ cas.f 0.967 0.016 59.853 0 0.936 0.999 0.967 0.967
## std.nox
## 1 0.718
## 2 0.745
## 3 0.657
## 4 0.614
## 5 0.572
## 6 0.533
## 7 0.543
## 8 0.754
## 9 0.526
## 10 0.769
## 11 0.713
## 12 0.607
## 13 0.484
## 14 0.446
## 15 0.569
## 16 0.623
## 17 0.673
## 18 0.716
## 19 0.705
## 20 0.432
## 21 0.723
## 22 0.409
## 23 0.492
## 24 0.631
## 25 1.000
## 26 1.000
## 27 0.967
Factor loadings
options(knitr.kable.NA = '')
parameterEstimates(fit.4, standardized=TRUE) %>%
filter(op == "=~") %>%
select('Latent Factor'=lhs, Indicator=rhs, B=est, SE=se, Z=z, 'p-value'= pvalue, Beta=std.all) %>%
kable(digits = 3, format="pandoc", caption="Factor Loadings")
| Latent Factor | Indicator | B | SE | Z | p-value | Beta |
|---|---|---|---|---|---|---|
| cas.ce | cas01 | 0.871 | 0.041 | 21.486 | 0 | 0.718 |
| cas.ce | cas02 | 0.902 | 0.041 | 21.894 | 0 | 0.745 |
| cas.ce | cas03 | 0.612 | 0.048 | 12.787 | 0 | 0.657 |
| cas.ce | cas04 | 0.541 | 0.045 | 11.925 | 0 | 0.614 |
| cas.ce | cas05 | 0.905 | 0.043 | 20.954 | 0 | 0.572 |
| cas.ce | cas07 | 0.471 | 0.045 | 10.479 | 0 | 0.533 |
| cas.ce | cas08 | 0.826 | 0.044 | 18.967 | 0 | 0.543 |
| cas.f | cas09 | 0.911 | 0.038 | 23.827 | 0 | 0.754 |
| cas.f | cas10 | 0.841 | 0.049 | 17.131 | 0 | 0.526 |
| cas.f | cas11 | 0.809 | 0.042 | 19.345 | 0 | 0.769 |
| cas.f | cas12 | 0.839 | 0.036 | 23.320 | 0 | 0.713 |
| cas.f | cas13 | 0.761 | 0.043 | 17.618 | 0 | 0.607 |
Modification indices
mod_ind <- modificationindices(fit.4)
head(mod_ind[order(mod_ind$mi, decreasing=TRUE), ], 10) #Spotting the top 10
## lhs op rhs mi epc sepc.lv sepc.all sepc.nox
## 79 cas05 ~~ cas08 130.788 0.634 0.634 0.383 0.383
## 61 cas03 ~~ cas04 44.977 0.114 0.114 0.234 0.234
## 81 cas05 ~~ cas10 31.679 0.330 0.330 0.187 0.187
## 72 cas04 ~~ cas08 31.103 -0.167 -0.167 -0.188 -0.188
## 55 cas02 ~~ cas08 29.577 -0.200 -0.200 -0.194 -0.194
## 71 cas04 ~~ cas07 24.986 0.088 0.088 0.169 0.169
## 35 cas.f =~ cas03 23.687 -1.351 -1.351 -1.451 -1.451
## 68 cas03 ~~ cas12 19.897 -0.093 -0.093 -0.160 -0.160
## 51 cas02 ~~ cas03 19.393 0.093 0.093 0.164 0.164
## 92 cas08 ~~ cas10 18.940 0.250 0.250 0.144 0.144
subset(mod_ind[order(mod_ind$mi, decreasing=TRUE), ], mi > 5) #bigger than 5
## lhs op rhs mi epc sepc.lv sepc.all sepc.nox
## 79 cas05 ~~ cas08 130.788 0.634 0.634 0.383 0.383
## 61 cas03 ~~ cas04 44.977 0.114 0.114 0.234 0.234
## 81 cas05 ~~ cas10 31.679 0.330 0.330 0.187 0.187
## 72 cas04 ~~ cas08 31.103 -0.167 -0.167 -0.188 -0.188
## 55 cas02 ~~ cas08 29.577 -0.200 -0.200 -0.194 -0.194
## 71 cas04 ~~ cas07 24.986 0.088 0.088 0.169 0.169
## 35 cas.f =~ cas03 23.687 -1.351 -1.351 -1.451 -1.451
## 68 cas03 ~~ cas12 19.897 -0.093 -0.093 -0.160 -0.160
## 51 cas02 ~~ cas03 19.393 0.093 0.093 0.164 0.164
## 92 cas08 ~~ cas10 18.940 0.250 0.250 0.144 0.144
## 33 cas.f =~ cas01 18.193 1.534 1.534 1.266 1.266
## 103 cas11 ~~ cas12 17.819 0.094 0.094 0.169 0.169
## 53 cas02 ~~ cas05 17.653 -0.159 -0.159 -0.151 -0.151
## 63 cas03 ~~ cas07 17.216 0.074 0.074 0.142 0.142
## 40 cas01 ~~ cas02 17.145 0.110 0.110 0.161 0.161
## 70 cas04 ~~ cas05 16.189 -0.123 -0.123 -0.137 -0.137
## 49 cas01 ~~ cas12 16.165 0.103 0.103 0.148 0.148
## 86 cas07 ~~ cas09 15.487 -0.083 -0.083 -0.139 -0.139
## 84 cas05 ~~ cas13 14.199 0.164 0.164 0.127 0.127
## 87 cas07 ~~ cas10 13.929 -0.125 -0.125 -0.123 -0.123
## 43 cas01 ~~ cas05 12.921 -0.139 -0.139 -0.127 -0.127
## 100 cas10 ~~ cas11 12.593 -0.118 -0.118 -0.129 -0.129
## 41 cas01 ~~ cas03 11.325 -0.073 -0.073 -0.123 -0.123
## 52 cas02 ~~ cas04 10.451 0.066 0.066 0.118 0.118
## 54 cas02 ~~ cas07 9.738 -0.067 -0.067 -0.111 -0.111
## 37 cas.f =~ cas05 9.475 1.481 1.481 0.936 0.936
## 44 cas01 ~~ cas07 9.395 -0.068 -0.068 -0.107 -0.107
## 39 cas.f =~ cas08 9.318 1.422 1.422 0.936 0.936
## 64 cas03 ~~ cas08 8.720 -0.091 -0.091 -0.101 -0.101
## 42 cas01 ~~ cas04 7.092 -0.056 -0.056 -0.095 -0.095
## 96 cas09 ~~ cas10 6.729 0.101 0.101 0.093 0.093
## 58 cas02 ~~ cas11 6.123 -0.053 -0.053 -0.097 -0.097
## 36 cas.f =~ cas04 5.589 -0.627 -0.627 -0.711 -0.711
## 88 cas07 ~~ cas11 5.071 0.041 0.041 0.081 0.081
Variance-Covariance-Matrix
inspect(fit.4, "sampstat")$cov #empirisch
## cas01 cas02 cas03 cas04 cas05 cas07 cas08 cas09 cas10 cas11 cas12 cas13
## cas01 1.469
## cas02 0.857 1.466
## cas03 0.479 0.618 0.868
## cas04 0.428 0.537 0.424 0.776
## cas05 0.678 0.694 0.526 0.384 2.504
## cas07 0.355 0.372 0.351 0.331 0.436 0.781
## cas08 0.709 0.589 0.429 0.302 1.307 0.417 2.309
## cas09 0.798 0.822 0.507 0.458 0.784 0.346 0.757 1.460
## cas10 0.723 0.711 0.453 0.407 1.045 0.269 0.910 0.844 2.557
## cas11 0.709 0.670 0.476 0.422 0.712 0.398 0.650 0.731 0.593 1.108
## cas12 0.787 0.731 0.417 0.400 0.712 0.391 0.686 0.756 0.651 0.737 1.386
## cas13 0.604 0.645 0.447 0.408 0.820 0.383 0.659 0.712 0.711 0.581 0.596 1.569
fitted(fit.4)$cov #modellimpliziert
## cas01 cas02 cas03 cas04 cas05 cas07 cas08 cas09 cas10 cas11 cas12 cas13
## cas01 1.469
## cas02 0.785 1.466
## cas03 0.533 0.552 0.868
## cas04 0.471 0.488 0.331 0.776
## cas05 0.788 0.816 0.554 0.490 2.504
## cas07 0.410 0.424 0.288 0.255 0.426 0.781
## cas08 0.719 0.744 0.505 0.447 0.747 0.389 2.309
## cas09 0.767 0.795 0.539 0.477 0.797 0.415 0.728 1.460
## cas10 0.709 0.734 0.498 0.441 0.737 0.383 0.672 0.767 2.557
## cas11 0.682 0.706 0.479 0.424 0.708 0.369 0.647 0.737 0.681 1.108
## cas12 0.707 0.732 0.497 0.439 0.735 0.382 0.671 0.765 0.706 0.679 1.386
## cas13 0.641 0.664 0.450 0.398 0.666 0.346 0.608 0.693 0.640 0.616 0.639 1.569
Standardized residuals
cov_table <- resid(fit.4, type="standardized")$cov
cov_table[upper.tri(cov_table)] <- NA #erase the upper triangle
diag(cov_table) <- NA #erase the diagonal 0's
kable(cov_table, digits=2) #makes a nice table and rounds everyhing to 2 digits
| cas01 | cas02 | cas03 | cas04 | cas05 | cas07 | cas08 | cas09 | cas10 | cas11 | cas12 | cas13 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| cas01 | ||||||||||||
| cas02 | 1.76 | |||||||||||
| cas03 | -2.71 | 3.00 | ||||||||||
| cas04 | -1.95 | 2.02 | 3.97 | |||||||||
| cas05 | -2.91 | -3.35 | -0.78 | -3.57 | ||||||||
| cas07 | -2.40 | -2.12 | 3.08 | 2.98 | 0.27 | |||||||
| cas08 | -0.27 | -4.52 | -2.79 | -4.81 | 7.66 | 0.76 | ||||||
| cas09 | 0.97 | 0.96 | -1.48 | -0.92 | -0.41 | -3.17 | 0.86 | |||||
| cas10 | 0.34 | -0.60 | -1.31 | -1.01 | 4.71 | -3.15 | 3.67 | 2.11 | ||||
| cas11 | 1.08 | -1.66 | -0.17 | -0.07 | 0.12 | 1.41 | 0.13 | -0.37 | -3.40 | |||
| cas12 | 2.03 | -0.03 | -3.82 | -1.87 | -0.55 | 0.39 | 0.35 | -0.40 | -1.48 | 2.21 | ||
| cas13 | -1.16 | -0.61 | -0.10 | 0.37 | 3.16 | 1.35 | 1.24 | 0.67 | 1.39 | -1.41 | -1.31 |
Load package
library(semPlot)
semPaths(fit.4, rotation = 2, nodeLabels=1:13)
Create the vector for the node labels
nodeLabels <- c("1", "2", "3", "4", "5", "7", "8",
"9", "10", "11", "12", "13",
"cognitive-emotional impairment",
"functional impairment"
)
Create a character vector for the order of latent variables
latents <- c("cas.ce", "cas.f")
Plot
semPaths(fit.4,
style = "lisrel", #small arrows for residuals instead of half-circles
whatLabels = "std.all", #labels paths with standardized coefficients
nCharNodes = 0, #factor names not abbreviated
rotation = 2, #rotates the graph around, #s 1, 2, 3, 4
layout = "tree3",
curvePivot = TRUE, #makes curves straight with rounded edges
curvePivotShape = 2.1, #influences how round the curve around the pivot is
edge.label.cex = .5, #size of the edge labels
cardinal = TRUE, #all edge labels end in the middle/cardinal point of a node
sizeMan = 5, #size of manifest variables
sizeMan2 = 2, #height of manifest variables
sizeLat =10, #size of latent variables
sizeLat2 = 10, #height of latent variables
nodeLabels = nodeLabels,#vector that names the nodes
latents = latents #vector that reorders the nodes
)
CFA.3 <- ' cas.3 =~ cas01 + cas02 + cas03 + cas04 + cas05 + cas07 + cas08 + cas09 + cas10 + cas11 + cas12 + cas13'
fit.3 <- cfa(CFA.3, std.lv=TRUE, data=data, estimator = "MLM")
summary(fit.3, fit.measures=TRUE, standardized=TRUE, rsquare=TRUE)
## lavaan 0.6-7 ended normally after 19 iterations
##
## Estimator ML
## Optimization method NLMINB
## Number of free parameters 24
##
## Number of observations 1011
##
## Model Test User Model:
## Standard Robust
## Test Statistic 493.532 260.346
## Degrees of freedom 54 54
## P-value (Chi-square) 0.000 0.000
## Scaling correction factor 1.896
## Satorra-Bentler correction
##
## Model Test Baseline Model:
##
## Test statistic 4906.745 2417.433
## Degrees of freedom 66 66
## P-value 0.000 0.000
## Scaling correction factor 2.030
##
## User Model versus Baseline Model:
##
## Comparative Fit Index (CFI) 0.909 0.912
## Tucker-Lewis Index (TLI) 0.889 0.893
##
## Robust Comparative Fit Index (CFI) 0.918
## Robust Tucker-Lewis Index (TLI) 0.900
##
## Loglikelihood and Information Criteria:
##
## Loglikelihood user model (H0) -17068.815 -17068.815
## Loglikelihood unrestricted model (H1) -16822.049 -16822.049
##
## Akaike (AIC) 34185.630 34185.630
## Bayesian (BIC) 34303.679 34303.679
## Sample-size adjusted Bayesian (BIC) 34227.453 34227.453
##
## Root Mean Square Error of Approximation:
##
## RMSEA 0.090 0.061
## 90 Percent confidence interval - lower 0.083 0.056
## 90 Percent confidence interval - upper 0.097 0.067
## P-value RMSEA <= 0.05 0.000 0.000
##
## Robust RMSEA 0.085
## 90 Percent confidence interval - lower 0.074
## 90 Percent confidence interval - upper 0.095
##
## Standardized Root Mean Square Residual:
##
## SRMR 0.051 0.051
##
## Parameter Estimates:
##
## Standard errors Robust.sem
## Information Expected
## Information saturated (h1) model Structured
##
## Latent Variables:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## cas.3 =~
## cas01 0.868 0.040 21.638 0.000 0.868 0.716
## cas02 0.891 0.041 21.706 0.000 0.891 0.736
## cas03 0.601 0.047 12.683 0.000 0.601 0.645
## cas04 0.533 0.045 11.828 0.000 0.533 0.605
## cas05 0.906 0.042 21.329 0.000 0.906 0.573
## cas07 0.465 0.045 10.411 0.000 0.465 0.527
## cas08 0.828 0.043 19.302 0.000 0.828 0.545
## cas09 0.900 0.037 24.121 0.000 0.900 0.745
## cas10 0.838 0.049 17.141 0.000 0.838 0.524
## cas11 0.801 0.042 19.240 0.000 0.801 0.761
## cas12 0.830 0.036 23.212 0.000 0.830 0.705
## cas13 0.757 0.043 17.661 0.000 0.757 0.604
##
## Variances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .cas01 0.715 0.061 11.791 0.000 0.715 0.487
## .cas02 0.673 0.063 10.753 0.000 0.673 0.459
## .cas03 0.507 0.052 9.659 0.000 0.507 0.584
## .cas04 0.492 0.047 10.421 0.000 0.492 0.634
## .cas05 1.683 0.094 17.881 0.000 1.683 0.672
## .cas07 0.564 0.060 9.436 0.000 0.564 0.723
## .cas08 1.624 0.086 18.863 0.000 1.624 0.703
## .cas09 0.650 0.052 12.547 0.000 0.650 0.445
## .cas10 1.854 0.113 16.354 0.000 1.854 0.725
## .cas11 0.466 0.042 11.064 0.000 0.466 0.421
## .cas12 0.698 0.063 11.098 0.000 0.698 0.503
## .cas13 0.996 0.072 13.811 0.000 0.996 0.635
## cas.3 1.000 1.000 1.000
##
## R-Square:
## Estimate
## cas01 0.513
## cas02 0.541
## cas03 0.416
## cas04 0.366
## cas05 0.328
## cas07 0.277
## cas08 0.297
## cas09 0.555
## cas10 0.275
## cas11 0.579
## cas12 0.497
## cas13 0.365
parameterEstimates(fit.3, standardized=TRUE) #shows complete list of parameters in model 1
## lhs op rhs est se z pvalue ci.lower ci.upper std.lv std.all
## 1 cas.3 =~ cas01 0.868 0.040 21.638 0 0.790 0.947 0.868 0.716
## 2 cas.3 =~ cas02 0.891 0.041 21.706 0 0.810 0.971 0.891 0.736
## 3 cas.3 =~ cas03 0.601 0.047 12.683 0 0.508 0.694 0.601 0.645
## 4 cas.3 =~ cas04 0.533 0.045 11.828 0 0.445 0.622 0.533 0.605
## 5 cas.3 =~ cas05 0.906 0.042 21.329 0 0.823 0.989 0.906 0.573
## 6 cas.3 =~ cas07 0.465 0.045 10.411 0 0.378 0.553 0.465 0.527
## 7 cas.3 =~ cas08 0.828 0.043 19.302 0 0.744 0.912 0.828 0.545
## 8 cas.3 =~ cas09 0.900 0.037 24.121 0 0.827 0.974 0.900 0.745
## 9 cas.3 =~ cas10 0.838 0.049 17.141 0 0.742 0.934 0.838 0.524
## 10 cas.3 =~ cas11 0.801 0.042 19.240 0 0.719 0.882 0.801 0.761
## 11 cas.3 =~ cas12 0.830 0.036 23.212 0 0.760 0.900 0.830 0.705
## 12 cas.3 =~ cas13 0.757 0.043 17.661 0 0.673 0.841 0.757 0.604
## 13 cas01 ~~ cas01 0.715 0.061 11.791 0 0.596 0.834 0.715 0.487
## 14 cas02 ~~ cas02 0.673 0.063 10.753 0 0.550 0.795 0.673 0.459
## 15 cas03 ~~ cas03 0.507 0.052 9.659 0 0.404 0.610 0.507 0.584
## 16 cas04 ~~ cas04 0.492 0.047 10.421 0 0.399 0.584 0.492 0.634
## 17 cas05 ~~ cas05 1.683 0.094 17.881 0 1.498 1.867 1.683 0.672
## 18 cas07 ~~ cas07 0.564 0.060 9.436 0 0.447 0.681 0.564 0.723
## 19 cas08 ~~ cas08 1.624 0.086 18.863 0 1.455 1.793 1.624 0.703
## 20 cas09 ~~ cas09 0.650 0.052 12.547 0 0.548 0.751 0.650 0.445
## 21 cas10 ~~ cas10 1.854 0.113 16.354 0 1.632 2.076 1.854 0.725
## 22 cas11 ~~ cas11 0.466 0.042 11.064 0 0.384 0.549 0.466 0.421
## 23 cas12 ~~ cas12 0.698 0.063 11.098 0 0.574 0.821 0.698 0.503
## 24 cas13 ~~ cas13 0.996 0.072 13.811 0 0.855 1.137 0.996 0.635
## 25 cas.3 ~~ cas.3 1.000 0.000 NA NA 1.000 1.000 1.000 1.000
## std.nox
## 1 0.716
## 2 0.736
## 3 0.645
## 4 0.605
## 5 0.573
## 6 0.527
## 7 0.545
## 8 0.745
## 9 0.524
## 10 0.761
## 11 0.705
## 12 0.604
## 13 0.487
## 14 0.459
## 15 0.584
## 16 0.634
## 17 0.672
## 18 0.723
## 19 0.703
## 20 0.445
## 21 0.725
## 22 0.421
## 23 0.503
## 24 0.635
## 25 1.000
Factor loadings
options(knitr.kable.NA = '')
parameterEstimates(fit.3, standardized=TRUE) %>%
filter(op == "=~") %>%
select('Latent Factor'=lhs, Indicator=rhs, B=est, SE=se, Z=z, 'p-value'= pvalue, Beta=std.all) %>%
kable(digits = 3, format="pandoc", caption="Factor Loadings")
| Latent Factor | Indicator | B | SE | Z | p-value | Beta |
|---|---|---|---|---|---|---|
| cas.3 | cas01 | 0.868 | 0.040 | 21.638 | 0 | 0.716 |
| cas.3 | cas02 | 0.891 | 0.041 | 21.706 | 0 | 0.736 |
| cas.3 | cas03 | 0.601 | 0.047 | 12.683 | 0 | 0.645 |
| cas.3 | cas04 | 0.533 | 0.045 | 11.828 | 0 | 0.605 |
| cas.3 | cas05 | 0.906 | 0.042 | 21.329 | 0 | 0.573 |
| cas.3 | cas07 | 0.465 | 0.045 | 10.411 | 0 | 0.527 |
| cas.3 | cas08 | 0.828 | 0.043 | 19.302 | 0 | 0.545 |
| cas.3 | cas09 | 0.900 | 0.037 | 24.121 | 0 | 0.745 |
| cas.3 | cas10 | 0.838 | 0.049 | 17.141 | 0 | 0.524 |
| cas.3 | cas11 | 0.801 | 0.042 | 19.240 | 0 | 0.761 |
| cas.3 | cas12 | 0.830 | 0.036 | 23.212 | 0 | 0.705 |
| cas.3 | cas13 | 0.757 | 0.043 | 17.661 | 0 | 0.604 |
Modification indices
mod_ind <- modificationindices(fit.3)
head(mod_ind[order(mod_ind$mi, decreasing=TRUE), ], 10) #Spotting the top 10
## lhs op rhs mi epc sepc.lv sepc.all sepc.nox
## 65 cas05 ~~ cas08 127.711 0.620 0.620 0.375 0.375
## 47 cas03 ~~ cas04 51.075 0.122 0.122 0.244 0.244
## 67 cas05 ~~ cas10 29.175 0.316 0.316 0.179 0.179
## 57 cas04 ~~ cas07 27.960 0.093 0.093 0.176 0.176
## 58 cas04 ~~ cas08 27.785 -0.157 -0.157 -0.176 -0.176
## 37 cas02 ~~ cas03 26.109 0.106 0.106 0.182 0.182
## 41 cas02 ~~ cas08 24.948 -0.182 -0.182 -0.174 -0.174
## 54 cas03 ~~ cas12 23.949 -0.102 -0.102 -0.172 -0.172
## 89 cas11 ~~ cas12 22.934 0.102 0.102 0.178 0.178
## 49 cas03 ~~ cas07 20.627 0.082 0.082 0.153 0.153
subset(mod_ind[order(mod_ind$mi, decreasing=TRUE), ], mi > 5) #bigger than 5
## lhs op rhs mi epc sepc.lv sepc.all sepc.nox
## 65 cas05 ~~ cas08 127.711 0.620 0.620 0.375 0.375
## 47 cas03 ~~ cas04 51.075 0.122 0.122 0.244 0.244
## 67 cas05 ~~ cas10 29.175 0.316 0.316 0.179 0.179
## 57 cas04 ~~ cas07 27.960 0.093 0.093 0.176 0.176
## 58 cas04 ~~ cas08 27.785 -0.157 -0.157 -0.176 -0.176
## 37 cas02 ~~ cas03 26.109 0.106 0.106 0.182 0.182
## 41 cas02 ~~ cas08 24.948 -0.182 -0.182 -0.174 -0.174
## 54 cas03 ~~ cas12 23.949 -0.102 -0.102 -0.172 -0.172
## 89 cas11 ~~ cas12 22.934 0.102 0.102 0.178 0.178
## 49 cas03 ~~ cas07 20.627 0.082 0.082 0.153 0.153
## 26 cas01 ~~ cas02 20.012 0.114 0.114 0.165 0.165
## 72 cas07 ~~ cas09 18.003 -0.090 -0.090 -0.148 -0.148
## 78 cas08 ~~ cas10 17.227 0.237 0.237 0.137 0.137
## 73 cas07 ~~ cas10 15.483 -0.132 -0.132 -0.129 -0.129
## 38 cas02 ~~ cas04 14.724 0.078 0.078 0.135 0.135
## 39 cas02 ~~ cas05 14.066 -0.140 -0.140 -0.131 -0.131
## 56 cas04 ~~ cas05 13.758 -0.113 -0.113 -0.124 -0.124
## 70 cas05 ~~ cas13 12.330 0.152 0.152 0.118 0.118
## 29 cas01 ~~ cas05 12.149 -0.133 -0.133 -0.121 -0.121
## 35 cas01 ~~ cas12 11.981 0.088 0.088 0.125 0.125
## 86 cas10 ~~ cas11 9.027 -0.098 -0.098 -0.106 -0.106
## 44 cas02 ~~ cas11 8.759 -0.063 -0.063 -0.112 -0.112
## 82 cas09 ~~ cas10 8.167 0.109 0.109 0.100 0.100
## 30 cas01 ~~ cas07 7.121 -0.058 -0.058 -0.092 -0.092
## 62 cas04 ~~ cas12 6.689 -0.053 -0.053 -0.090 -0.090
## 50 cas03 ~~ cas08 6.668 -0.079 -0.079 -0.087 -0.087
## 27 cas01 ~~ cas03 6.558 -0.054 -0.054 -0.090 -0.090
## 40 cas02 ~~ cas07 5.873 -0.052 -0.052 -0.084 -0.084
Variance-Covariance-Matrix
inspect(fit.3, "sampstat")$cov #empirisch
## cas01 cas02 cas03 cas04 cas05 cas07 cas08 cas09 cas10 cas11 cas12 cas13
## cas01 1.469
## cas02 0.857 1.466
## cas03 0.479 0.618 0.868
## cas04 0.428 0.537 0.424 0.776
## cas05 0.678 0.694 0.526 0.384 2.504
## cas07 0.355 0.372 0.351 0.331 0.436 0.781
## cas08 0.709 0.589 0.429 0.302 1.307 0.417 2.309
## cas09 0.798 0.822 0.507 0.458 0.784 0.346 0.757 1.460
## cas10 0.723 0.711 0.453 0.407 1.045 0.269 0.910 0.844 2.557
## cas11 0.709 0.670 0.476 0.422 0.712 0.398 0.650 0.731 0.593 1.108
## cas12 0.787 0.731 0.417 0.400 0.712 0.391 0.686 0.756 0.651 0.737 1.386
## cas13 0.604 0.645 0.447 0.408 0.820 0.383 0.659 0.712 0.711 0.581 0.596 1.569
fitted(fit.3)$cov #modellimpliziert
## cas01 cas02 cas03 cas04 cas05 cas07 cas08 cas09 cas10 cas11 cas12 cas13
## cas01 1.469
## cas02 0.774 1.466
## cas03 0.522 0.535 0.868
## cas04 0.463 0.475 0.321 0.776
## cas05 0.787 0.807 0.545 0.483 2.504
## cas07 0.404 0.415 0.280 0.248 0.422 0.781
## cas08 0.719 0.737 0.498 0.442 0.750 0.385 2.309
## cas09 0.782 0.802 0.541 0.480 0.816 0.419 0.745 1.460
## cas10 0.728 0.747 0.504 0.447 0.760 0.390 0.694 0.755 2.557
## cas11 0.695 0.713 0.481 0.427 0.726 0.373 0.663 0.721 0.671 1.108
## cas12 0.721 0.739 0.499 0.443 0.752 0.386 0.687 0.747 0.696 0.665 1.386
## cas13 0.657 0.674 0.455 0.404 0.686 0.352 0.627 0.682 0.635 0.606 0.628 1.569
Standardized residuals
cov_table <- resid(fit.3, type="standardized")$cov
cov_table[upper.tri(cov_table)] <- NA #erase the upper triangle
diag(cov_table) <- NA #erase the diagonal 0's
kable(cov_table, digits=2) #makes a nice table and rounds everyhing to 2 digits
| cas01 | cas02 | cas03 | cas04 | cas05 | cas07 | cas08 | cas09 | cas10 | cas11 | cas12 | cas13 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| cas01 | ||||||||||||
| cas02 | 2.01 | |||||||||||
| cas03 | -2.00 | 3.44 | ||||||||||
| cas04 | -1.54 | 2.36 | 4.20 | |||||||||
| cas05 | -2.88 | -2.89 | -0.51 | -3.32 | ||||||||
| cas07 | -2.11 | -1.58 | 3.32 | 3.18 | 0.37 | |||||||
| cas08 | -0.26 | -4.07 | -2.50 | -4.63 | 7.61 | 0.83 | ||||||
| cas09 | 0.54 | 0.70 | -1.59 | -1.10 | -0.98 | -3.37 | 0.36 | |||||
| cas10 | -0.13 | -0.96 | -1.50 | -1.24 | 4.41 | -3.35 | 3.37 | 2.38 | ||||
| cas11 | 0.58 | -2.05 | -0.28 | -0.25 | -0.47 | 1.23 | -0.43 | 0.46 | -2.96 | |||
| cas12 | 1.75 | -0.22 | -3.88 | -2.06 | -0.98 | 0.22 | -0.03 | 0.34 | -1.12 | 2.44 | ||
| cas13 | -1.76 | -1.01 | -0.24 | 0.17 | 2.78 | 1.14 | 0.79 | 1.03 | 1.47 | -0.98 | -0.94 |
anova(fit.2, fit.1, test="Chisq")
## Scaled Chi-Squared Difference Test (method = "satorra.bentler.2001")
##
## lavaan NOTE:
## The "Chisq" column contains standard test statistics, not the
## robust test that should be reported per model. A robust difference
## test is a function of two standard (not robust) statistics.
##
## Df AIC BIC Chisq Chisq diff Df diff Pr(>Chisq)
## fit.2 64 38005 38137 566.32
## fit.1 65 38012 38140 576.20 4.5068 1 0.03376 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
anova(fit.2, fit.3, test="Chisq")
## Warning in lavTestLRT(object = new("lavaan", version = "0.6.7", call =
## lavaan::lavaan(model = CFA.2, : lavaan WARNING: some models are based on a
## different set of observed variables
## Scaled Chi-Squared Difference Test (method = "satorra.bentler.2001")
##
## lavaan NOTE:
## The "Chisq" column contains standard test statistics, not the
## robust test that should be reported per model. A robust difference
## test is a function of two standard (not robust) statistics.
##
## Df AIC BIC Chisq Chisq diff Df diff Pr(>Chisq)
## fit.3 54 34186 34304 493.53
## fit.2 64 38005 38137 566.32 69.805 10 4.834e-11 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
anova(fit.4, fit.3, test="Chisq") #compare 1-factor solution without item cas06 and 2-factor solution without item cas06
## Scaled Chi-Squared Difference Test (method = "satorra.bentler.2001")
##
## lavaan NOTE:
## The "Chisq" column contains standard test statistics, not the
## robust test that should be reported per model. A robust difference
## test is a function of two standard (not robust) statistics.
##
## Df AIC BIC Chisq Chisq diff Df diff Pr(>Chisq)
## fit.4 53 34178 34301 484.04
## fit.3 54 34186 34304 493.53 4.4592 1 0.03471 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
anova(fit.2, fit.4, test="Chisq") #compare 2-factor solution with all items and 2-factor solution without item cas06
## Warning in lavTestLRT(object = new("lavaan", version = "0.6.7", call =
## lavaan::lavaan(model = CFA.2, : lavaan WARNING: some models are based on a
## different set of observed variables
## Scaled Chi-Squared Difference Test (method = "satorra.bentler.2001")
##
## lavaan NOTE:
## The "Chisq" column contains standard test statistics, not the
## robust test that should be reported per model. A robust difference
## test is a function of two standard (not robust) statistics.
##
## Df AIC BIC Chisq Chisq diff Df diff Pr(>Chisq)
## fit.4 53 34178 34301 484.04
## fit.2 64 38005 38137 566.32 72.085 11 4.896e-11 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Correlations between items to inspect for high item-inter-correlations
corr.test (data [,c("cas01", "cas02", "cas03", "cas04",
"cas05", "cas06", "cas07", "cas08",
"cas09", "cas10", "cas11", "cas12",
"cas13")],
method = "spearman")
## Call:corr.test(x = data[, c("cas01", "cas02", "cas03", "cas04", "cas05",
## "cas06", "cas07", "cas08", "cas09", "cas10", "cas11", "cas12",
## "cas13")], method = "spearman")
## Correlation matrix
## cas01 cas02 cas03 cas04 cas05 cas06 cas07 cas08 cas09 cas10 cas11 cas12
## cas01 1.00 0.58 0.47 0.41 0.42 0.27 0.38 0.44 0.56 0.44 0.56 0.57
## cas02 0.58 1.00 0.57 0.50 0.40 0.35 0.39 0.38 0.58 0.42 0.57 0.54
## cas03 0.47 0.57 1.00 0.51 0.38 0.36 0.45 0.33 0.48 0.34 0.53 0.46
## cas04 0.41 0.50 0.51 1.00 0.31 0.36 0.44 0.25 0.44 0.32 0.46 0.43
## cas05 0.42 0.40 0.38 0.31 1.00 0.34 0.32 0.55 0.45 0.45 0.46 0.42
## cas06 0.27 0.35 0.36 0.36 0.34 1.00 0.34 0.27 0.39 0.28 0.30 0.33
## cas07 0.38 0.39 0.45 0.44 0.32 0.34 1.00 0.32 0.37 0.28 0.45 0.42
## cas08 0.44 0.38 0.33 0.25 0.55 0.27 0.32 1.00 0.45 0.42 0.44 0.42
## cas09 0.56 0.58 0.48 0.44 0.45 0.39 0.37 0.45 1.00 0.50 0.59 0.57
## cas10 0.44 0.42 0.34 0.32 0.45 0.28 0.28 0.42 0.50 1.00 0.43 0.43
## cas11 0.56 0.57 0.53 0.46 0.46 0.30 0.45 0.44 0.59 0.43 1.00 0.62
## cas12 0.57 0.54 0.46 0.43 0.42 0.33 0.42 0.42 0.57 0.43 0.62 1.00
## cas13 0.46 0.48 0.41 0.38 0.43 0.38 0.40 0.37 0.49 0.40 0.50 0.47
## cas13
## cas01 0.46
## cas02 0.48
## cas03 0.41
## cas04 0.38
## cas05 0.43
## cas06 0.38
## cas07 0.40
## cas08 0.37
## cas09 0.49
## cas10 0.40
## cas11 0.50
## cas12 0.47
## cas13 1.00
## Sample Size
## [1] 1011
## Probability values (Entries above the diagonal are adjusted for multiple tests.)
## cas01 cas02 cas03 cas04 cas05 cas06 cas07 cas08 cas09 cas10 cas11 cas12
## cas01 0 0 0 0 0 0 0 0 0 0 0 0
## cas02 0 0 0 0 0 0 0 0 0 0 0 0
## cas03 0 0 0 0 0 0 0 0 0 0 0 0
## cas04 0 0 0 0 0 0 0 0 0 0 0 0
## cas05 0 0 0 0 0 0 0 0 0 0 0 0
## cas06 0 0 0 0 0 0 0 0 0 0 0 0
## cas07 0 0 0 0 0 0 0 0 0 0 0 0
## cas08 0 0 0 0 0 0 0 0 0 0 0 0
## cas09 0 0 0 0 0 0 0 0 0 0 0 0
## cas10 0 0 0 0 0 0 0 0 0 0 0 0
## cas11 0 0 0 0 0 0 0 0 0 0 0 0
## cas12 0 0 0 0 0 0 0 0 0 0 0 0
## cas13 0 0 0 0 0 0 0 0 0 0 0 0
## cas13
## cas01 0
## cas02 0
## cas03 0
## cas04 0
## cas05 0
## cas06 0
## cas07 0
## cas08 0
## cas09 0
## cas10 0
## cas11 0
## cas12 0
## cas13 0
##
## To see confidence intervals of the correlations, print with the short=FALSE option
Subset with CAS-items
subset.cas <- data[c("cas01", "cas02", "cas03", "cas04",
"cas05", "cas06", "cas07", "cas08",
"cas09", "cas10", "cas11", "cas12",
"cas13")]
View(subset.cas)
KMO(subset.cas)
## Kaiser-Meyer-Olkin factor adequacy
## Call: KMO(r = subset.cas)
## Overall MSA = 0.93
## MSA for each item =
## cas01 cas02 cas03 cas04 cas05 cas06 cas07 cas08 cas09 cas10 cas11 cas12 cas13
## 0.94 0.93 0.93 0.93 0.90 0.92 0.92 0.90 0.94 0.94 0.94 0.94 0.96
options(max.print=1000000)
Scree Plot
VSS.scree (subset.cas)
Parallel analysis (Horn)
parallel.cas <- fa.parallel (subset.cas, fm="pa", fa = "fa")
## Parallel analysis suggests that the number of factors = 4 and the number of components = NA
Eigenvalues of factors
parallel.cas$fa.values
## [1] 5.22793483 0.44265805 0.33135131 0.14156536 0.06620678 -0.02458341
## [7] -0.05469704 -0.07582715 -0.09691676 -0.14947673 -0.15937845 -0.18278543
## [13] -0.23828794
as suggested by parallel analysis
fa.pa.promax.cas <- fa(subset.cas, 4, fm = "pa", rotate = "Promax")
print (fa.pa.promax.cas, digits = 2, cut = .3, sort = TRUE)
## Factor Analysis using method = pa
## Call: fa(r = subset.cas, nfactors = 4, rotate = "Promax", fm = "pa")
## Standardized loadings (pattern matrix) based upon correlation matrix
## item PA1 PA2 PA3 PA4 h2 u2 com
## cas01 1 0.73 0.58 0.42 1.0
## cas12 12 0.67 0.55 0.45 1.1
## cas11 11 0.61 0.61 0.39 1.2
## cas02 2 0.49 0.48 0.62 0.38 2.2
## cas09 9 0.44 0.58 0.42 2.1
## cas05 5 0.82 0.57 0.43 1.0
## cas08 8 0.76 0.50 0.50 1.2
## cas10 10 0.44 0.37 0.63 1.7
## cas04 4 0.71 0.51 0.49 1.3
## cas03 3 0.62 0.50 0.50 1.2
## cas06 6 0.45 0.30 0.70 2.1
## cas13 13 0.31 0.32 0.40 0.60 2.1
## cas07 7 0.39 0.51 0.55 0.45 1.9
##
## PA1 PA2 PA3 PA4
## SS loadings 2.38 1.76 2.04 0.47
## Proportion Var 0.18 0.14 0.16 0.04
## Cumulative Var 0.18 0.32 0.48 0.51
## Proportion Explained 0.36 0.26 0.31 0.07
## Cumulative Proportion 0.36 0.62 0.93 1.00
##
## With factor correlations of
## PA1 PA2 PA3 PA4
## PA1 1.00 0.68 0.69 0.17
## PA2 0.68 1.00 0.69 0.16
## PA3 0.69 0.69 1.00 0.17
## PA4 0.17 0.16 0.17 1.00
##
## Mean item complexity = 1.6
## Test of the hypothesis that 4 factors are sufficient.
##
## The degrees of freedom for the null model are 78 and the objective function was 5.14 with Chi Square of 5162.53
## The degrees of freedom for the model are 32 and the objective function was 0.09
##
## The root mean square of the residuals (RMSR) is 0.02
## The df corrected root mean square of the residuals is 0.03
##
## The harmonic number of observations is 1011 with the empirical chi square 43.56 with prob < 0.084
## The total number of observations was 1011 with Likelihood Chi Square = 85.84 with prob < 8.2e-07
##
## Tucker Lewis Index of factoring reliability = 0.974
## RMSEA index = 0.041 and the 90 % confidence intervals are 0.031 0.051
## BIC = -135.56
## Fit based upon off diagonal values = 1
## Measures of factor score adequacy
## PA1 PA2 PA3 PA4
## Correlation of (regression) scores with factors 0.92 0.90 0.90 0.68
## Multiple R square of scores with factors 0.85 0.82 0.81 0.46
## Minimum correlation of possible factor scores 0.70 0.63 0.62 -0.08
as suggested by interpretation of scree plot
fa.pa.promax.cas <- fa(subset.cas, 2, fm = "pa", rotate = "Promax")
print (fa.pa.promax.cas, digits = 2, cut = .4, sort = TRUE)
## Factor Analysis using method = pa
## Call: fa(r = subset.cas, nfactors = 2, rotate = "Promax", fm = "pa")
## Standardized loadings (pattern matrix) based upon correlation matrix
## item PA1 PA2 h2 u2 com
## cas04 4 0.84 0.47 0.53 1.1
## cas02 2 0.80 0.58 0.42 1.0
## cas03 3 0.74 0.47 0.53 1.0
## cas11 11 0.61 0.56 0.44 1.2
## cas01 1 0.59 0.48 0.52 1.1
## cas09 9 0.53 0.55 0.45 1.4
## cas12 12 0.52 0.47 0.53 1.3
## cas07 7 0.52 0.30 0.70 1.0
## cas13 13 0.39 0.61 1.9
## cas06 6 0.21 0.79 1.5
## cas08 8 0.81 0.51 0.49 1.1
## cas05 5 0.80 0.54 0.46 1.0
## cas10 10 0.46 0.32 0.68 1.2
##
## PA1 PA2
## SS loadings 3.87 1.97
## Proportion Var 0.30 0.15
## Cumulative Var 0.30 0.45
## Proportion Explained 0.66 0.34
## Cumulative Proportion 0.66 1.00
##
## With factor correlations of
## PA1 PA2
## PA1 1.00 0.74
## PA2 0.74 1.00
##
## Mean item complexity = 1.2
## Test of the hypothesis that 2 factors are sufficient.
##
## The degrees of freedom for the null model are 78 and the objective function was 5.14 with Chi Square of 5162.53
## The degrees of freedom for the model are 53 and the objective function was 0.33
##
## The root mean square of the residuals (RMSR) is 0.04
## The df corrected root mean square of the residuals is 0.05
##
## The harmonic number of observations is 1011 with the empirical chi square 240.35 with prob < 1.1e-25
## The total number of observations was 1011 with Likelihood Chi Square = 333.2 with prob < 3e-42
##
## Tucker Lewis Index of factoring reliability = 0.919
## RMSEA index = 0.072 and the 90 % confidence intervals are 0.065 0.08
## BIC = -33.49
## Fit based upon off diagonal values = 0.99
## Measures of factor score adequacy
## PA1 PA2
## Correlation of (regression) scores with factors 0.94 0.91
## Multiple R square of scores with factors 0.89 0.82
## Minimum correlation of possible factor scores 0.78 0.65
–> other factors than in Clayton & Karazsia, 2020 here: F1 = cas01:cas04, cas07, cas09, cas11, cas12:cas13, cas06; F2 = cas08, cas05, cas10 Clayton & Karazsia, 2020: F1 (cognitive-emotional impairment) = cas01:cas08; F2 (functional impairment) = cas09:cas13
fa.diagram(fa.pa.promax.cas, simple=TRUE, cut=.4, digits=2)
fa.diagram(fa.pa.promax.cas, simple=FALSE, cut=.4, digits=2)
cas06: “I go away by myself and think about why I feel this way about climate change.”
Subset with CAS-items
subset.cas <- data[c("cas01", "cas02", "cas03", "cas04",
"cas05", "cas07", "cas08",
"cas09", "cas10", "cas11", "cas12",
"cas13")]
View(subset.cas)
KMO(subset.cas)
## Kaiser-Meyer-Olkin factor adequacy
## Call: KMO(r = subset.cas)
## Overall MSA = 0.93
## MSA for each item =
## cas01 cas02 cas03 cas04 cas05 cas07 cas08 cas09 cas10 cas11 cas12 cas13
## 0.94 0.93 0.93 0.93 0.90 0.92 0.89 0.94 0.94 0.94 0.94 0.96
options(max.print=1000000)
Scree Plot
VSS.scree (subset.cas)
Parallel analysis (Horn)
parallel.cas <- fa.parallel (subset.cas, fm="pa", fa = "fa")
## Parallel analysis suggests that the number of factors = 4 and the number of components = NA
Eigenvalues of factors
parallel.cas$fa.values
## [1] 5.01494015 0.44007501 0.24512064 0.13991041 0.01996806 -0.02691442
## [7] -0.07452259 -0.08090622 -0.09117839 -0.15087028 -0.18479070 -0.23671756
as suggested by parallel analysis
fa.pa.promax.cas <- fa(subset.cas, 4, fm = "pa", rotate = "Promax")
print (fa.pa.promax.cas, digits = 2, cut = .3, sort = TRUE)
## Factor Analysis using method = pa
## Call: fa(r = subset.cas, nfactors = 4, rotate = "Promax", fm = "pa")
## Standardized loadings (pattern matrix) based upon correlation matrix
## item PA1 PA2 PA3 PA4 h2 u2 com
## cas12 11 0.85 0.60 0.40 1.1
## cas01 1 0.69 0.56 0.44 1.1
## cas11 10 0.62 0.61 0.39 1.2
## cas09 8 0.49 0.58 0.42 1.7
## cas05 5 0.86 0.60 0.40 1.1
## cas08 7 0.72 0.50 0.50 1.2
## cas10 9 0.44 0.37 0.63 1.7
## cas13 12 0.37 0.63 2.5
## cas03 3 0.71 0.54 0.46 1.1
## cas04 4 0.70 0.51 0.49 1.2
## cas02 2 0.37 0.56 0.63 0.37 1.9
## cas07 6 0.50 0.50 0.50 1.6
##
## PA1 PA2 PA3 PA4
## SS loadings 2.34 1.62 1.87 0.53
## Proportion Var 0.20 0.13 0.16 0.04
## Cumulative Var 0.20 0.33 0.49 0.53
## Proportion Explained 0.37 0.25 0.29 0.08
## Cumulative Proportion 0.37 0.62 0.92 1.00
##
## With factor correlations of
## PA1 PA2 PA3 PA4
## PA1 1.00 0.73 0.77 0.25
## PA2 0.73 1.00 0.64 0.21
## PA3 0.77 0.64 1.00 0.29
## PA4 0.25 0.21 0.29 1.00
##
## Mean item complexity = 1.4
## Test of the hypothesis that 4 factors are sufficient.
##
## The degrees of freedom for the null model are 66 and the objective function was 4.85 with Chi Square of 4878.43
## The degrees of freedom for the model are 24 and the objective function was 0.04
##
## The root mean square of the residuals (RMSR) is 0.01
## The df corrected root mean square of the residuals is 0.02
##
## The harmonic number of observations is 1011 with the empirical chi square 18.87 with prob < 0.76
## The total number of observations was 1011 with Likelihood Chi Square = 43.81 with prob < 0.008
##
## Tucker Lewis Index of factoring reliability = 0.989
## RMSEA index = 0.029 and the 90 % confidence intervals are 0.014 0.042
## BIC = -122.24
## Fit based upon off diagonal values = 1
## Measures of factor score adequacy
## PA1 PA2 PA3 PA4
## Correlation of (regression) scores with factors 0.93 0.90 0.91 0.69
## Multiple R square of scores with factors 0.87 0.81 0.83 0.48
## Minimum correlation of possible factor scores 0.74 0.63 0.66 -0.05
as suggested by interpretation of scree plot
fa.pa.promax.cas <- fa(subset.cas, 2, fm = "pa", rotate = "Promax")
print (fa.pa.promax.cas, digits = 2, cut = .4, sort = TRUE)
## Factor Analysis using method = pa
## Call: fa(r = subset.cas, nfactors = 2, rotate = "Promax", fm = "pa")
## Standardized loadings (pattern matrix) based upon correlation matrix
## item PA1 PA2 h2 u2 com
## cas04 4 0.82 0.46 0.54 1.1
## cas02 2 0.80 0.58 0.42 1.0
## cas03 3 0.73 0.47 0.53 1.0
## cas11 10 0.62 0.57 0.43 1.2
## cas01 1 0.59 0.50 0.50 1.1
## cas09 8 0.53 0.54 0.46 1.4
## cas12 11 0.53 0.48 0.52 1.3
## cas07 6 0.51 0.29 0.71 1.0
## cas13 12 0.37 0.63 1.9
## cas08 7 0.80 0.52 0.48 1.0
## cas05 5 0.77 0.53 0.47 1.0
## cas10 9 0.45 0.32 0.68 1.2
##
## PA1 PA2
## SS loadings 3.74 1.89
## Proportion Var 0.31 0.16
## Cumulative Var 0.31 0.47
## Proportion Explained 0.66 0.34
## Cumulative Proportion 0.66 1.00
##
## With factor correlations of
## PA1 PA2
## PA1 1.00 0.73
## PA2 0.73 1.00
##
## Mean item complexity = 1.2
## Test of the hypothesis that 2 factors are sufficient.
##
## The degrees of freedom for the null model are 66 and the objective function was 4.85 with Chi Square of 4878.43
## The degrees of freedom for the model are 43 and the objective function was 0.25
##
## The root mean square of the residuals (RMSR) is 0.03
## The df corrected root mean square of the residuals is 0.04
##
## The harmonic number of observations is 1011 with the empirical chi square 162.93 with prob < 7.5e-16
## The total number of observations was 1011 with Likelihood Chi Square = 254.12 with prob < 9.6e-32
##
## Tucker Lewis Index of factoring reliability = 0.933
## RMSEA index = 0.07 and the 90 % confidence intervals are 0.062 0.078
## BIC = -43.39
## Fit based upon off diagonal values = 0.99
## Measures of factor score adequacy
## PA1 PA2
## Correlation of (regression) scores with factors 0.94 0.90
## Multiple R square of scores with factors 0.89 0.82
## Minimum correlation of possible factor scores 0.78 0.63
–> other factors than in Clayton & Karazsia, 2020 here: F1 = cas01:cas04, cas07, cas09, cas11, cas12:cas13, cas06; F2 = cas08, cas05, cas10 Clayton & Karazsia, 2020: F1 (cognitive-emotional impairment) = cas01:cas08; F2 (functional impairment) = cas09:cas13
fa.diagram(fa.pa.promax.cas, simple=TRUE, cut=.4, digits=2)
fa.diagram(fa.pa.promax.cas, simple=FALSE, cut=.4, digits=2)
Load relevant package
library(lsr)
library(gplots)
## Registered S3 method overwritten by 'gplots':
## method from
## reorder.factor DescTools
##
## Attaching package: 'gplots'
## The following object is masked from 'package:HH':
##
## residplot
## The following object is masked from 'package:stats':
##
## lowess
Assumption check
by(data$cas, data$gender.d, describe)
## data$gender.d: 0
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 494 1.73 0.8 1.5 1.59 0.74 1 5.33 4.33 1.44 1.83 0.04
## ------------------------------------------------------------
## data$gender.d: 1
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 517 1.88 0.83 1.67 1.77 0.86 1 5.42 4.42 1.04 0.71 0.04
leveneTest(data$cas, data$gender.d, mean)
## Warning in leveneTest.default(data$cas, data$gender.d, mean): data$gender.d
## coerced to factor.
## Levene's Test for Homogeneity of Variance (center = mean)
## Df F value Pr(>F)
## group 1 3.1002 0.07859 .
## 1009
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
by(data$cas, data$gender.d, shapiro.test)
## data$gender.d: 0
##
## Shapiro-Wilk normality test
##
## data: dd[x, ]
## W = 0.83642, p-value < 2.2e-16
##
## ------------------------------------------------------------
## data$gender.d: 1
##
## Shapiro-Wilk normality test
##
## data: dd[x, ]
## W = 0.89514, p-value < 2.2e-16
t-Test and Cohen’s d
t.test(data$cas ~ data$gender.d)
##
## Welch Two Sample t-test
##
## data: data$cas by data$gender.d
## t = -2.9616, df = 1009, p-value = 0.003133
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -0.25286973 -0.05131694
## sample estimates:
## mean in group 0 mean in group 1
## 1.729757 1.881850
cohensD(cas ~ gender.d, data=data, method="pooled")
## [1] 0.1861635
Plotting results
par(mfrow = c(1,2))
boxplot(data$cas ~ data$gender.d)
plotmeans(data$cas ~ data$gender.d)
Descriptive comparisons
describeBy(data$cas, data$gender.d, mat = TRUE)
## item group1 vars n mean sd median trimmed mad min
## X11 1 0 1 494 1.729757 0.8002286 1.500000 1.591120 0.74130 1
## X12 2 1 1 517 1.881850 0.8326851 1.666667 1.771285 0.86485 1
## max range skew kurtosis se
## X11 5.333333 4.333333 1.439335 1.8319767 0.03600399
## X12 5.416667 4.416667 1.040468 0.7107402 0.03662145
Descriptive comparisons
describeBy(data$cas, data$edu, mat = TRUE)
## item group1 vars n mean sd median trimmed mad min
## X11 1 1 1 5 2.466667 1.4500958 1.833333 2.466667 0.864850 1.25
## X12 2 2 1 2 1.875000 0.8838835 1.875000 1.875000 0.926625 1.25
## X13 3 3 1 52 1.884615 0.8570409 1.666667 1.781746 0.741300 1.00
## X14 4 4 1 156 1.899038 0.8505748 1.666667 1.788360 0.864850 1.00
## X15 5 5 1 230 1.777174 0.7716341 1.583333 1.668931 0.864850 1.00
## X16 6 6 1 266 1.793546 0.8338421 1.583333 1.658489 0.741300 1.00
## X17 7 7 1 298 1.761186 0.8023801 1.500000 1.631944 0.741300 1.00
## X18 8 8 1 2 3.208333 0.2946278 3.208333 3.208333 0.308875 3.00
## max range skew kurtosis se
## X11 4.416667 3.1666667 3.247542e-01 -2.07016168 0.64850255
## X12 2.500000 1.2500000 0.000000e+00 -2.75000000 0.62500000
## X13 4.000000 3.0000000 8.561607e-01 -0.46820095 0.11885018
## X14 4.250000 3.2500000 9.219198e-01 0.09922899 0.06810049
## X15 4.250000 3.2500000 1.064967e+00 0.61520421 0.05088005
## X16 5.416667 4.4166667 1.468786e+00 2.35700358 0.05112614
## X17 4.916667 3.9166667 1.322482e+00 1.39441638 0.04648063
## X18 3.416667 0.4166667 1.000000e-15 -2.75000000 0.20833333
Kruskal-Wallis test
kruskal.test(cas ~ edu, data = data)
##
## Kruskal-Wallis rank sum test
##
## data: cas by edu
## Kruskal-Wallis chi-squared = 8.9314, df = 7, p-value = 0.2576
corr.test (data [,c("phq", "phq.d", "phq.a",
"cas")],
method = "spearman")
## Call:corr.test(x = data[, c("phq", "phq.d", "phq.a", "cas")], method = "spearman")
## Correlation matrix
## phq phq.d phq.a cas
## phq 1.00 0.93 0.92 0.25
## phq.d 0.93 1.00 0.72 0.21
## phq.a 0.92 0.72 1.00 0.25
## cas 0.25 0.21 0.25 1.00
## Sample Size
## [1] 1011
## Probability values (Entries above the diagonal are adjusted for multiple tests.)
## phq phq.d phq.a cas
## phq 0 0 0 0
## phq.d 0 0 0 0
## phq.a 0 0 0 0
## cas 0 0 0 0
##
## To see confidence intervals of the correlations, print with the short=FALSE option
#bootstrapped confidence intervals
data.ci <- cor.ci(data [,c("phq", "phq.d", "phq.a",
"cas")])
#to show the upper and lower confidence intervals
ci <- cor.plot.upperLowerCi(data.ci)
#print the confidence intervals in matrix form
ci
##
## High and low confidence intervals
## phq phq.d phq.a cas
## phq 1.00 0.95 0.95 0.29
## phq.d 0.93 1.00 0.79 0.27
## phq.a 0.93 0.73 1.00 0.29
## cas 0.15 0.12 0.14 1.00
corr.test (data [,c("cas01", "cas02", "cas03", "cas04",
"cas05", "cas06", "cas07", "cas08",
"cas09", "cas10", "cas11", "cas12",
"cas13",
"cas",
"phq01", "phq02", "phq03", "phq04",
"phq", "phq.d", "phq.a")],
method = "spearman")
## Call:corr.test(x = data[, c("cas01", "cas02", "cas03", "cas04", "cas05",
## "cas06", "cas07", "cas08", "cas09", "cas10", "cas11", "cas12",
## "cas13", "cas", "phq01", "phq02", "phq03", "phq04", "phq",
## "phq.d", "phq.a")], method = "spearman")
## Correlation matrix
## cas01 cas02 cas03 cas04 cas05 cas06 cas07 cas08 cas09 cas10 cas11 cas12
## cas01 1.00 0.58 0.47 0.41 0.42 0.27 0.38 0.44 0.56 0.44 0.56 0.57
## cas02 0.58 1.00 0.57 0.50 0.40 0.35 0.39 0.38 0.58 0.42 0.57 0.54
## cas03 0.47 0.57 1.00 0.51 0.38 0.36 0.45 0.33 0.48 0.34 0.53 0.46
## cas04 0.41 0.50 0.51 1.00 0.31 0.36 0.44 0.25 0.44 0.32 0.46 0.43
## cas05 0.42 0.40 0.38 0.31 1.00 0.34 0.32 0.55 0.45 0.45 0.46 0.42
## cas06 0.27 0.35 0.36 0.36 0.34 1.00 0.34 0.27 0.39 0.28 0.30 0.33
## cas07 0.38 0.39 0.45 0.44 0.32 0.34 1.00 0.32 0.37 0.28 0.45 0.42
## cas08 0.44 0.38 0.33 0.25 0.55 0.27 0.32 1.00 0.45 0.42 0.44 0.42
## cas09 0.56 0.58 0.48 0.44 0.45 0.39 0.37 0.45 1.00 0.50 0.59 0.57
## cas10 0.44 0.42 0.34 0.32 0.45 0.28 0.28 0.42 0.50 1.00 0.43 0.43
## cas11 0.56 0.57 0.53 0.46 0.46 0.30 0.45 0.44 0.59 0.43 1.00 0.62
## cas12 0.57 0.54 0.46 0.43 0.42 0.33 0.42 0.42 0.57 0.43 0.62 1.00
## cas13 0.46 0.48 0.41 0.38 0.43 0.38 0.40 0.37 0.49 0.40 0.50 0.47
## cas 0.70 0.69 0.57 0.51 0.73 0.45 0.50 0.71 0.72 0.71 0.69 0.71
## phq01 0.17 0.12 0.09 0.06 0.09 0.02 0.00 0.10 0.15 0.17 0.12 0.11
## phq02 0.20 0.18 0.13 0.12 0.13 0.07 0.04 0.14 0.16 0.17 0.13 0.16
## phq03 0.18 0.21 0.19 0.12 0.11 0.12 0.02 0.15 0.17 0.18 0.14 0.14
## phq04 0.20 0.20 0.19 0.15 0.13 0.09 0.03 0.14 0.18 0.21 0.13 0.15
## phq 0.22 0.20 0.17 0.13 0.14 0.09 0.03 0.16 0.20 0.22 0.15 0.16
## phq.d 0.20 0.16 0.12 0.09 0.13 0.05 0.02 0.14 0.17 0.18 0.14 0.15
## phq.a 0.21 0.22 0.21 0.15 0.14 0.12 0.03 0.16 0.20 0.22 0.15 0.16
## cas13 cas phq01 phq02 phq03 phq04 phq phq.d phq.a
## cas01 0.46 0.70 0.17 0.20 0.18 0.20 0.22 0.20 0.21
## cas02 0.48 0.69 0.12 0.18 0.21 0.20 0.20 0.16 0.22
## cas03 0.41 0.57 0.09 0.13 0.19 0.19 0.17 0.12 0.21
## cas04 0.38 0.51 0.06 0.12 0.12 0.15 0.13 0.09 0.15
## cas05 0.43 0.73 0.09 0.13 0.11 0.13 0.14 0.13 0.14
## cas06 0.38 0.45 0.02 0.07 0.12 0.09 0.09 0.05 0.12
## cas07 0.40 0.50 0.00 0.04 0.02 0.03 0.03 0.02 0.03
## cas08 0.37 0.71 0.10 0.14 0.15 0.14 0.16 0.14 0.16
## cas09 0.49 0.72 0.15 0.16 0.17 0.18 0.20 0.17 0.20
## cas10 0.40 0.71 0.17 0.17 0.18 0.21 0.22 0.18 0.22
## cas11 0.50 0.69 0.12 0.13 0.14 0.13 0.15 0.14 0.15
## cas12 0.47 0.71 0.11 0.16 0.14 0.15 0.16 0.15 0.16
## cas13 1.00 0.64 0.05 0.06 0.05 0.08 0.07 0.06 0.07
## cas 0.64 1.00 0.17 0.22 0.22 0.23 0.25 0.21 0.25
## phq01 0.05 0.17 1.00 0.62 0.53 0.54 0.81 0.90 0.60
## phq02 0.06 0.22 0.62 1.00 0.61 0.66 0.85 0.88 0.71
## phq03 0.05 0.22 0.53 0.61 1.00 0.58 0.81 0.63 0.89
## phq04 0.08 0.23 0.54 0.66 0.58 1.00 0.81 0.66 0.87
## phq 0.07 0.25 0.81 0.85 0.81 0.81 1.00 0.93 0.92
## phq.d 0.06 0.21 0.90 0.88 0.63 0.66 0.93 1.00 0.72
## phq.a 0.07 0.25 0.60 0.71 0.89 0.87 0.92 0.72 1.00
## Sample Size
## [1] 1011
## Probability values (Entries above the diagonal are adjusted for multiple tests.)
## cas01 cas02 cas03 cas04 cas05 cas06 cas07 cas08 cas09 cas10 cas11 cas12
## cas01 0 0 0 0.00 0 0.00 0.00 0 0 0 0 0
## cas02 0 0 0 0.00 0 0.00 0.00 0 0 0 0 0
## cas03 0 0 0 0.00 0 0.00 0.00 0 0 0 0 0
## cas04 0 0 0 0.00 0 0.00 0.00 0 0 0 0 0
## cas05 0 0 0 0.00 0 0.00 0.00 0 0 0 0 0
## cas06 0 0 0 0.00 0 0.00 0.00 0 0 0 0 0
## cas07 0 0 0 0.00 0 0.00 0.00 0 0 0 0 0
## cas08 0 0 0 0.00 0 0.00 0.00 0 0 0 0 0
## cas09 0 0 0 0.00 0 0.00 0.00 0 0 0 0 0
## cas10 0 0 0 0.00 0 0.00 0.00 0 0 0 0 0
## cas11 0 0 0 0.00 0 0.00 0.00 0 0 0 0 0
## cas12 0 0 0 0.00 0 0.00 0.00 0 0 0 0 0
## cas13 0 0 0 0.00 0 0.00 0.00 0 0 0 0 0
## cas 0 0 0 0.00 0 0.00 0.00 0 0 0 0 0
## phq01 0 0 0 0.04 0 0.53 0.88 0 0 0 0 0
## phq02 0 0 0 0.00 0 0.02 0.15 0 0 0 0 0
## phq03 0 0 0 0.00 0 0.00 0.45 0 0 0 0 0
## phq04 0 0 0 0.00 0 0.01 0.32 0 0 0 0 0
## phq 0 0 0 0.00 0 0.00 0.37 0 0 0 0 0
## phq.d 0 0 0 0.00 0 0.14 0.50 0 0 0 0 0
## phq.a 0 0 0 0.00 0 0.00 0.32 0 0 0 0 0
## cas13 cas phq01 phq02 phq03 phq04 phq phq.d phq.a
## cas01 0.00 0 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas02 0.00 0 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas03 0.00 0 0.07 0.00 0.00 0.00 0.00 0.01 0.00
## cas04 0.00 0 0.60 0.01 0.00 0.00 0.00 0.07 0.00
## cas05 0.00 0 0.09 0.00 0.01 0.00 0.00 0.00 0.00
## cas06 0.00 0 1.00 0.33 0.00 0.12 0.07 1.00 0.00
## cas07 0.00 0 1.00 1.00 1.00 1.00 1.00 1.00 1.00
## cas08 0.00 0 0.02 0.00 0.00 0.00 0.00 0.00 0.00
## cas09 0.00 0 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas10 0.00 0 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas11 0.00 0 0.01 0.00 0.00 0.00 0.00 0.00 0.00
## cas12 0.00 0 0.01 0.00 0.00 0.00 0.00 0.00 0.00
## cas13 0.00 0 1.00 0.96 1.00 0.17 0.51 0.96 0.42
## cas 0.00 0 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## phq01 0.11 0 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## phq02 0.07 0 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## phq03 0.09 0 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## phq04 0.01 0 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## phq 0.03 0 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## phq.d 0.08 0 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## phq.a 0.03 0 0.00 0.00 0.00 0.00 0.00 0.00 0.00
##
## To see confidence intervals of the correlations, print with the short=FALSE option
#bootstrapped confidence intervals
data.ci <- cor.ci(data [,c("cas01", "cas02", "cas03", "cas04",
"cas05", "cas06", "cas07", "cas08",
"cas09", "cas10", "cas11", "cas12",
"cas13",
"cas",
"phq01", "phq02", "phq03", "phq04",
"phq", "phq.d", "phq.a")])
#to show the upper and lower confidence intervals
ci <- cor.plot.upperLowerCi(data.ci)
#print the confidence intervals in matrix form
ci
##
## High and low confidence intervals
## cs01 cs02 cs03 cs04 cs05 cs06 cs07 cs08 cs09 cs10 cs11 cs12 cs13 cas
## cas01 1.00 0.64 0.49 0.47 0.41 0.29 0.40 0.45 0.61 0.45 0.61 0.62 0.46 0.76
## cas02 0.52 1.00 0.62 0.57 0.42 0.36 0.41 0.38 0.62 0.43 0.59 0.57 0.48 0.76
## cas03 0.35 0.46 1.00 0.60 0.42 0.37 0.50 0.36 0.52 0.37 0.55 0.45 0.45 0.70
## cas04 0.32 0.43 0.42 1.00 0.34 0.38 0.51 0.29 0.50 0.35 0.53 0.45 0.45 0.66
## cas05 0.28 0.30 0.29 0.21 1.00 0.37 0.37 0.59 0.46 0.47 0.48 0.45 0.47 0.71
## cas06 0.17 0.25 0.27 0.27 0.27 1.00 0.40 0.31 0.41 0.29 0.33 0.34 0.42 0.49
## cas07 0.26 0.28 0.34 0.33 0.25 0.29 1.00 0.38 0.39 0.24 0.50 0.44 0.41 0.60
## cas08 0.32 0.25 0.24 0.16 0.49 0.19 0.25 1.00 0.46 0.44 0.47 0.46 0.40 0.68
## cas09 0.47 0.49 0.37 0.36 0.35 0.31 0.26 0.35 1.00 0.49 0.63 0.59 0.53 0.79
## cas10 0.30 0.30 0.24 0.23 0.34 0.19 0.13 0.31 0.38 1.00 0.40 0.41 0.41 0.67
## cas11 0.48 0.46 0.40 0.38 0.37 0.22 0.34 0.34 0.51 0.30 1.00 0.65 0.51 0.78
## cas12 0.49 0.45 0.31 0.31 0.31 0.22 0.30 0.31 0.47 0.28 0.53 1.00 0.48 0.75
## cas13 0.33 0.35 0.31 0.28 0.35 0.32 0.27 0.28 0.40 0.30 0.37 0.33 1.00 0.70
## cas 0.68 0.70 0.60 0.55 0.64 0.39 0.50 0.61 0.72 0.59 0.71 0.67 0.62 1.00
## phq01 0.10 0.05 0.02 -0.02 0.02 -0.05 0.05 0.05 0.08 0.13 0.03 0.04 -0.01 0.09
## phq02 0.13 0.09 0.05 0.02 0.06 -0.01 -0.04 0.07 0.11 0.12 0.05 0.09 0.00 0.13
## phq03 0.11 0.12 0.10 0.04 0.03 0.03 -0.05 0.08 0.12 0.13 0.05 0.05 -0.01 0.14
## phq04 0.11 0.11 0.09 0.06 0.04 0.00 -0.04 0.07 0.11 0.14 0.05 0.06 0.01 0.14
## phq 0.14 0.12 0.08 0.04 0.06 0.01 -0.05 0.09 0.14 0.17 0.06 0.08 0.01 0.16
## phq.d 0.13 0.08 0.04 0.01 0.05 -0.02 -0.06 0.07 0.11 0.14 0.05 0.07 0.00 0.13
## phq.a 0.13 0.13 0.11 0.06 0.05 0.02 -0.05 0.09 0.13 0.16 0.06 0.07 0.00 0.16
## ph01 ph02 ph03 ph04 phq phq.d phq.a
## cas01 0.22 0.23 0.25 0.24 0.26 0.24 0.26
## cas02 0.18 0.22 0.26 0.24 0.25 0.22 0.27
## cas03 0.16 0.19 0.24 0.22 0.23 0.19 0.25
## cas04 0.12 0.14 0.18 0.19 0.17 0.14 0.20
## cas05 0.15 0.18 0.16 0.15 0.18 0.17 0.17
## cas06 0.09 0.11 0.15 0.12 0.13 0.10 0.14
## cas07 -0.08 0.07 0.06 0.07 0.07 0.06 0.07
## cas08 0.20 0.20 0.20 0.20 0.22 0.21 0.21
## cas09 0.22 0.23 0.24 0.23 0.25 0.24 0.25
## cas10 0.26 0.26 0.26 0.27 0.29 0.28 0.28
## cas11 0.17 0.18 0.18 0.18 0.20 0.19 0.19
## cas12 0.18 0.21 0.19 0.19 0.21 0.21 0.20
## cas13 0.12 0.12 0.11 0.13 0.13 0.13 0.13
## cas 0.23 0.25 0.26 0.25 0.28 0.25 0.28
## phq01 1.00 0.72 0.63 0.64 0.86 0.93 0.70
## phq02 0.62 1.00 0.72 0.75 0.91 0.93 0.80
## phq03 0.52 0.63 1.00 0.69 0.87 0.73 0.92
## phq04 0.53 0.67 0.59 1.00 0.88 0.75 0.92
## phq 0.80 0.88 0.82 0.83 1.00 0.95 0.95
## phq.d 0.90 0.90 0.64 0.67 0.93 1.00 0.80
## phq.a 0.59 0.73 0.89 0.89 0.93 0.73 1.00
corr.test (data [,c("sp", "sp.1", "sp.2", "sp.3", "sp.4", "sp.5", "sp.6",
"cas")],
method = "spearman")
## Call:corr.test(x = data[, c("sp", "sp.1", "sp.2", "sp.3", "sp.4",
## "sp.5", "sp.6", "cas")], method = "spearman")
## Correlation matrix
## sp sp.1 sp.2 sp.3 sp.4 sp.5 sp.6 cas
## sp 1.00 0.87 0.65 0.78 0.84 0.65 0.80 -0.13
## sp.1 0.87 1.00 0.44 0.61 0.65 0.57 0.61 -0.17
## sp.2 0.65 0.44 1.00 0.45 0.42 0.10 0.37 0.17
## sp.3 0.78 0.61 0.45 1.00 0.72 0.46 0.63 -0.05
## sp.4 0.84 0.65 0.42 0.72 1.00 0.57 0.83 -0.15
## sp.5 0.65 0.57 0.10 0.46 0.57 1.00 0.53 -0.37
## sp.6 0.80 0.61 0.37 0.63 0.83 0.53 1.00 -0.13
## cas -0.13 -0.17 0.17 -0.05 -0.15 -0.37 -0.13 1.00
## Sample Size
## [1] 1011
## Probability values (Entries above the diagonal are adjusted for multiple tests.)
## sp sp.1 sp.2 sp.3 sp.4 sp.5 sp.6 cas
## sp 0 0 0 0.00 0 0 0 0.00
## sp.1 0 0 0 0.00 0 0 0 0.00
## sp.2 0 0 0 0.00 0 0 0 0.00
## sp.3 0 0 0 0.00 0 0 0 0.08
## sp.4 0 0 0 0.00 0 0 0 0.00
## sp.5 0 0 0 0.00 0 0 0 0.00
## sp.6 0 0 0 0.00 0 0 0 0.00
## cas 0 0 0 0.08 0 0 0 0.00
##
## To see confidence intervals of the correlations, print with the short=FALSE option
#bootstrapped confidence intervals#
data.ci <- cor.ci(data [,c("sp", "sp.1", "sp.2", "sp.3", "sp.4", "sp.5", "sp.6",
"cas")])
#to show the upper and lower confidence intervals#
ci <- cor.plot.upperLowerCi(data.ci)
#print the confidence intervals in matrix form#
ci
##
## High and low confidence intervals
## sp sp.1 sp.2 sp.3 sp.4 sp.5 sp.6 cas
## sp 1.00 0.90 0.67 0.82 0.88 0.72 0.86 -0.19
## sp.1 0.87 1.00 0.47 0.67 0.73 0.67 0.72 -0.22
## sp.2 0.58 0.36 1.00 0.46 0.42 0.16 0.38 0.22
## sp.3 0.76 0.58 0.36 1.00 0.75 0.55 0.68 -0.13
## sp.4 0.85 0.66 0.30 0.67 1.00 0.68 0.88 -0.25
## sp.5 0.65 0.59 0.03 0.42 0.59 1.00 0.64 -0.39
## sp.6 0.81 0.64 0.26 0.58 0.84 0.56 1.00 -0.20
## cas -0.07 -0.11 0.11 0.00 -0.13 -0.29 -0.09 1.00
corr.test (data [,c("sp", "sp.1", "sp.2", "sp.3", "sp.4", "sp.5", "sp.6",
"cas01", "cas02", "cas03", "cas04", "cas05",
"cas06", "cas07", "cas08", "cas09", "cas10",
"cas11", "cas12", "cas13")],
method = "spearman")
## Call:corr.test(x = data[, c("sp", "sp.1", "sp.2", "sp.3", "sp.4",
## "sp.5", "sp.6", "cas01", "cas02", "cas03", "cas04", "cas05",
## "cas06", "cas07", "cas08", "cas09", "cas10", "cas11", "cas12",
## "cas13")], method = "spearman")
## Correlation matrix
## sp sp.1 sp.2 sp.3 sp.4 sp.5 sp.6 cas01 cas02 cas03 cas04 cas05
## sp 1.00 0.87 0.65 0.78 0.84 0.65 0.80 0.02 -0.09 -0.10 -0.12 -0.13
## sp.1 0.87 1.00 0.44 0.61 0.65 0.57 0.61 -0.04 -0.12 -0.10 -0.16 -0.15
## sp.2 0.65 0.44 1.00 0.45 0.42 0.10 0.37 0.24 0.12 0.01 0.01 0.13
## sp.3 0.78 0.61 0.45 1.00 0.72 0.46 0.63 0.03 -0.06 -0.04 -0.04 -0.05
## sp.4 0.84 0.65 0.42 0.72 1.00 0.57 0.83 -0.01 -0.11 -0.12 -0.10 -0.14
## sp.5 0.65 0.57 0.10 0.46 0.57 1.00 0.53 -0.18 -0.22 -0.19 -0.17 -0.37
## sp.6 0.80 0.61 0.37 0.63 0.83 0.53 1.00 0.00 -0.07 -0.08 -0.06 -0.13
## cas01 0.02 -0.04 0.24 0.03 -0.01 -0.18 0.00 1.00 0.58 0.47 0.41 0.42
## cas02 -0.09 -0.12 0.12 -0.06 -0.11 -0.22 -0.07 0.58 1.00 0.57 0.50 0.40
## cas03 -0.10 -0.10 0.01 -0.04 -0.12 -0.19 -0.08 0.47 0.57 1.00 0.51 0.38
## cas04 -0.12 -0.16 0.01 -0.04 -0.10 -0.17 -0.06 0.41 0.50 0.51 1.00 0.31
## cas05 -0.13 -0.15 0.13 -0.05 -0.14 -0.37 -0.13 0.42 0.40 0.38 0.31 1.00
## cas06 -0.32 -0.30 -0.18 -0.21 -0.27 -0.27 -0.24 0.27 0.35 0.36 0.36 0.34
## cas07 -0.09 -0.10 -0.03 0.01 -0.04 -0.11 -0.03 0.38 0.39 0.45 0.44 0.32
## cas08 0.00 -0.02 0.20 0.03 -0.03 -0.23 -0.02 0.44 0.38 0.33 0.25 0.55
## cas09 -0.10 -0.14 0.11 -0.04 -0.13 -0.24 -0.08 0.56 0.58 0.48 0.44 0.45
## cas10 -0.15 -0.16 0.10 -0.05 -0.16 -0.37 -0.14 0.44 0.42 0.34 0.32 0.45
## cas11 -0.03 -0.08 0.14 0.02 -0.04 -0.20 -0.02 0.56 0.57 0.53 0.46 0.46
## cas12 0.00 -0.06 0.16 0.06 -0.01 -0.17 0.02 0.57 0.54 0.46 0.43 0.42
## cas13 -0.08 -0.10 0.04 -0.01 -0.10 -0.16 -0.05 0.46 0.48 0.41 0.38 0.43
## cas06 cas07 cas08 cas09 cas10 cas11 cas12 cas13
## sp -0.32 -0.09 0.00 -0.10 -0.15 -0.03 0.00 -0.08
## sp.1 -0.30 -0.10 -0.02 -0.14 -0.16 -0.08 -0.06 -0.10
## sp.2 -0.18 -0.03 0.20 0.11 0.10 0.14 0.16 0.04
## sp.3 -0.21 0.01 0.03 -0.04 -0.05 0.02 0.06 -0.01
## sp.4 -0.27 -0.04 -0.03 -0.13 -0.16 -0.04 -0.01 -0.10
## sp.5 -0.27 -0.11 -0.23 -0.24 -0.37 -0.20 -0.17 -0.16
## sp.6 -0.24 -0.03 -0.02 -0.08 -0.14 -0.02 0.02 -0.05
## cas01 0.27 0.38 0.44 0.56 0.44 0.56 0.57 0.46
## cas02 0.35 0.39 0.38 0.58 0.42 0.57 0.54 0.48
## cas03 0.36 0.45 0.33 0.48 0.34 0.53 0.46 0.41
## cas04 0.36 0.44 0.25 0.44 0.32 0.46 0.43 0.38
## cas05 0.34 0.32 0.55 0.45 0.45 0.46 0.42 0.43
## cas06 1.00 0.34 0.27 0.39 0.28 0.30 0.33 0.38
## cas07 0.34 1.00 0.32 0.37 0.28 0.45 0.42 0.40
## cas08 0.27 0.32 1.00 0.45 0.42 0.44 0.42 0.37
## cas09 0.39 0.37 0.45 1.00 0.50 0.59 0.57 0.49
## cas10 0.28 0.28 0.42 0.50 1.00 0.43 0.43 0.40
## cas11 0.30 0.45 0.44 0.59 0.43 1.00 0.62 0.50
## cas12 0.33 0.42 0.42 0.57 0.43 0.62 1.00 0.47
## cas13 0.38 0.40 0.37 0.49 0.40 0.50 0.47 1.00
## Sample Size
## [1] 1011
## Probability values (Entries above the diagonal are adjusted for multiple tests.)
## sp sp.1 sp.2 sp.3 sp.4 sp.5 sp.6 cas01 cas02 cas03 cas04 cas05 cas06
## sp 0.00 0.00 0.00 0.00 0.00 0.00 0.00 1 0.26 0.04 0.01 0 0
## sp.1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 1 0.01 0.09 0.00 0 0
## sp.2 0.00 0.00 0.00 0.00 0.00 0.05 0.00 0 0.01 1.00 1.00 0 0
## sp.3 0.00 0.00 0.00 0.00 0.00 0.00 0.00 1 1.00 1.00 1.00 1 0
## sp.4 0.00 0.00 0.00 0.00 0.00 0.00 0.00 1 0.02 0.01 0.08 0 0
## sp.5 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0 0.00 0.00 0.00 0 0
## sp.6 0.00 0.00 0.00 0.00 0.00 0.00 0.00 1 0.83 0.62 1.00 0 0
## cas01 0.44 0.15 0.00 0.41 0.76 0.00 0.98 0 0.00 0.00 0.00 0 0
## cas02 0.01 0.00 0.00 0.04 0.00 0.00 0.02 0 0.00 0.00 0.00 0 0
## cas03 0.00 0.00 0.71 0.23 0.00 0.00 0.02 0 0.00 0.00 0.00 0 0
## cas04 0.00 0.00 0.74 0.24 0.00 0.00 0.07 0 0.00 0.00 0.00 0 0
## cas05 0.00 0.00 0.00 0.15 0.00 0.00 0.00 0 0.00 0.00 0.00 0 0
## cas06 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0 0.00 0.00 0.00 0 0
## cas07 0.01 0.00 0.27 0.83 0.21 0.00 0.28 0 0.00 0.00 0.00 0 0
## cas08 0.88 0.53 0.00 0.36 0.33 0.00 0.44 0 0.00 0.00 0.00 0 0
## cas09 0.00 0.00 0.00 0.21 0.00 0.00 0.01 0 0.00 0.00 0.00 0 0
## cas10 0.00 0.00 0.00 0.12 0.00 0.00 0.00 0 0.00 0.00 0.00 0 0
## cas11 0.27 0.01 0.00 0.58 0.17 0.00 0.52 0 0.00 0.00 0.00 0 0
## cas12 0.88 0.05 0.00 0.06 0.76 0.00 0.57 0 0.00 0.00 0.00 0 0
## cas13 0.01 0.00 0.22 0.81 0.00 0.00 0.08 0 0.00 0.00 0.00 0 0
## cas07 cas08 cas09 cas10 cas11 cas12 cas13
## sp 0.27 1 0.04 0.00 1.00 1 0.36
## sp.1 0.05 1 0.00 0.00 0.31 1 0.05
## sp.2 1.00 0 0.04 0.05 0.00 0 1.00
## sp.3 1.00 1 1.00 1.00 1.00 1 1.00
## sp.4 1.00 1 0.00 0.00 1.00 1 0.08
## sp.5 0.02 0 0.00 0.00 0.00 0 0.00
## sp.6 1.00 1 0.29 0.00 1.00 1 1.00
## cas01 0.00 0 0.00 0.00 0.00 0 0.00
## cas02 0.00 0 0.00 0.00 0.00 0 0.00
## cas03 0.00 0 0.00 0.00 0.00 0 0.00
## cas04 0.00 0 0.00 0.00 0.00 0 0.00
## cas05 0.00 0 0.00 0.00 0.00 0 0.00
## cas06 0.00 0 0.00 0.00 0.00 0 0.00
## cas07 0.00 0 0.00 0.00 0.00 0 0.00
## cas08 0.00 0 0.00 0.00 0.00 0 0.00
## cas09 0.00 0 0.00 0.00 0.00 0 0.00
## cas10 0.00 0 0.00 0.00 0.00 0 0.00
## cas11 0.00 0 0.00 0.00 0.00 0 0.00
## cas12 0.00 0 0.00 0.00 0.00 0 0.00
## cas13 0.00 0 0.00 0.00 0.00 0 0.00
##
## To see confidence intervals of the correlations, print with the short=FALSE option
#bootstrapped confidence intervals#
data.ci <- cor.ci(data [,c("sp", "sp.1", "sp.2", "sp.3", "sp.4", "sp.5", "sp.6",
"cas01", "cas02", "cas03", "cas04", "cas05",
"cas06", "cas07", "cas08", "cas09", "cas10",
"cas11", "cas12", "cas13")])
#to show the upper and lower confidence intervals#
ci <- cor.plot.upperLowerCi(data.ci)
#print the confidence intervals in matrix form#
ci
##
## High and low confidence intervals
## sp sp.1 sp.2 sp.3 sp.4 sp.5 sp.6 cs01 cs02 cs03 cs04 cs05
## sp 1.00 0.90 0.67 0.81 0.88 0.72 0.85 0.08 -0.15 -0.18 -0.19 -0.22
## sp.1 0.87 1.00 0.48 0.66 0.73 0.67 0.71 -0.10 -0.17 -0.17 -0.23 -0.23
## sp.2 0.58 0.36 1.00 0.47 0.43 0.16 0.39 0.31 0.19 0.06 -0.07 0.18
## sp.3 0.76 0.57 0.35 1.00 0.75 0.53 0.67 -0.07 -0.16 -0.13 -0.13 -0.13
## sp.4 0.85 0.66 0.30 0.67 1.00 0.67 0.88 -0.10 -0.20 -0.19 -0.18 -0.24
## sp.5 0.65 0.58 0.03 0.42 0.58 1.00 0.63 -0.22 -0.25 -0.26 -0.21 -0.42
## sp.6 0.81 0.63 0.25 0.59 0.84 0.55 1.00 -0.10 -0.17 -0.16 -0.14 -0.22
## cas01 -0.04 0.03 0.20 0.06 0.00 -0.11 0.01 1.00 0.65 0.49 0.46 0.41
## cas02 -0.02 -0.03 0.06 -0.03 -0.09 -0.14 -0.05 0.52 1.00 0.63 0.57 0.43
## cas03 -0.08 -0.07 -0.07 -0.03 -0.10 -0.16 -0.07 0.35 0.47 1.00 0.59 0.42
## cas04 -0.10 -0.13 0.04 -0.03 -0.10 -0.11 -0.07 0.33 0.44 0.43 1.00 0.33
## cas05 -0.10 -0.11 0.05 -0.01 -0.14 -0.33 -0.12 0.29 0.30 0.29 0.21 1.00
## cas06 -0.27 -0.25 -0.14 -0.16 -0.22 -0.20 -0.17 0.17 0.25 0.27 0.27 0.25
## cas07 -0.04 -0.06 0.01 0.04 -0.03 -0.07 -0.01 0.26 0.27 0.34 0.32 0.25
## cas08 0.02 0.01 0.14 0.05 -0.03 -0.20 -0.01 0.33 0.26 0.25 0.16 0.49
## cas09 -0.06 -0.08 0.06 -0.01 -0.13 -0.19 -0.09 0.48 0.50 0.37 0.36 0.36
## cas10 -0.11 -0.12 0.04 -0.02 -0.15 -0.31 -0.12 0.31 0.30 0.24 0.22 0.34
## cas11 0.01 -0.04 0.10 -0.06 -0.05 -0.17 -0.02 0.49 0.46 0.40 0.36 0.38
## cas12 0.05 0.00 0.10 -0.04 0.00 -0.11 0.03 0.48 0.44 0.31 0.31 0.32
## cas13 -0.06 -0.07 -0.07 0.01 -0.10 -0.13 -0.05 0.33 0.36 0.31 0.29 0.35
## cs06 cs07 cs08 cs09 cs10 cs11 cs12 cs13
## sp -0.38 -0.15 -0.08 -0.16 -0.22 -0.10 -0.08 -0.19
## sp.1 -0.37 -0.16 -0.10 -0.19 -0.23 -0.15 -0.13 -0.20
## sp.2 -0.26 -0.10 0.25 0.18 0.16 0.21 0.22 0.07
## sp.3 -0.28 -0.08 -0.07 -0.13 -0.14 0.06 0.09 -0.12
## sp.4 -0.34 -0.12 -0.14 -0.23 -0.25 -0.14 -0.12 -0.20
## sp.5 -0.32 -0.16 -0.30 -0.28 -0.41 -0.26 -0.24 -0.24
## sp.6 -0.30 -0.11 -0.12 -0.18 -0.23 -0.11 -0.09 -0.16
## cas01 0.28 0.41 0.44 0.60 0.44 0.62 0.60 0.46
## cas02 0.36 0.43 0.38 0.62 0.43 0.59 0.57 0.49
## cas03 0.37 0.50 0.36 0.52 0.37 0.56 0.45 0.46
## cas04 0.39 0.51 0.29 0.50 0.35 0.54 0.45 0.44
## cas05 0.38 0.38 0.60 0.47 0.47 0.48 0.45 0.47
## cas06 1.00 0.39 0.32 0.42 0.30 0.33 0.34 0.43
## cas07 0.29 1.00 0.37 0.40 0.25 0.51 0.45 0.42
## cas08 0.19 0.25 1.00 0.47 0.43 0.47 0.45 0.40
## cas09 0.31 0.25 0.36 1.00 0.50 0.63 0.59 0.53
## cas10 0.19 0.13 0.32 0.38 1.00 0.41 0.41 0.42
## cas11 0.22 0.35 0.35 0.51 0.29 1.00 0.66 0.50
## cas12 0.22 0.29 0.32 0.46 0.28 0.52 1.00 0.46
## cas13 0.32 0.27 0.29 0.41 0.29 0.37 0.33 1.00
plot(data$sp, data$cas,
main = "CAS and Self-Protection Scatterplot",
xlab = "Self-Protection overall",
ylab = "CAS")
abline(lm(data$cas ~ data$sp), col = "red") #regression line
lines(lowess(data$sp, data$cas), col = "blue") #smooth fitting line
plot(data$sp.1, data$cas,
main = "CAS and Rationalization Scatterplot",
xlab = "Rationalization",
ylab = "CAS")
abline(lm(data$cas ~ data$sp.1), col = "red") #regression line
lines(lowess(data$sp.1, data$cas), col = "blue") #smooth fitting line
plot(data$sp.2, data$cas,
main = "CAS and Avoidance Scatterplot",
xlab = "Avoidance",
ylab = "CAS")
abline(lm(data$cas ~ data$sp.2), col = "red") #regression line
lines(lowess(data$sp.2, data$cas), col = "blue") #smooth fitting line
plot(data$sp.3, data$cas,
main = "CAS and Denial of personal outcome severity",
xlab = "Denial of personal outcome severity",
ylab = "CAS")
abline(lm(data$cas ~ data$sp.3), col = "red") #regression line
lines(lowess(data$sp.3, data$cas), col = "blue") #smooth fitting line
plot(data$sp.4, data$cas,
main = "CAS and Denial of global outcome severity",
xlab = "Denial of global outcome severity",
ylab = "CAS")
abline(lm(data$cas ~ data$sp.4), col = "red") #regression line
lines(lowess(data$sp.4, data$cas), col = "blue") #smooth fitting line
plot(data$sp.5, data$cas,
main = "CAS and Denial of guilt",
xlab = "Denial of guilt",
ylab = "CAS")
abline(lm(data$cas ~ data$sp.5), col = "red") #regression line
lines(lowess(data$sp.5, data$cas), col = "blue") #smooth fitting line
plot(data$sp.6, data$cas,
main = "CAS and literal climate denial",
xlab = "Literal climate denial",
ylab = "CAS")
abline(lm(data$cas ~ data$sp.6), col = "red") #regression line
lines(lowess(data$sp.6, data$cas), col = "blue") #smooth fitting line
corr.test (data [,c("sj", "sdo", "nd", "rwa", "pol.orient",
"cas")],
method = "spearman")
## Call:corr.test(x = data[, c("sj", "sdo", "nd", "rwa", "pol.orient",
## "cas")], method = "spearman")
## Correlation matrix
## sj sdo nd rwa pol.orient cas
## sj 1.00 0.06 0.07 -0.18 -0.04 0.04
## sdo 0.06 1.00 0.34 0.45 0.41 -0.03
## nd 0.07 0.34 1.00 0.31 0.23 0.08
## rwa -0.18 0.45 0.31 1.00 0.46 0.00
## pol.orient -0.04 0.41 0.23 0.46 1.00 -0.11
## cas 0.04 -0.03 0.08 0.00 -0.11 1.00
## Sample Size
## [1] 1011
## Probability values (Entries above the diagonal are adjusted for multiple tests.)
## sj sdo nd rwa pol.orient cas
## sj 0.00 0.34 0.11 0.00 0.71 0.71
## sdo 0.07 0.00 0.00 0.00 0.00 0.82
## nd 0.02 0.00 0.00 0.00 0.00 0.11
## rwa 0.00 0.00 0.00 0.00 0.00 0.95
## pol.orient 0.18 0.00 0.00 0.00 0.00 0.00
## cas 0.18 0.41 0.02 0.95 0.00 0.00
##
## To see confidence intervals of the correlations, print with the short=FALSE option
#bootstrapped confidence intervals#
data.ci <- cor.ci(data [,c("sj", "sdo", "nd", "rwa", "pol.orient",
"cas")])
#to show the upper and lower confidence intervals#
ci <- cor.plot.upperLowerCi(data.ci)
#print the confidence intervals in matrix form#
ci
##
## High and low confidence intervals
## sj sdo nd rwa pl.r cas
## sj 1.00 0.09 0.13 -0.24 -0.11 0.12
## sdo -0.05 1.00 0.38 0.54 0.47 -0.09
## nd 0.00 0.26 1.00 0.37 0.29 0.13
## rwa -0.12 0.43 0.24 1.00 0.52 0.10
## pol.orient 0.02 0.35 0.18 0.41 1.00 -0.12
## cas -0.02 0.03 0.00 -0.03 0.00 1.00
corr.test (data [,c("sj", "sdo", "nd", "rwa", "pol.orient",
"cas01", "cas02", "cas03", "cas04", "cas05",
"cas06", "cas07", "cas08", "cas09", "cas10",
"cas11", "cas12", "cas13")],
method = "spearman")
## Call:corr.test(x = data[, c("sj", "sdo", "nd", "rwa", "pol.orient",
## "cas01", "cas02", "cas03", "cas04", "cas05", "cas06", "cas07",
## "cas08", "cas09", "cas10", "cas11", "cas12", "cas13")], method = "spearman")
## Correlation matrix
## sj sdo nd rwa pol.orient cas01 cas02 cas03 cas04 cas05
## sj 1.00 0.06 0.07 -0.18 -0.04 0.01 0.07 0.02 0.02 0.06
## sdo 0.06 1.00 0.34 0.45 0.41 0.05 0.01 -0.04 -0.01 -0.02
## nd 0.07 0.34 1.00 0.31 0.23 0.14 0.05 0.04 0.00 0.06
## rwa -0.18 0.45 0.31 1.00 0.46 0.05 0.01 -0.01 0.00 0.01
## pol.orient -0.04 0.41 0.23 0.46 1.00 -0.08 -0.05 -0.08 -0.06 -0.06
## cas01 0.01 0.05 0.14 0.05 -0.08 1.00 0.58 0.47 0.41 0.42
## cas02 0.07 0.01 0.05 0.01 -0.05 0.58 1.00 0.57 0.50 0.40
## cas03 0.02 -0.04 0.04 -0.01 -0.08 0.47 0.57 1.00 0.51 0.38
## cas04 0.02 -0.01 0.00 0.00 -0.06 0.41 0.50 0.51 1.00 0.31
## cas05 0.06 -0.02 0.06 0.01 -0.06 0.42 0.40 0.38 0.31 1.00
## cas06 0.05 -0.13 -0.12 -0.10 -0.12 0.27 0.35 0.36 0.36 0.34
## cas07 0.01 -0.03 0.07 0.05 -0.08 0.38 0.39 0.45 0.44 0.32
## cas08 0.00 -0.01 0.13 0.09 -0.02 0.44 0.38 0.33 0.25 0.55
## cas09 0.03 0.00 0.08 0.00 -0.09 0.56 0.58 0.48 0.44 0.45
## cas10 0.05 -0.04 0.02 -0.12 -0.09 0.44 0.42 0.34 0.32 0.45
## cas11 0.04 0.02 0.10 0.06 -0.07 0.56 0.57 0.53 0.46 0.46
## cas12 0.04 0.06 0.10 0.09 -0.04 0.57 0.54 0.46 0.43 0.42
## cas13 0.06 0.00 0.08 0.02 -0.07 0.46 0.48 0.41 0.38 0.43
## cas06 cas07 cas08 cas09 cas10 cas11 cas12 cas13
## sj 0.05 0.01 0.00 0.03 0.05 0.04 0.04 0.06
## sdo -0.13 -0.03 -0.01 0.00 -0.04 0.02 0.06 0.00
## nd -0.12 0.07 0.13 0.08 0.02 0.10 0.10 0.08
## rwa -0.10 0.05 0.09 0.00 -0.12 0.06 0.09 0.02
## pol.orient -0.12 -0.08 -0.02 -0.09 -0.09 -0.07 -0.04 -0.07
## cas01 0.27 0.38 0.44 0.56 0.44 0.56 0.57 0.46
## cas02 0.35 0.39 0.38 0.58 0.42 0.57 0.54 0.48
## cas03 0.36 0.45 0.33 0.48 0.34 0.53 0.46 0.41
## cas04 0.36 0.44 0.25 0.44 0.32 0.46 0.43 0.38
## cas05 0.34 0.32 0.55 0.45 0.45 0.46 0.42 0.43
## cas06 1.00 0.34 0.27 0.39 0.28 0.30 0.33 0.38
## cas07 0.34 1.00 0.32 0.37 0.28 0.45 0.42 0.40
## cas08 0.27 0.32 1.00 0.45 0.42 0.44 0.42 0.37
## cas09 0.39 0.37 0.45 1.00 0.50 0.59 0.57 0.49
## cas10 0.28 0.28 0.42 0.50 1.00 0.43 0.43 0.40
## cas11 0.30 0.45 0.44 0.59 0.43 1.00 0.62 0.50
## cas12 0.33 0.42 0.42 0.57 0.43 0.62 1.00 0.47
## cas13 0.38 0.40 0.37 0.49 0.40 0.50 0.47 1.00
## Sample Size
## [1] 1011
## Probability values (Entries above the diagonal are adjusted for multiple tests.)
## sj sdo nd rwa pol.orient cas01 cas02 cas03 cas04 cas05 cas06
## sj 0.00 1.00 0.86 0.00 1.00 1.00 1 1.00 1 1 1.00
## sdo 0.07 0.00 0.00 0.00 0.00 1.00 1 1.00 1 1 0.00
## nd 0.02 0.00 0.00 0.00 0.00 0.00 1 1.00 1 1 0.01
## rwa 0.00 0.00 0.00 0.00 0.00 1.00 1 1.00 1 1 0.08
## pol.orient 0.18 0.00 0.00 0.00 0.00 0.57 1 0.46 1 1 0.00
## cas01 0.86 0.11 0.00 0.10 0.01 0.00 0 0.00 0 0 0.00
## cas02 0.03 0.68 0.14 0.77 0.13 0.00 0 0.00 0 0 0.00
## cas03 0.50 0.26 0.24 0.80 0.01 0.00 0 0.00 0 0 0.00
## cas04 0.50 0.71 0.90 0.99 0.05 0.00 0 0.00 0 0 0.00
## cas05 0.06 0.58 0.08 0.81 0.04 0.00 0 0.00 0 0 0.00
## cas06 0.11 0.00 0.00 0.00 0.00 0.00 0 0.00 0 0 0.00
## cas07 0.76 0.38 0.02 0.12 0.01 0.00 0 0.00 0 0 0.00
## cas08 0.91 0.66 0.00 0.01 0.63 0.00 0 0.00 0 0 0.00
## cas09 0.32 0.99 0.01 0.92 0.00 0.00 0 0.00 0 0 0.00
## cas10 0.11 0.24 0.58 0.00 0.00 0.00 0 0.00 0 0 0.00
## cas11 0.26 0.58 0.00 0.05 0.03 0.00 0 0.00 0 0 0.00
## cas12 0.18 0.07 0.00 0.00 0.16 0.00 0 0.00 0 0 0.00
## cas13 0.07 0.97 0.01 0.46 0.02 0.00 0 0.00 0 0 0.00
## cas07 cas08 cas09 cas10 cas11 cas12 cas13
## sj 1.00 1.00 1.00 1.00 1.00 1.00 1.00
## sdo 1.00 1.00 1.00 1.00 1.00 1.00 1.00
## nd 0.95 0.00 0.67 1.00 0.11 0.08 0.48
## rwa 1.00 0.38 1.00 0.01 1.00 0.18 1.00
## pol.orient 0.46 1.00 0.25 0.15 1.00 1.00 0.95
## cas01 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas02 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas03 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas04 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas05 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas06 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas07 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas08 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas09 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas10 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas11 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas12 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas13 0.00 0.00 0.00 0.00 0.00 0.00 0.00
##
## To see confidence intervals of the correlations, print with the short=FALSE option
#bootstrapped confidence intervals#
data.ci <- cor.ci(data [,c("sj", "sdo", "nd", "rwa", "pol.orient",
"cas01", "cas02", "cas03", "cas04", "cas05",
"cas06", "cas07", "cas08", "cas09", "cas10",
"cas11", "cas12", "cas13")])
#to show the upper and lower confidence intervals#
ci <- cor.plot.upperLowerCi(data.ci)
#print the confidence intervals in matrix form#
ci
##
## High and low confidence intervals
## sj sdo nd rwa pl.r cs01 cs02 cs03 cs04 cs05 cs06
## sj 1.00 0.09 0.15 -0.23 -0.11 -0.07 0.11 0.09 0.09 0.13 0.12
## sdo -0.06 1.00 0.39 0.54 0.48 0.08 -0.06 -0.12 -0.09 -0.10 -0.20
## nd -0.01 0.25 1.00 0.36 0.30 0.18 0.10 -0.06 -0.09 0.09 -0.19
## rwa -0.11 0.44 0.25 1.00 0.51 0.14 0.11 -0.07 -0.09 0.08 -0.17
## pol.orient 0.03 0.35 0.18 0.42 1.00 -0.11 -0.09 -0.15 -0.11 -0.11 -0.19
## cas01 0.04 -0.04 0.05 0.00 0.02 1.00 0.64 0.50 0.47 0.43 0.28
## cas02 -0.02 0.05 -0.03 -0.03 0.03 0.51 1.00 0.61 0.56 0.43 0.35
## cas03 -0.04 -0.02 0.05 0.05 -0.02 0.34 0.47 1.00 0.58 0.42 0.36
## cas04 -0.03 0.03 0.04 0.04 0.01 0.32 0.43 0.43 1.00 0.34 0.37
## cas05 0.00 0.02 -0.05 -0.06 0.03 0.29 0.29 0.29 0.21 1.00 0.38
## cas06 -0.01 -0.07 -0.07 -0.04 -0.05 0.17 0.24 0.28 0.28 0.25 1.00
## cas07 -0.05 0.02 0.00 0.00 0.01 0.25 0.27 0.34 0.34 0.25 0.28
## cas08 -0.06 0.01 0.04 0.02 -0.05 0.32 0.25 0.23 0.17 0.48 0.18
## cas09 -0.04 0.04 -0.01 -0.05 0.00 0.48 0.50 0.38 0.36 0.35 0.30
## cas10 -0.01 0.00 0.04 -0.07 -0.01 0.31 0.30 0.24 0.21 0.35 0.17
## cas11 -0.03 0.05 0.02 0.01 0.03 0.49 0.46 0.41 0.38 0.37 0.22
## cas12 -0.03 -0.01 0.02 0.05 0.07 0.49 0.46 0.32 0.31 0.32 0.21
## cas13 -0.01 0.03 -0.03 -0.05 0.02 0.33 0.36 0.31 0.28 0.35 0.32
## cs07 cs08 cs09 cs10 cs11 cs12 cs13
## sj 0.10 0.07 0.07 0.11 0.09 0.10 0.13
## sdo -0.08 -0.10 -0.07 -0.12 -0.06 0.11 -0.08
## nd 0.12 0.15 0.12 -0.08 0.13 0.15 0.11
## rwa 0.12 0.16 0.08 -0.20 0.13 0.17 0.07
## pol.orient -0.14 0.08 -0.13 -0.14 -0.10 -0.06 -0.12
## cas01 0.40 0.45 0.61 0.43 0.62 0.60 0.46
## cas02 0.41 0.39 0.62 0.43 0.59 0.57 0.49
## cas03 0.50 0.37 0.51 0.36 0.56 0.44 0.45
## cas04 0.50 0.28 0.48 0.35 0.53 0.45 0.44
## cas05 0.38 0.60 0.47 0.47 0.49 0.45 0.48
## cas06 0.39 0.31 0.40 0.30 0.33 0.34 0.43
## cas07 1.00 0.37 0.39 0.25 0.49 0.45 0.41
## cas08 0.24 1.00 0.47 0.44 0.47 0.45 0.41
## cas09 0.24 0.35 1.00 0.50 0.63 0.59 0.53
## cas10 0.12 0.30 0.37 1.00 0.41 0.41 0.42
## cas11 0.35 0.34 0.51 0.29 1.00 0.66 0.50
## cas12 0.29 0.32 0.47 0.28 0.52 1.00 0.47
## cas13 0.28 0.28 0.41 0.28 0.38 0.33 1.00
plot(data$sj, data$cas,
main = "CAS and System Justification Scatterplot",
xlab = "System Justification",
ylab = "CAS")
abline(lm(data$cas ~ data$sj), col = "red") #regression line
lines(lowess(data$sj, data$cas), col = "blue") #smooth fitting line
plot(data$nd, data$cas,
main = "CAS and Human dominance over nature Scatterplot",
xlab = "Human dominance over nature",
ylab = "CAS")
abline(lm(data$cas ~ data$nd), col = "red") #regression line
lines(lowess(data$nd, data$cas), col = "blue") #smooth fitting line
plot(data$pol.orient, data$cas,
main = "CAS and political orientation",
xlab = "Political orientation",
ylab = "CAS")
abline(lm(data$cas ~ data$pol.orient), col = "red") #regression line
lines(lowess(data$pol.orient, data$cas), col = "blue") #smooth fitting line
corr.test (data [,c("gb.rs", "gb.as", "gb.cs", "gb.rf", "gb.af", "gb.cf",
"cas")],
method = "spearman")
## Call:corr.test(x = data[, c("gb.rs", "gb.as", "gb.cs", "gb.rf", "gb.af",
## "gb.cf", "cas")], method = "spearman")
## Correlation matrix
## gb.rs gb.as gb.cs gb.rf gb.af gb.cf cas
## gb.rs 1.00 0.44 0.28 -0.41 -0.28 -0.32 -0.10
## gb.as 0.44 1.00 0.29 -0.34 -0.48 -0.38 -0.14
## gb.cs 0.28 0.29 1.00 -0.02 0.03 -0.12 0.01
## gb.rf -0.41 -0.34 -0.02 1.00 0.63 0.65 0.27
## gb.af -0.28 -0.48 0.03 0.63 1.00 0.61 0.20
## gb.cf -0.32 -0.38 -0.12 0.65 0.61 1.00 0.29
## cas -0.10 -0.14 0.01 0.27 0.20 0.29 1.00
## Sample Size
## [1] 1011
## Probability values (Entries above the diagonal are adjusted for multiple tests.)
## gb.rs gb.as gb.cs gb.rf gb.af gb.cf cas
## gb.rs 0 0 0.00 0 0.00 0 0
## gb.as 0 0 0.00 0 0.00 0 0
## gb.cs 0 0 0.00 1 0.87 0 1
## gb.rf 0 0 0.59 0 0.00 0 0
## gb.af 0 0 0.29 0 0.00 0 0
## gb.cf 0 0 0.00 0 0.00 0 0
## cas 0 0 0.72 0 0.00 0 0
##
## To see confidence intervals of the correlations, print with the short=FALSE option
#bootstrapped confidence intervals#
data.ci <- cor.ci(data [,c("gb.rs", "gb.as", "gb.cs", "gb.rf", "gb.af", "gb.cf",
"cas")])
#to show the upper and lower confidence intervals#
ci <- cor.plot.upperLowerCi(data.ci)
#print the confidence intervals in matrix form#
ci
##
## High and low confidence intervals
## gb.rs gb.s gb.cs gb.rf gb.f gb.cf cas
## gb.rs 1.00 0.47 0.33 -0.46 -0.32 -0.36 -0.14
## gb.as 0.35 1.00 0.36 -0.39 -0.54 -0.43 -0.18
## gb.cs 0.21 0.22 1.00 0.07 0.11 -0.20 0.09
## gb.rf -0.33 -0.27 -0.06 1.00 0.67 0.66 0.31
## gb.af -0.19 -0.43 -0.02 0.58 1.00 0.63 0.25
## gb.cf -0.24 -0.32 -0.07 0.59 0.55 1.00 0.32
## cas -0.02 -0.05 -0.02 0.19 0.15 0.21 1.00
corr.test (data [,c("gb.rs", "gb.as", "gb.cs", "gb.rf", "gb.af", "gb.cf",
"cas01", "cas02", "cas03", "cas04", "cas05",
"cas06", "cas07", "cas08", "cas09", "cas10",
"cas11", "cas12", "cas13")],
method = "spearman")
## Call:corr.test(x = data[, c("gb.rs", "gb.as", "gb.cs", "gb.rf", "gb.af",
## "gb.cf", "cas01", "cas02", "cas03", "cas04", "cas05", "cas06",
## "cas07", "cas08", "cas09", "cas10", "cas11", "cas12", "cas13")],
## method = "spearman")
## Correlation matrix
## gb.rs gb.as gb.cs gb.rf gb.af gb.cf cas01 cas02 cas03 cas04 cas05 cas06
## gb.rs 1.00 0.44 0.28 -0.41 -0.28 -0.32 -0.13 -0.10 -0.09 -0.07 -0.02 0.09
## gb.as 0.44 1.00 0.29 -0.34 -0.48 -0.38 -0.10 -0.09 -0.09 -0.03 -0.08 0.06
## gb.cs 0.28 0.29 1.00 -0.02 0.03 -0.12 -0.01 -0.02 0.01 0.05 0.03 0.09
## gb.rf -0.41 -0.34 -0.02 1.00 0.63 0.65 0.22 0.21 0.20 0.18 0.15 0.11
## gb.af -0.28 -0.48 0.03 0.63 1.00 0.61 0.17 0.14 0.12 0.10 0.13 0.06
## gb.cf -0.32 -0.38 -0.12 0.65 0.61 1.00 0.24 0.20 0.21 0.16 0.19 0.08
## cas01 -0.13 -0.10 -0.01 0.22 0.17 0.24 1.00 0.58 0.47 0.41 0.42 0.27
## cas02 -0.10 -0.09 -0.02 0.21 0.14 0.20 0.58 1.00 0.57 0.50 0.40 0.35
## cas03 -0.09 -0.09 0.01 0.20 0.12 0.21 0.47 0.57 1.00 0.51 0.38 0.36
## cas04 -0.07 -0.03 0.05 0.18 0.10 0.16 0.41 0.50 0.51 1.00 0.31 0.36
## cas05 -0.02 -0.08 0.03 0.15 0.13 0.19 0.42 0.40 0.38 0.31 1.00 0.34
## cas06 0.09 0.06 0.09 0.11 0.06 0.08 0.27 0.35 0.36 0.36 0.34 1.00
## cas07 -0.05 0.00 0.10 0.13 0.05 0.10 0.38 0.39 0.45 0.44 0.32 0.34
## cas08 -0.07 -0.09 0.02 0.21 0.17 0.24 0.44 0.38 0.33 0.25 0.55 0.27
## cas09 -0.08 -0.10 0.02 0.24 0.18 0.24 0.56 0.58 0.48 0.44 0.45 0.39
## cas10 -0.12 -0.18 -0.04 0.21 0.18 0.24 0.44 0.42 0.34 0.32 0.45 0.28
## cas11 -0.11 -0.12 0.01 0.20 0.17 0.24 0.56 0.57 0.53 0.46 0.46 0.30
## cas12 -0.07 -0.12 0.04 0.22 0.16 0.22 0.57 0.54 0.46 0.43 0.42 0.33
## cas13 -0.08 -0.08 0.03 0.15 0.11 0.16 0.46 0.48 0.41 0.38 0.43 0.38
## cas07 cas08 cas09 cas10 cas11 cas12 cas13
## gb.rs -0.05 -0.07 -0.08 -0.12 -0.11 -0.07 -0.08
## gb.as 0.00 -0.09 -0.10 -0.18 -0.12 -0.12 -0.08
## gb.cs 0.10 0.02 0.02 -0.04 0.01 0.04 0.03
## gb.rf 0.13 0.21 0.24 0.21 0.20 0.22 0.15
## gb.af 0.05 0.17 0.18 0.18 0.17 0.16 0.11
## gb.cf 0.10 0.24 0.24 0.24 0.24 0.22 0.16
## cas01 0.38 0.44 0.56 0.44 0.56 0.57 0.46
## cas02 0.39 0.38 0.58 0.42 0.57 0.54 0.48
## cas03 0.45 0.33 0.48 0.34 0.53 0.46 0.41
## cas04 0.44 0.25 0.44 0.32 0.46 0.43 0.38
## cas05 0.32 0.55 0.45 0.45 0.46 0.42 0.43
## cas06 0.34 0.27 0.39 0.28 0.30 0.33 0.38
## cas07 1.00 0.32 0.37 0.28 0.45 0.42 0.40
## cas08 0.32 1.00 0.45 0.42 0.44 0.42 0.37
## cas09 0.37 0.45 1.00 0.50 0.59 0.57 0.49
## cas10 0.28 0.42 0.50 1.00 0.43 0.43 0.40
## cas11 0.45 0.44 0.59 0.43 1.00 0.62 0.50
## cas12 0.42 0.42 0.57 0.43 0.62 1.00 0.47
## cas13 0.40 0.37 0.49 0.40 0.50 0.47 1.00
## Sample Size
## [1] 1011
## Probability values (Entries above the diagonal are adjusted for multiple tests.)
## gb.rs gb.as gb.cs gb.rf gb.af gb.cf cas01 cas02 cas03 cas04 cas05 cas06
## gb.rs 0.00 0.00 0.00 0 0.00 0.00 0.00 0.03 0.15 0.62 1.00 0.15
## gb.as 0.00 0.00 0.00 0 0.00 0.00 0.05 0.12 0.12 1.00 0.21 1.00
## gb.cs 0.00 0.00 0.00 1 1.00 0.00 1.00 1.00 1.00 1.00 1.00 0.16
## gb.rf 0.00 0.00 0.59 0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.03
## gb.af 0.00 0.00 0.29 0 0.00 0.00 0.00 0.00 0.00 0.08 0.00 0.96
## gb.cf 0.00 0.00 0.00 0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.23
## cas01 0.00 0.00 0.78 0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas02 0.00 0.00 0.57 0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas03 0.00 0.00 0.71 0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas04 0.03 0.32 0.15 0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas05 0.46 0.01 0.29 0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas06 0.00 0.06 0.01 0 0.05 0.01 0.00 0.00 0.00 0.00 0.00 0.00
## cas07 0.13 0.96 0.00 0 0.08 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas08 0.02 0.01 0.49 0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas09 0.01 0.00 0.60 0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas10 0.00 0.00 0.15 0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas11 0.00 0.00 0.73 0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas12 0.02 0.00 0.22 0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas13 0.01 0.01 0.33 0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas07 cas08 cas09 cas10 cas11 cas12 cas13
## gb.rs 1.00 0.49 0.29 0.01 0.01 0.43 0.21
## gb.as 1.00 0.16 0.05 0.00 0.00 0.01 0.26
## gb.cs 0.06 1.00 1.00 1.00 1.00 1.00 1.00
## gb.rf 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## gb.af 1.00 0.00 0.00 0.00 0.00 0.00 0.01
## gb.cf 0.04 0.00 0.00 0.00 0.00 0.00 0.00
## cas01 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas02 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas03 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas04 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas05 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas06 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas07 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas08 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas09 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas10 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas11 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas12 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## cas13 0.00 0.00 0.00 0.00 0.00 0.00 0.00
##
## To see confidence intervals of the correlations, print with the short=FALSE option
#bootstrapped confidence intervals#
data.ci <- cor.ci(data [,c("gb.rs", "gb.as", "gb.cs", "gb.rf", "gb.af", "gb.cf",
"cas01", "cas02", "cas03", "cas04", "cas05",
"cas06", "cas07", "cas08", "cas09", "cas10",
"cas11", "cas12", "cas13")])
#to show the upper and lower confidence intervals#
ci <- cor.plot.upperLowerCi(data.ci)
#print the confidence intervals in matrix form#
ci
##
## High and low confidence intervals
## gb.rs gb.s gb.cs gb.rf gb.f gb.cf cs01 cs02 cs03 cs04 cs05 cs06
## gb.rs 1.00 0.48 0.33 -0.46 -0.32 -0.37 -0.15 -0.13 -0.11 -0.12 0.07 0.14
## gb.as 0.36 1.00 0.36 -0.40 -0.54 -0.43 -0.16 -0.16 -0.15 -0.09 -0.14 0.11
## gb.cs 0.21 0.23 1.00 0.07 0.10 -0.20 -0.08 0.07 0.09 0.11 0.11 0.15
## gb.rf -0.34 -0.27 -0.06 1.00 0.66 0.67 0.25 0.24 0.24 0.21 0.20 0.15
## gb.af -0.20 -0.44 -0.02 0.58 1.00 0.63 0.22 0.21 0.18 0.15 0.18 0.12
## gb.cf -0.25 -0.31 -0.08 0.58 0.55 1.00 0.26 0.22 0.24 0.19 0.22 0.14
## cas01 -0.04 -0.03 0.06 0.13 0.10 0.15 1.00 0.65 0.49 0.47 0.42 0.29
## cas02 -0.01 -0.02 -0.06 0.11 0.08 0.09 0.51 1.00 0.62 0.57 0.43 0.37
## cas03 0.01 0.00 -0.03 0.12 0.05 0.12 0.35 0.47 1.00 0.60 0.41 0.37
## cas04 0.02 0.05 0.00 0.08 0.01 0.06 0.32 0.43 0.42 1.00 0.34 0.38
## cas05 -0.06 -0.01 -0.02 0.06 0.07 0.11 0.29 0.31 0.30 0.21 1.00 0.38
## cas06 0.02 0.00 0.01 0.03 -0.01 0.01 0.17 0.25 0.28 0.27 0.26 1.00
## cas07 0.06 -0.02 0.07 0.05 -0.01 0.02 0.24 0.26 0.33 0.33 0.25 0.29
## cas08 0.03 -0.03 -0.04 0.13 0.11 0.17 0.33 0.25 0.23 0.16 0.49 0.20
## cas09 -0.01 -0.02 -0.05 0.18 0.12 0.17 0.47 0.49 0.37 0.35 0.35 0.30
## cas10 -0.03 -0.13 0.01 0.13 0.13 0.18 0.32 0.31 0.25 0.22 0.36 0.18
## cas11 -0.01 -0.03 -0.05 0.11 0.09 0.15 0.49 0.44 0.39 0.37 0.38 0.22
## cas12 0.03 -0.02 -0.01 0.11 0.08 0.12 0.49 0.45 0.31 0.32 0.32 0.22
## cas13 0.01 0.00 -0.03 0.06 0.03 0.07 0.34 0.36 0.32 0.29 0.36 0.32
## cs07 cs08 cs09 cs10 cs11 cs12 cs13
## gb.rs -0.07 -0.11 -0.14 -0.16 -0.15 -0.10 -0.13
## gb.as 0.11 -0.16 -0.16 -0.25 -0.16 -0.16 -0.12
## gb.cs 0.18 0.09 0.07 -0.12 0.08 0.11 0.09
## gb.rf 0.16 0.27 0.30 0.27 0.24 0.23 0.18
## gb.af 0.12 0.23 0.24 0.26 0.21 0.21 0.16
## gb.cf 0.15 0.28 0.29 0.31 0.27 0.26 0.19
## cas01 0.41 0.44 0.61 0.43 0.62 0.61 0.46
## cas02 0.42 0.38 0.62 0.43 0.59 0.57 0.49
## cas03 0.50 0.37 0.52 0.37 0.57 0.45 0.46
## cas04 0.51 0.29 0.50 0.36 0.53 0.45 0.45
## cas05 0.37 0.59 0.47 0.48 0.49 0.45 0.47
## cas06 0.40 0.31 0.42 0.30 0.34 0.34 0.43
## cas07 1.00 0.37 0.39 0.24 0.51 0.45 0.42
## cas08 0.25 1.00 0.46 0.44 0.46 0.45 0.41
## cas09 0.24 0.35 1.00 0.50 0.63 0.59 0.54
## cas10 0.12 0.32 0.38 1.00 0.40 0.40 0.42
## cas11 0.33 0.35 0.51 0.30 1.00 0.66 0.51
## cas12 0.30 0.32 0.46 0.29 0.53 1.00 0.47
## cas13 0.28 0.29 0.40 0.29 0.38 0.34 1.00
plot(data$gb.as, data$cas,
main = "CAS and autonomy satisfaction",
xlab = "Autonomy satisfaction",
ylab = "CAS")
abline(lm(data$cas ~ data$gb.as), col = "red") #regression line
lines(lowess(data$gb.as, data$cas), col = "blue") #smooth fitting line
plot(data$gb.af, data$cas,
main = "CAS and autonomy frustration",
xlab = "Autonomy frustration",
ylab = "CAS")
abline(lm(data$cas ~ data$gb.af), col = "red") #regression line
lines(lowess(data$gb.af, data$cas), col = "blue") #smooth fitting line
plot(data$gb.cs, data$cas,
main = "CAS and competence satisfaction",
xlab = "Competence satisfaction",
ylab = "CAS")
abline(lm(data$cas ~ data$gb.cs), col = "red") #regression line
lines(lowess(data$gb.cs, data$cas), col = "blue") #smooth fitting line
plot(data$gb.cf, data$cas,
main = "CAS and competence frustration",
xlab = "Competence frustration",
ylab = "CAS")
abline(lm(data$cas ~ data$gb.cf), col = "red") #regression line
lines(lowess(data$gb.cf, data$cas), col = "blue") #smooth fitting line
corr.test (data [,c("asimp.all", "aspro.all",
"cas")],
method = "spearman")
## Call:corr.test(x = data[, c("asimp.all", "aspro.all", "cas")], method = "spearman")
## Correlation matrix
## asimp.all aspro.all cas
## asimp.all 1.00 0.59 0.13
## aspro.all 0.59 1.00 0.09
## cas 0.13 0.09 1.00
## Sample Size
## [1] 1011
## Probability values (Entries above the diagonal are adjusted for multiple tests.)
## asimp.all aspro.all cas
## asimp.all 0 0 0
## aspro.all 0 0 0
## cas 0 0 0
##
## To see confidence intervals of the correlations, print with the short=FALSE option
#bootstrapped confidence intervals#
data.ci <- cor.ci(data [,c("asimp.all", "aspro.all",
"cas")])
#to show the upper and lower confidence intervals#
ci <- cor.plot.upperLowerCi(data.ci)
#print the confidence intervals in matrix form#
ci
##
## High and low confidence intervals
## asm. asp. cas
## asimp.all 1.00 0.64 0.21
## aspro.all 0.54 1.00 0.16
## cas 0.08 0.04 1.00
corr.test (data [,c("asimp.all", "aspro.all",
"cas01", "cas02", "cas03", "cas04", "cas05",
"cas06", "cas07", "cas08", "cas09", "cas10",
"cas11", "cas12", "cas13")],
method = "spearman")
## Call:corr.test(x = data[, c("asimp.all", "aspro.all", "cas01", "cas02",
## "cas03", "cas04", "cas05", "cas06", "cas07", "cas08", "cas09",
## "cas10", "cas11", "cas12", "cas13")], method = "spearman")
## Correlation matrix
## asimp.all aspro.all cas01 cas02 cas03 cas04 cas05 cas06 cas07 cas08
## asimp.all 1.00 0.59 0.16 0.08 0.10 0.09 0.10 -0.09 0.08 0.14
## aspro.all 0.59 1.00 0.10 0.06 0.11 0.05 0.04 -0.07 0.05 0.14
## cas01 0.16 0.10 1.00 0.58 0.47 0.41 0.42 0.27 0.38 0.44
## cas02 0.08 0.06 0.58 1.00 0.57 0.50 0.40 0.35 0.39 0.38
## cas03 0.10 0.11 0.47 0.57 1.00 0.51 0.38 0.36 0.45 0.33
## cas04 0.09 0.05 0.41 0.50 0.51 1.00 0.31 0.36 0.44 0.25
## cas05 0.10 0.04 0.42 0.40 0.38 0.31 1.00 0.34 0.32 0.55
## cas06 -0.09 -0.07 0.27 0.35 0.36 0.36 0.34 1.00 0.34 0.27
## cas07 0.08 0.05 0.38 0.39 0.45 0.44 0.32 0.34 1.00 0.32
## cas08 0.14 0.14 0.44 0.38 0.33 0.25 0.55 0.27 0.32 1.00
## cas09 0.10 0.08 0.56 0.58 0.48 0.44 0.45 0.39 0.37 0.45
## cas10 0.07 0.08 0.44 0.42 0.34 0.32 0.45 0.28 0.28 0.42
## cas11 0.13 0.09 0.56 0.57 0.53 0.46 0.46 0.30 0.45 0.44
## cas12 0.17 0.12 0.57 0.54 0.46 0.43 0.42 0.33 0.42 0.42
## cas13 0.08 0.03 0.46 0.48 0.41 0.38 0.43 0.38 0.40 0.37
## cas09 cas10 cas11 cas12 cas13
## asimp.all 0.10 0.07 0.13 0.17 0.08
## aspro.all 0.08 0.08 0.09 0.12 0.03
## cas01 0.56 0.44 0.56 0.57 0.46
## cas02 0.58 0.42 0.57 0.54 0.48
## cas03 0.48 0.34 0.53 0.46 0.41
## cas04 0.44 0.32 0.46 0.43 0.38
## cas05 0.45 0.45 0.46 0.42 0.43
## cas06 0.39 0.28 0.30 0.33 0.38
## cas07 0.37 0.28 0.45 0.42 0.40
## cas08 0.45 0.42 0.44 0.42 0.37
## cas09 1.00 0.50 0.59 0.57 0.49
## cas10 0.50 1.00 0.43 0.43 0.40
## cas11 0.59 0.43 1.00 0.62 0.50
## cas12 0.57 0.43 0.62 1.00 0.47
## cas13 0.49 0.40 0.50 0.47 1.00
## Sample Size
## [1] 1011
## Probability values (Entries above the diagonal are adjusted for multiple tests.)
## asimp.all aspro.all cas01 cas02 cas03 cas04 cas05 cas06 cas07 cas08
## asimp.all 0.00 0.00 0.00 0.09 0.04 0.08 0.02 0.05 0.09 0
## aspro.all 0.00 0.00 0.02 0.21 0.02 0.54 0.54 0.19 0.54 0
## cas01 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0
## cas02 0.01 0.04 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0
## cas03 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0
## cas04 0.01 0.15 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0
## cas05 0.00 0.17 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0
## cas06 0.00 0.03 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0
## cas07 0.01 0.14 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0
## cas08 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0
## cas09 0.00 0.01 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0
## cas10 0.02 0.01 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0
## cas11 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0
## cas12 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0
## cas13 0.01 0.28 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0
## cas09 cas10 cas11 cas12 cas13
## asimp.all 0.02 0.15 0.00 0 0.10
## aspro.all 0.09 0.10 0.05 0 0.54
## cas01 0.00 0.00 0.00 0 0.00
## cas02 0.00 0.00 0.00 0 0.00
## cas03 0.00 0.00 0.00 0 0.00
## cas04 0.00 0.00 0.00 0 0.00
## cas05 0.00 0.00 0.00 0 0.00
## cas06 0.00 0.00 0.00 0 0.00
## cas07 0.00 0.00 0.00 0 0.00
## cas08 0.00 0.00 0.00 0 0.00
## cas09 0.00 0.00 0.00 0 0.00
## cas10 0.00 0.00 0.00 0 0.00
## cas11 0.00 0.00 0.00 0 0.00
## cas12 0.00 0.00 0.00 0 0.00
## cas13 0.00 0.00 0.00 0 0.00
##
## To see confidence intervals of the correlations, print with the short=FALSE option
#bootstrapped confidence intervals#
data.ci <- cor.ci(data [,c("asimp.all", "aspro.all",
"cas01", "cas02", "cas03", "cas04", "cas05",
"cas06", "cas07", "cas08", "cas09", "cas10",
"cas11", "cas12", "cas13")])
#to show the upper and lower confidence intervals#
ci <- cor.plot.upperLowerCi(data.ci)
#print the confidence intervals in matrix form#
ci
##
## High and low confidence intervals
## asm. asp. cs01 cs02 cs03 cs04 cs05 cs06 cs07 cs08 cs09 cs10 cs11
## asimp.all 1.00 0.64 0.21 0.14 0.12 0.12 0.15 -0.15 0.18 0.18 0.15 0.10 0.19
## aspro.all 0.55 1.00 0.15 0.12 0.12 0.08 0.09 -0.14 0.12 0.19 0.14 0.13 0.14
## cas01 0.09 0.05 1.00 0.64 0.48 0.47 0.42 0.28 0.39 0.44 0.60 0.44 0.62
## cas02 0.01 0.01 0.52 1.00 0.60 0.56 0.42 0.36 0.40 0.38 0.62 0.44 0.58
## cas03 0.00 0.01 0.35 0.48 1.00 0.59 0.42 0.37 0.49 0.36 0.50 0.36 0.55
## cas04 -0.01 -0.03 0.31 0.44 0.42 1.00 0.35 0.38 0.51 0.29 0.48 0.34 0.52
## cas05 0.03 -0.03 0.28 0.30 0.28 0.20 1.00 0.38 0.37 0.59 0.47 0.47 0.48
## cas06 -0.03 -0.02 0.16 0.24 0.28 0.28 0.26 1.00 0.40 0.31 0.41 0.30 0.33
## cas07 0.04 0.00 0.26 0.28 0.34 0.33 0.25 0.28 1.00 0.37 0.39 0.26 0.50
## cas08 0.06 0.07 0.32 0.25 0.24 0.15 0.49 0.19 0.25 1.00 0.48 0.43 0.46
## cas09 0.03 0.02 0.48 0.50 0.38 0.36 0.35 0.31 0.26 0.35 1.00 0.50 0.63
## cas10 -0.02 0.02 0.31 0.29 0.24 0.23 0.35 0.18 0.13 0.31 0.37 1.00 0.41
## cas11 0.07 0.02 0.49 0.46 0.40 0.38 0.36 0.21 0.35 0.35 0.52 0.29 1.00
## cas12 0.10 0.03 0.49 0.44 0.30 0.31 0.32 0.22 0.30 0.31 0.47 0.29 0.52
## cas13 -0.01 -0.05 0.33 0.35 0.31 0.29 0.35 0.32 0.28 0.28 0.41 0.29 0.37
## cs12 cs13
## asimp.all 0.22 0.12
## aspro.all 0.16 0.07
## cas01 0.61 0.45
## cas02 0.58 0.49
## cas03 0.45 0.45
## cas04 0.45 0.44
## cas05 0.45 0.47
## cas06 0.34 0.43
## cas07 0.45 0.41
## cas08 0.46 0.41
## cas09 0.59 0.53
## cas10 0.41 0.41
## cas11 0.65 0.51
## cas12 1.00 0.47
## cas13 0.34 1.00
plot(data$asimp.all, data$cas,
main = "CAS and Aspirations Scatterplot",
xlab = "Aspirations",
ylab = "CAS")
abline(lm(data$cas ~ data$asimp.all), col = "red") #regression line
lines(lowess(data$asimp.all, data$cas), col = "blue") #smooth fitting line
Load relevant package
library(lm.beta)
reg.1 <- lm(ps ~ age + gender.d + income, data = data)
summary(reg.1)
##
## Call:
## lm(formula = ps ~ age + gender.d + income, data = data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -71.105 -12.102 1.632 15.743 33.804
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 65.71623 2.51531 26.126 <2e-16 ***
## age 0.11143 0.04809 2.317 0.0207 *
## gender.d 3.53806 1.34571 2.629 0.0087 **
## income -0.20863 0.23265 -0.897 0.3701
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 20.76 on 969 degrees of freedom
## (38 observations deleted due to missingness)
## Multiple R-squared: 0.01376, Adjusted R-squared: 0.01071
## F-statistic: 4.506 on 3 and 969 DF, p-value: 0.003788
lm.beta(reg.1)
##
## Call:
## lm(formula = ps ~ age + gender.d + income, data = data)
##
## Standardized Coefficients::
## (Intercept) age gender.d income
## 0.00000000 0.07430959 0.08476990 -0.02906588
confint(lm.beta(reg.1), level = 0.95)
## 2.5 % 97.5 %
## (Intercept) -4.93608120 4.9360812
## age -0.02006667 0.1686858
## gender.d -2.55607165 2.7256114
## income -0.48562384 0.4274921
res.lm <- residuals(reg.1)
describe (res.lm)
## vars n mean sd median trimmed mad min max range skew kurtosis
## X1 1 973 0 20.73 1.63 1.72 20.63 -71.11 33.8 104.91 -0.84 0.79
## se
## X1 0.66
qqnorm(res.lm)
qqline(res.lm,col="red")
shapiro.test(res.lm)
##
## Shapiro-Wilk normality test
##
## data: res.lm
## W = 0.95195, p-value < 2.2e-16
par(mfrow = c(2, 2))
plot(reg.1)
par(mfrow = c(1, 1))
vif(reg.1)
## age gender.d income
## 1.010655 1.021404 1.032159
reg <- lm(ps ~ age + gender.d + income +
cas, data = data)
summary(reg)
##
## Call:
## lm(formula = ps ~ age + gender.d + income + cas, data = data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -72.544 -11.941 2.088 15.137 36.557
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 58.82732 2.85367 20.615 < 2e-16 ***
## age 0.10985 0.04753 2.311 0.0210 *
## gender.d 2.93151 1.33562 2.195 0.0284 *
## income -0.18752 0.22996 -0.815 0.4150
## cas 3.97513 0.80874 4.915 1.04e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 20.52 on 968 degrees of freedom
## (38 observations deleted due to missingness)
## Multiple R-squared: 0.03777, Adjusted R-squared: 0.0338
## F-statistic: 9.5 on 4 and 968 DF, p-value: 1.553e-07
lm.beta(reg)
##
## Call:
## lm(formula = ps ~ age + gender.d + income + cas, data = data)
##
## Standardized Coefficients::
## (Intercept) age gender.d income cas
## 0.00000000 0.07326198 0.07023742 -0.02612376 0.15571603
confint(lm.beta(reg), level = 0.95)
## 2.5 % 97.5 %
## (Intercept) -5.60010029 5.6001003
## age -0.02000853 0.1665325
## gender.d -2.55081529 2.6912901
## income -0.47740110 0.4251536
## cas -1.43137775 1.7428098
res.lm <- residuals(reg)
describe (res.lm)
## vars n mean sd median trimmed mad min max range skew kurtosis
## X1 1 973 0 20.48 2.09 1.59 20.12 -72.54 36.56 109.1 -0.78 0.69
## se
## X1 0.66
qqnorm(res.lm)
qqline(res.lm,col="red")
shapiro.test(res.lm)
##
## Shapiro-Wilk normality test
##
## data: res.lm
## W = 0.95923, p-value = 7.929e-16
par(mfrow = c(2, 2))
plot(reg)
par(mfrow = c(1, 1))
vif(reg)
## age gender.d income cas
## 1.010701 1.030198 1.032520 1.009682
reg <- lm(ps ~ age + gender.d + income +
cas +
gb.rs + gb.rf + gb.as + gb.af + gb.cs + gb.cf, data = data)
summary(reg)
##
## Call:
## lm(formula = ps ~ age + gender.d + income + cas + gb.rs + gb.rf +
## gb.as + gb.af + gb.cs + gb.cf, data = data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -72.861 -12.110 2.196 15.244 40.989
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 54.00009 6.09748 8.856 < 2e-16 ***
## age 0.10152 0.05063 2.005 0.0452 *
## gender.d 2.96151 1.35824 2.180 0.0295 *
## income -0.14782 0.23282 -0.635 0.5256
## cas 4.13400 0.84867 4.871 1.3e-06 ***
## gb.rs 0.52593 0.67785 0.776 0.4380
## gb.rf -0.93387 0.68580 -1.362 0.1736
## gb.as 0.96372 0.77643 1.241 0.2148
## gb.af -0.35792 0.68775 -0.520 0.6029
## gb.cs -0.72159 0.57523 -1.254 0.2100
## gb.cf 1.40590 0.70417 1.997 0.0462 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 20.47 on 962 degrees of freedom
## (38 observations deleted due to missingness)
## Multiple R-squared: 0.04868, Adjusted R-squared: 0.0388
## F-statistic: 4.923 on 10 and 962 DF, p-value: 5.679e-07
lm.beta(reg)
##
## Call:
## lm(formula = ps ~ age + gender.d + income + cas + gb.rs + gb.rf +
## gb.as + gb.af + gb.cs + gb.cf, data = data)
##
## Standardized Coefficients::
## (Intercept) age gender.d income cas gb.rs
## 0.00000000 0.06770546 0.07095613 -0.02059295 0.16193938 0.02945637
## gb.rf gb.as gb.af gb.cs gb.cf
## -0.06393827 0.05076154 -0.02446115 -0.04497595 0.09050097
confint(lm.beta(reg), level = 0.95)
## 2.5 % 97.5 %
## (Intercept) -11.96589436 11.9658944
## age -0.03166052 0.1670715
## gender.d -2.59450393 2.7364162
## income -0.47747777 0.4362919
## cas -1.50352659 1.8274054
## gb.rs -1.30077789 1.3596906
## gb.rf -1.40976541 1.2818889
## gb.as -1.47292192 1.5744450
## gb.af -1.37412069 1.3251984
## gb.cs -1.17381652 1.0838646
## gb.cf -1.29139057 1.4723925
res.lm <- residuals(reg)
describe (res.lm)
## vars n mean sd median trimmed mad min max range skew kurtosis
## X1 1 973 0 20.36 2.2 1.56 20.05 -72.86 40.99 113.85 -0.79 0.74
## se
## X1 0.65
qqnorm(res.lm)
qqline(res.lm,col="red")
shapiro.test(res.lm)
##
## Shapiro-Wilk normality test
##
## data: res.lm
## W = 0.96084, p-value = 1.76e-15
par(mfrow = c(2, 2))
plot(reg)
par(mfrow = c(1, 1))
vif(reg)
## age gender.d income cas gb.rs gb.rf gb.as gb.af
## 1.153066 1.070923 1.063824 1.117624 1.457531 2.229399 1.691302 2.234056
## gb.cs gb.cf
## 1.299877 2.077814
reg <- lm(ps ~ age + gender.d + income +
gb*cas, data = data)
summary(reg)
##
## Call:
## lm(formula = ps ~ age + gender.d + income + gb * cas, data = data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -74.909 -11.952 2.186 14.832 36.630
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 64.28684 9.81363 6.551 9.29e-11 ***
## age 0.09819 0.04846 2.026 0.0430 *
## gender.d 2.97967 1.33576 2.231 0.0259 *
## income -0.19657 0.23103 -0.851 0.3951
## gb -1.07711 1.89179 -0.569 0.5692
## cas -1.00499 4.71609 -0.213 0.8313
## gb:cas 1.06042 0.94943 1.117 0.2643
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 20.52 on 966 degrees of freedom
## (38 observations deleted due to missingness)
## Multiple R-squared: 0.04012, Adjusted R-squared: 0.03416
## F-statistic: 6.729 on 6 and 966 DF, p-value: 5.367e-07
lm.beta(reg)
##
## Call:
## lm(formula = ps ~ age + gender.d + income + gb * cas, data = data)
##
## Standardized Coefficients::
## (Intercept) age gender.d income gb cas
## 0.00000000 0.06548341 0.07139121 -0.02738531 -0.04496610 -0.03936811
## gb:cas
## 0.20340101
confint(lm.beta(reg), level = 0.95)
## 2.5 % 97.5 %
## (Intercept) -19.25849667 19.2584967
## age -0.02962007 0.1605869
## gender.d -2.54993014 2.6927126
## income -0.48075831 0.4259877
## gb -3.75745021 3.6675180
## cas -9.29433136 9.2155951
## gb:cas -1.65978159 2.0665836
res.lm <- residuals(reg)
describe (res.lm)
## vars n mean sd median trimmed mad min max range skew kurtosis
## X1 1 973 0 20.45 2.19 1.58 19.93 -74.91 36.63 111.54 -0.78 0.71
## se
## X1 0.66
qqnorm(res.lm)
qqline(res.lm,col="red")
shapiro.test(res.lm)
##
## Shapiro-Wilk normality test
##
## data: res.lm
## W = 0.95964, p-value = 9.676e-16
par(mfrow = c(2, 2))
plot(reg)
par(mfrow = c(1, 1))
vif(reg)
## age gender.d income gb cas gb:cas
## 1.051202 1.030788 1.042515 6.277042 34.346973 33.376357
reg.1 <- lm(ps ~ age + gender.d + income, data = data)
summary(reg.1)
##
## Call:
## lm(formula = ps ~ age + gender.d + income, data = data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -71.105 -12.102 1.632 15.743 33.804
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 65.71623 2.51531 26.126 <2e-16 ***
## age 0.11143 0.04809 2.317 0.0207 *
## gender.d 3.53806 1.34571 2.629 0.0087 **
## income -0.20863 0.23265 -0.897 0.3701
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 20.76 on 969 degrees of freedom
## (38 observations deleted due to missingness)
## Multiple R-squared: 0.01376, Adjusted R-squared: 0.01071
## F-statistic: 4.506 on 3 and 969 DF, p-value: 0.003788
lm.beta(reg.1)
##
## Call:
## lm(formula = ps ~ age + gender.d + income, data = data)
##
## Standardized Coefficients::
## (Intercept) age gender.d income
## 0.00000000 0.07430959 0.08476990 -0.02906588
confint(lm.beta(reg.1), level = 0.95)
## 2.5 % 97.5 %
## (Intercept) -4.93608120 4.9360812
## age -0.02006667 0.1686858
## gender.d -2.55607165 2.7256114
## income -0.48562384 0.4274921
res.lm <- residuals(reg.1)
describe (res.lm)
## vars n mean sd median trimmed mad min max range skew kurtosis
## X1 1 973 0 20.73 1.63 1.72 20.63 -71.11 33.8 104.91 -0.84 0.79
## se
## X1 0.66
qqnorm(res.lm)
qqline(res.lm,col="red")
shapiro.test(res.lm)
##
## Shapiro-Wilk normality test
##
## data: res.lm
## W = 0.95195, p-value < 2.2e-16
par(mfrow = c(2, 2))
plot(reg.1)
par(mfrow = c(1, 1))
vif(reg.1)
## age gender.d income
## 1.010655 1.021404 1.032159
reg.2.tt <- lm(ps ~ age + gender.d + income +
cas.tt, data = data)
summary(reg.2.tt)
##
## Call:
## lm(formula = ps ~ age + gender.d + income + cas.tt, data = data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -73.394 -12.213 2.189 15.170 37.636
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 61.74366 2.58151 23.918 < 2e-16 ***
## age 0.10699 0.04739 2.258 0.0242 *
## gender.d 2.81488 1.33239 2.113 0.0349 *
## income -0.18037 0.22928 -0.787 0.4317
## cas.tt 8.80180 1.60155 5.496 4.97e-08 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 20.46 on 968 degrees of freedom
## (38 observations deleted due to missingness)
## Multiple R-squared: 0.0436, Adjusted R-squared: 0.03965
## F-statistic: 11.03 on 4 and 968 DF, p-value: 9.41e-09
lm.beta(reg.2.tt)
##
## Call:
## lm(formula = ps ~ age + gender.d + income + cas.tt, data = data)
##
## Standardized Coefficients::
## (Intercept) age gender.d income cas.tt
## 0.00000000 0.07135297 0.06744285 -0.02512762 0.17373339
confint(lm.beta(reg.2.tt), level = 0.95)
## 2.5 % 97.5 %
## (Intercept) -5.06599249 5.0659925
## age -0.02164608 0.1643520
## gender.d -2.54726708 2.6821528
## income -0.47507117 0.4248159
## cas.tt -2.96916784 3.3166346
res.lm <- residuals(reg.2.tt)
describe (res.lm)
## vars n mean sd median trimmed mad min max range skew kurtosis
## X1 1 973 0 20.42 2.19 1.54 20.02 -73.39 37.64 111.03 -0.76 0.66
## se
## X1 0.65
qqnorm(res.lm)
qqline(res.lm,col="red")
shapiro.test(res.lm)
##
## Shapiro-Wilk normality test
##
## data: res.lm
## W = 0.96151, p-value = 2.475e-15
par(mfrow = c(2, 2))
plot(reg.2.tt)
par(mfrow = c(1, 1))
vif(reg.2.tt)
## age gender.d income cas.tt
## 1.010948 1.031464 1.032679 1.011437
reg.3.tt <- lm(ps ~ age + gender.d + income +
cas.tt +
gb.rs + gb.rf + gb.as + gb.af + gb.cs + gb.cf, data = data)
summary(reg.3.tt)
##
## Call:
## lm(formula = ps ~ age + gender.d + income + cas.tt + gb.rs +
## gb.rf + gb.as + gb.af + gb.cs + gb.cf, data = data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -73.933 -11.898 2.063 14.960 42.053
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 57.06592 6.04251 9.444 < 2e-16 ***
## age 0.09438 0.05057 1.866 0.0623 .
## gender.d 2.87064 1.35460 2.119 0.0343 *
## income -0.14102 0.23212 -0.608 0.5436
## cas.tt 9.19588 1.68578 5.455 6.23e-08 ***
## gb.rs 0.50241 0.67585 0.743 0.4574
## gb.rf -0.93604 0.68329 -1.370 0.1710
## gb.as 1.07073 0.77487 1.382 0.1673
## gb.af -0.29961 0.68573 -0.437 0.6623
## gb.cs -0.74256 0.57343 -1.295 0.1956
## gb.cf 1.26407 0.70446 1.794 0.0731 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 20.4 on 962 degrees of freedom
## (38 observations deleted due to missingness)
## Multiple R-squared: 0.05447, Adjusted R-squared: 0.04464
## F-statistic: 5.542 on 10 and 962 DF, p-value: 4.647e-08
lm.beta(reg.3.tt)
##
## Call:
## lm(formula = ps ~ age + gender.d + income + cas.tt + gb.rs +
## gb.rf + gb.as + gb.af + gb.cs + gb.cf, data = data)
##
## Standardized Coefficients::
## (Intercept) age gender.d income cas.tt gb.rs
## 0.00000000 0.06294110 0.06877882 -0.01964553 0.18151184 0.02813903
## gb.rf gb.as gb.af gb.cs gb.cf
## -0.06408675 0.05639827 -0.02047646 -0.04628269 0.08137122
confint(lm.beta(reg.3.tt), level = 0.95)
## 2.5 % 97.5 %
## (Intercept) -11.85802322 11.8580232
## age -0.03628939 0.1621716
## gender.d -2.58953838 2.7270960
## income -0.47515861 0.4358676
## cas.tt -3.12671687 3.4897405
## gb.rs -1.29817872 1.3544568
## gb.rf -1.40498849 1.2768150
## gb.as -1.46423890 1.5770354
## gb.af -1.36618133 1.3252284
## gb.cs -1.17159087 1.0790255
## gb.cf -1.30108380 1.4638262
res.lm <- residuals(reg.3.tt)
describe (res.lm)
## vars n mean sd median trimmed mad min max range skew kurtosis
## X1 1 973 0 20.3 2.06 1.52 19.98 -73.93 42.05 115.99 -0.77 0.72
## se
## X1 0.65
qqnorm(res.lm)
qqline(res.lm,col="red")
shapiro.test(res.lm)
##
## Shapiro-Wilk normality test
##
## data: res.lm
## W = 0.96284, p-value = 4.945e-15
par(mfrow = c(2, 2))
plot(reg.3.tt)
par(mfrow = c(1, 1))
vif(reg.3.tt)
## age gender.d income cas.tt gb.rs gb.rf gb.as gb.af
## 1.156956 1.071706 1.063913 1.126479 1.457823 2.226646 1.694848 2.234567
## gb.cs gb.cf
## 1.299655 2.092227
reg.4.tt <- lm(ps ~ age + gender.d + income +
gb*cas.tt, data = data)
summary(reg.4.tt)
##
## Call:
## lm(formula = ps ~ age + gender.d + income + gb * cas.tt, data = data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -76.067 -11.951 2.027 15.084 37.734
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 61.48413 6.60710 9.306 <2e-16 ***
## age 0.09372 0.04835 1.939 0.0528 .
## gender.d 2.86243 1.33260 2.148 0.0320 *
## income -0.19498 0.23033 -0.846 0.3975
## gb 0.13876 1.22948 0.113 0.9102
## cas.tt 0.93453 9.29293 0.101 0.9199
## gb:cas.tt 1.68508 1.84101 0.915 0.3603
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 20.45 on 966 degrees of freedom
## (38 observations deleted due to missingness)
## Multiple R-squared: 0.04598, Adjusted R-squared: 0.04006
## F-statistic: 7.76 on 6 and 966 DF, p-value: 3.614e-08
lm.beta(reg.4.tt)
##
## Call:
## lm(formula = ps ~ age + gender.d + income + gb * cas.tt, data = data)
##
## Standardized Coefficients::
## (Intercept) age gender.d income gb cas.tt
## 0.000000000 0.062504305 0.068582192 -0.027162968 0.005793021 0.018446148
## gb:cas.tt
## 0.163006842
confint(lm.beta(reg.4.tt), level = 0.95)
## 2.5 % 97.5 %
## (Intercept) -12.96591643 12.9659164
## age -0.03237109 0.1573797
## gender.d -2.54653836 2.6837027
## income -0.47917378 0.4248478
## gb -2.40696471 2.4185507
## cas.tt -18.21820864 18.2551009
## gb:cas.tt -3.44983633 3.7758500
res.lm <- residuals(reg.4.tt)
describe (res.lm)
## vars n mean sd median trimmed mad min max range skew kurtosis
## X1 1 973 0 20.39 2.03 1.53 19.98 -76.07 37.73 113.8 -0.76 0.69
## se
## X1 0.65
qqnorm(res.lm)
qqline(res.lm,col="red")
shapiro.test(res.lm)
##
## Shapiro-Wilk normality test
##
## data: res.lm
## W = 0.96201, p-value = 3.209e-15
par(mfrow = c(2, 2))
plot(reg.4.tt)
par(mfrow = c(1, 1))
vif(reg.4.tt)
## age gender.d income gb cas.tt gb:cas.tt
## 1.052592 1.032218 1.042625 2.667550 34.068157 32.114711
Step 1 vs. step 2
anova(reg.1, reg.2.tt, test="Chisq")
## Analysis of Variance Table
##
## Model 1: ps ~ age + gender.d + income
## Model 2: ps ~ age + gender.d + income + cas.tt
## Res.Df RSS Df Sum of Sq Pr(>Chi)
## 1 969 417750
## 2 968 405110 1 12640 3.889e-08 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Step 2 vs. step 3
anova(reg.2.tt, reg.3.tt, test="Chisq")
## Analysis of Variance Table
##
## Model 1: ps ~ age + gender.d + income + cas.tt
## Model 2: ps ~ age + gender.d + income + cas.tt + gb.rs + gb.rf + gb.as +
## gb.af + gb.cs + gb.cf
## Res.Df RSS Df Sum of Sq Pr(>Chi)
## 1 968 405110
## 2 962 400507 6 4602.2 0.08671 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Step 3 vs. step 4
anova(reg.3.tt, reg.4.tt, test="Chisq")
## Analysis of Variance Table
##
## Model 1: ps ~ age + gender.d + income + cas.tt + gb.rs + gb.rf + gb.as +
## gb.af + gb.cs + gb.cf
## Model 2: ps ~ age + gender.d + income + gb * cas.tt
## Res.Df RSS Df Sum of Sq Pr(>Chi)
## 1 962 400507
## 2 966 404102 -4 -3594.6 0.07092 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Load relevant package
library(lm.beta)
reg.1 <- lm(int ~ age + gender.d + income, data = data)
summary(reg.1)
##
## Call:
## lm(formula = int ~ age + gender.d + income, data = data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.7920 -0.9375 -0.0882 0.8651 3.7638
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.748716 0.149123 25.138 < 2e-16 ***
## age -0.009498 0.002828 -3.358 0.000814 ***
## gender.d 0.270546 0.079453 3.405 0.000687 ***
## income 0.004934 0.013824 0.357 0.721233
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.25 on 1007 degrees of freedom
## Multiple R-squared: 0.02206, Adjusted R-squared: 0.01914
## F-statistic: 7.57 on 3 and 1007 DF, p-value: 5.207e-05
lm.beta(reg.1)
##
## Call:
## lm(formula = int ~ age + gender.d + income, data = data)
##
## Standardized Coefficients::
## (Intercept) age gender.d income
## 0.00000000 -0.10513398 0.10723934 0.01129017
confint(lm.beta(reg.1), level = 0.95)
## 2.5 % 97.5 %
## (Intercept) -0.29262680 0.2926268
## age -0.11068395 -0.0995840
## gender.d -0.04867218 0.2631509
## income -0.01583626 0.0384166
res.lm <- residuals(reg.1)
describe (res.lm)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1011 0 1.25 -0.09 -0.03 1.35 -2.79 3.76 6.56 0.24 -0.23 0.04
qqnorm(res.lm)
qqline(res.lm,col="red")
shapiro.test(res.lm)
##
## Shapiro-Wilk normality test
##
## data: res.lm
## W = 0.99104, p-value = 7.993e-06
par(mfrow = c(2, 2))
plot(reg.1)
par(mfrow = c(1, 1))
vif(reg.1)
## age gender.d income
## 1.009147 1.021311 1.030378
reg <- lm(int ~ age + gender.d + income +
cas, data = data)
summary(reg)
##
## Call:
## lm(formula = int ~ age + gender.d + income + cas, data = data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.4916 -0.7871 -0.0748 0.7650 4.1389
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.677753 0.156533 17.107 < 2e-16 ***
## age -0.009792 0.002589 -3.782 0.000165 ***
## gender.d 0.179505 0.073027 2.458 0.014137 *
## income 0.008201 0.012657 0.648 0.517164
## cas 0.616522 0.044089 13.984 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.144 on 1006 degrees of freedom
## Multiple R-squared: 0.1812, Adjusted R-squared: 0.178
## F-statistic: 55.66 on 4 and 1006 DF, p-value: < 2.2e-16
lm.beta(reg)
##
## Call:
## lm(formula = int ~ age + gender.d + income + cas, data = data)
##
## Standardized Coefficients::
## (Intercept) age gender.d income cas
## 0.00000000 -0.10838184 0.07115244 0.01876733 0.40074287
confint(lm.beta(reg), level = 0.95)
## 2.5 % 97.5 %
## (Intercept) -0.307169096 0.3071691
## age -0.113462861 -0.1033008
## gender.d -0.072151091 0.2144560
## income -0.006070433 0.0436051
## cas 0.314226166 0.4872596
res.lm <- residuals(reg)
describe (res.lm)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1011 0 1.14 -0.07 -0.03 1.15 -3.49 4.14 7.63 0.35 0.29 0.04
qqnorm(res.lm)
qqline(res.lm,col="red")
shapiro.test(res.lm)
##
## Shapiro-Wilk normality test
##
## data: res.lm
## W = 0.99202, p-value = 2.793e-05
par(mfrow = c(2, 2))
plot(reg)
par(mfrow = c(1, 1))
vif(reg)
## age gender.d income cas
## 1.009213 1.029493 1.030729 1.009062
reg <- lm(int ~ age + gender.d + income +
cas +
gb.rs + gb.rf + gb.as + gb.af + gb.cs + gb.cf, data = data)
summary(reg)
##
## Call:
## lm(formula = int ~ age + gender.d + income + cas + gb.rs + gb.rf +
## gb.as + gb.af + gb.cs + gb.cf, data = data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.3457 -0.7970 -0.0541 0.7347 4.2582
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.761011 0.331137 5.318 1.29e-07 ***
## age -0.008610 0.002731 -3.153 0.00166 **
## gender.d 0.165967 0.073811 2.249 0.02476 *
## income 0.002508 0.012716 0.197 0.84372
## cas 0.614030 0.045836 13.396 < 2e-16 ***
## gb.rs 0.056164 0.036838 1.525 0.12767
## gb.rf -0.012319 0.037113 -0.332 0.74001
## gb.as 0.035184 0.042279 0.832 0.40551
## gb.af -0.067541 0.037162 -1.817 0.06945 .
## gb.cs 0.100470 0.031324 3.207 0.00138 **
## gb.cf 0.086120 0.038409 2.242 0.02517 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.131 on 1000 degrees of freedom
## Multiple R-squared: 0.2041, Adjusted R-squared: 0.1962
## F-statistic: 25.65 on 10 and 1000 DF, p-value: < 2.2e-16
lm.beta(reg)
##
## Call:
## lm(formula = int ~ age + gender.d + income + cas + gb.rs + gb.rf +
## gb.as + gb.af + gb.cs + gb.cf, data = data)
##
## Standardized Coefficients::
## (Intercept) age gender.d income cas gb.rs
## 0.000000000 -0.095304544 0.065786395 0.005738017 0.399123029 0.051970992
## gb.rf gb.as gb.af gb.cs gb.cf
## -0.013955991 0.030577488 -0.076725799 0.103233231 0.091566274
confint(lm.beta(reg), level = 0.95)
## 2.5 % 97.5 %
## (Intercept) -0.64980353 0.64980353
## age -0.10066334 -0.08994575
## gender.d -0.07905639 0.21062918
## income -0.01921568 0.03069172
## cas 0.30917702 0.48906904
## gb.rs -0.02031771 0.12425969
## gb.rf -0.08678381 0.05887183
## gb.as -0.05238893 0.11354391
## gb.af -0.14965105 -0.00380055
## gb.cs 0.04176440 0.16470206
## gb.cf 0.01619406 0.16693848
res.lm <- residuals(reg)
describe (res.lm)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1011 0 1.13 -0.05 -0.03 1.13 -3.35 4.26 7.6 0.32 0.26 0.04
qqnorm(res.lm)
qqline(res.lm,col="red")
shapiro.test(res.lm)
##
## Shapiro-Wilk normality test
##
## data: res.lm
## W = 0.99348, p-value = 0.0002094
par(mfrow = c(2, 2))
plot(reg)
par(mfrow = c(1, 1))
vif(reg)
## age gender.d income cas gb.rs gb.rf gb.as gb.af
## 1.147980 1.075531 1.063920 1.115324 1.460001 2.221093 1.696377 2.239276
## gb.cs gb.cf
## 1.301593 2.095501
reg <- lm(int ~ age + gender.d + income +
gb*cas, data = data)
summary(reg)
##
## Call:
## lm(formula = int ~ age + gender.d + income + gb * cas, data = data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.3150 -0.7852 -0.0819 0.7498 4.2270
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.439390 0.534805 4.561 5.71e-06 ***
## age -0.011554 0.002622 -4.407 1.16e-05 ***
## gender.d 0.183133 0.072640 2.521 0.0119 *
## income 0.004467 0.012656 0.353 0.7242
## gb 0.051596 0.103117 0.500 0.6169
## cas 0.384721 0.255863 1.504 0.1330
## gb:cas 0.054551 0.051282 1.064 0.2877
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.138 on 1004 degrees of freedom
## Multiple R-squared: 0.1919, Adjusted R-squared: 0.1871
## F-statistic: 39.75 on 6 and 1004 DF, p-value: < 2.2e-16
lm.beta(reg)
##
## Call:
## lm(formula = int ~ age + gender.d + income + gb * cas, data = data)
##
## Standardized Coefficients::
## (Intercept) age gender.d income gb cas
## 0.00000000 -0.12788899 0.07259057 0.01022111 0.03560605 0.25007076
## gb:cas
## 0.17466055
confint(lm.beta(reg), level = 0.95)
## 2.5 % 97.5 %
## (Intercept) -1.04946314 1.04946314
## age -0.13303406 -0.12274392
## gender.d -0.06995400 0.21513514
## income -0.01461335 0.03505556
## gb -0.16674287 0.23795496
## cas -0.25201642 0.75215794
## gb:cas 0.07402806 0.27529305
res.lm <- residuals(reg)
describe (res.lm)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1011 0 1.13 -0.08 -0.03 1.12 -3.31 4.23 7.54 0.34 0.25 0.04
qqnorm(res.lm)
qqline(res.lm,col="red")
shapiro.test(res.lm)
##
## Shapiro-Wilk normality test
##
## data: res.lm
## W = 0.99243, p-value = 4.863e-05
par(mfrow = c(2, 2))
plot(reg)
par(mfrow = c(1, 1))
vif(reg)
## age gender.d income gb cas gb:cas
## 1.046473 1.030090 1.042061 6.291704 34.366893 33.497165
reg.1 <- lm(int ~ age + gender.d + income, data = data)
summary(reg.1)
##
## Call:
## lm(formula = int ~ age + gender.d + income, data = data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.7920 -0.9375 -0.0882 0.8651 3.7638
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.748716 0.149123 25.138 < 2e-16 ***
## age -0.009498 0.002828 -3.358 0.000814 ***
## gender.d 0.270546 0.079453 3.405 0.000687 ***
## income 0.004934 0.013824 0.357 0.721233
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.25 on 1007 degrees of freedom
## Multiple R-squared: 0.02206, Adjusted R-squared: 0.01914
## F-statistic: 7.57 on 3 and 1007 DF, p-value: 5.207e-05
lm.beta(reg.1)
##
## Call:
## lm(formula = int ~ age + gender.d + income, data = data)
##
## Standardized Coefficients::
## (Intercept) age gender.d income
## 0.00000000 -0.10513398 0.10723934 0.01129017
confint(lm.beta(reg.1), level = 0.95)
## 2.5 % 97.5 %
## (Intercept) -0.29262680 0.2926268
## age -0.11068395 -0.0995840
## gender.d -0.04867218 0.2631509
## income -0.01583626 0.0384166
res.lm <- residuals(reg.1)
describe (res.lm)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1011 0 1.25 -0.09 -0.03 1.35 -2.79 3.76 6.56 0.24 -0.23 0.04
qqnorm(res.lm)
qqline(res.lm,col="red")
shapiro.test(res.lm)
##
## Shapiro-Wilk normality test
##
## data: res.lm
## W = 0.99104, p-value = 7.993e-06
par(mfrow = c(2, 2))
plot(reg.1)
par(mfrow = c(1, 1))
vif(reg.1)
## age gender.d income
## 1.009147 1.021311 1.030378
reg.2.tt <- lm(int ~ age + gender.d + income +
cas.tt, data = data)
summary(reg.2.tt)
##
## Call:
## lm(formula = int ~ age + gender.d + income + cas.tt, data = data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.4030 -0.7644 -0.0795 0.7010 4.2330
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.167039 0.140718 22.506 < 2e-16 ***
## age -0.010184 0.002564 -3.972 7.62e-05 ***
## gender.d 0.166561 0.072346 2.302 0.0215 *
## income 0.008864 0.012531 0.707 0.4795
## cas.tt 1.285854 0.086678 14.835 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.132 on 1006 degrees of freedom
## Multiple R-squared: 0.1976, Adjusted R-squared: 0.1944
## F-statistic: 61.93 on 4 and 1006 DF, p-value: < 2.2e-16
lm.beta(reg.2.tt)
##
## Call:
## lm(formula = int ~ age + gender.d + income + cas.tt, data = data)
##
## Standardized Coefficients::
## (Intercept) age gender.d income cas.tt
## 0.00000000 -0.11272059 0.06602163 0.02028360 0.42126934
confint(lm.beta(reg.2.tt), level = 0.95)
## 2.5 % 97.5 %
## (Intercept) -0.276134937 0.27613494
## age -0.117751171 -0.10769000
## gender.d -0.075944047 0.20798730
## income -0.004305733 0.04487293
## cas.tt 0.251179207 0.59135947
res.lm <- residuals(reg.2.tt)
describe (res.lm)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1011 0 1.13 -0.08 -0.04 1.1 -3.4 4.23 7.64 0.37 0.39 0.04
qqnorm(res.lm)
qqline(res.lm,col="red")
shapiro.test(res.lm)
##
## Shapiro-Wilk normality test
##
## data: res.lm
## W = 0.9916, p-value = 1.619e-05
par(mfrow = c(2, 2))
plot(reg.2.tt)
par(mfrow = c(1, 1))
vif(reg.2.tt)
## age gender.d income cas.tt
## 1.009475 1.030989 1.030839 1.011009
reg.3.tt <- lm(int ~ age + gender.d + income +
cas.tt +
gb.rs + gb.rf + gb.as + gb.af + gb.cs + gb.cf, data = data)
summary(reg.3.tt)
##
## Call:
## lm(formula = int ~ age + gender.d + income + cas.tt + gb.rs +
## gb.rf + gb.as + gb.af + gb.cs + gb.cf, data = data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.2664 -0.7575 -0.0580 0.7244 4.4365
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.224158 0.325457 6.834 1.43e-11 ***
## age -0.009410 0.002706 -3.478 0.000527 ***
## gender.d 0.155754 0.073038 2.133 0.033208 *
## income 0.003112 0.012578 0.247 0.804653
## cas.tt 1.295601 0.090359 14.338 < 2e-16 ***
## gb.rs 0.052733 0.036441 1.447 0.148189
## gb.rf -0.010864 0.036686 -0.296 0.767194
## gb.as 0.049210 0.041865 1.175 0.240097
## gb.af -0.059738 0.036765 -1.625 0.104509
## gb.cs 0.099508 0.030977 3.212 0.001359 **
## gb.cf 0.070274 0.038124 1.843 0.065578 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.119 on 1000 degrees of freedom
## Multiple R-squared: 0.2214, Adjusted R-squared: 0.2136
## F-statistic: 28.43 on 10 and 1000 DF, p-value: < 2.2e-16
lm.beta(reg.3.tt)
##
## Call:
## lm(formula = int ~ age + gender.d + income + cas.tt + gb.rs +
## gb.rf + gb.as + gb.af + gb.cs + gb.cf, data = data)
##
## Standardized Coefficients::
## (Intercept) age gender.d income cas.tt gb.rs
## 0.000000000 -0.104157713 0.061737867 0.007120671 0.424462599 0.048796829
## gb.rf gb.as gb.af gb.cs gb.cf
## -0.012307408 0.042766864 -0.067862232 0.102244613 0.074718129
confint(lm.beta(reg.3.tt), level = 0.95)
## 2.5 % 97.5 %
## (Intercept) -6.386575e-01 0.638657510
## age -1.094669e-01 -0.098848517
## gender.d -8.158659e-02 0.205062329
## income -1.756158e-02 0.031802920
## cas.tt 2.471485e-01 0.601776708
## gb.rs -2.271349e-02 0.120307148
## gb.rf -8.429811e-02 0.059683291
## gb.as -3.938589e-02 0.124919623
## gb.af -1.400085e-01 0.004284018
## gb.cs 4.145696e-02 0.163032268
## gb.cf -9.329802e-05 0.149529557
res.lm <- residuals(reg.3.tt)
describe (res.lm)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1011 0 1.11 -0.06 -0.03 1.08 -3.27 4.44 7.7 0.34 0.37 0.04
qqnorm(res.lm)
qqline(res.lm,col="red")
shapiro.test(res.lm)
##
## Shapiro-Wilk normality test
##
## data: res.lm
## W = 0.99275, p-value = 7.469e-05
par(mfrow = c(2, 2))
plot(reg.3.tt)
par(mfrow = c(1, 1))
vif(reg.3.tt)
## age gender.d income cas.tt gb.rs gb.rf gb.as gb.af
## 1.151795 1.076434 1.063962 1.125493 1.460385 2.218413 1.700120 2.240251
## gb.cs gb.cf
## 1.301109 2.110177
reg.4.tt <- lm(int ~ age + gender.d + income +
gb*cas.tt, data = data)
summary(reg.4.tt)
##
## Call:
## lm(formula = int ~ age + gender.d + income + gb * cas.tt, data = data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.2337 -0.7706 -0.0771 0.7127 4.4167
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.556856 0.358038 7.141 1.77e-12 ***
## age -0.012132 0.002595 -4.676 3.32e-06 ***
## gender.d 0.169115 0.071895 2.352 0.0189 *
## income 0.004518 0.012515 0.361 0.7182
## gb 0.133775 0.066833 2.002 0.0456 *
## cas.tt 1.050482 0.501235 2.096 0.0364 *
## gb:cas.tt 0.063934 0.099022 0.646 0.5187
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.125 on 1004 degrees of freedom
## Multiple R-squared: 0.2098, Adjusted R-squared: 0.2051
## F-statistic: 44.43 on 6 and 1004 DF, p-value: < 2.2e-16
lm.beta(reg.4.tt)
##
## Call:
## lm(formula = int ~ age + gender.d + income + gb * cas.tt, data = data)
##
## Standardized Coefficients::
## (Intercept) age gender.d income gb cas.tt
## 0.00000000 -0.13428859 0.06703425 0.01033816 0.09231731 0.34415721
## gb:cas.tt
## 0.10297161
confint(lm.beta(reg.4.tt), level = 0.95)
## 2.5 % 97.5 %
## (Intercept) -0.70258868 0.70258868
## age -0.13937990 -0.12919727
## gender.d -0.07404645 0.20811496
## income -0.01422007 0.03489639
## gb -0.03883090 0.22346552
## cas.tt -0.63943151 1.32774592
## gb:cas.tt -0.09134314 0.29728636
res.lm <- residuals(reg.4.tt)
describe (res.lm)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1011 0 1.12 -0.08 -0.04 1.1 -3.23 4.42 7.65 0.36 0.38 0.04
qqnorm(res.lm)
qqline(res.lm,col="red")
shapiro.test(res.lm)
##
## Shapiro-Wilk normality test
##
## data: res.lm
## W = 0.99186, p-value = 2.271e-05
par(mfrow = c(2, 2))
plot(reg.4.tt)
par(mfrow = c(1, 1))
vif(reg.4.tt)
## age gender.d income gb cas.tt gb:cas.tt
## 1.047903 1.031871 1.042063 2.702760 34.263093 32.318281
Step 1 vs. step 2
anova(reg.1, reg.2.tt, test="Chisq")
## Analysis of Variance Table
##
## Model 1: int ~ age + gender.d + income
## Model 2: int ~ age + gender.d + income + cas.tt
## Res.Df RSS Df Sum of Sq Pr(>Chi)
## 1 1007 1572.4
## 2 1006 1290.1 1 282.23 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Step 2 vs. step 3
anova(reg.2.tt, reg.3.tt, test="Chisq")
## Analysis of Variance Table
##
## Model 1: int ~ age + gender.d + income + cas.tt
## Model 2: int ~ age + gender.d + income + cas.tt + gb.rs + gb.rf + gb.as +
## gb.af + gb.cs + gb.cf
## Res.Df RSS Df Sum of Sq Pr(>Chi)
## 1 1006 1290.1
## 2 1000 1251.9 6 38.229 3.107e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Step 3 vs. step 4
anova(reg.3.tt, reg.4.tt, test="Chisq")
## Analysis of Variance Table
##
## Model 1: int ~ age + gender.d + income + cas.tt + gb.rs + gb.rf + gb.as +
## gb.af + gb.cs + gb.cf
## Model 2: int ~ age + gender.d + income + gb * cas.tt
## Res.Df RSS Df Sum of Sq Pr(>Chi)
## 1 1000 1251.9
## 2 1004 1270.5 -4 -18.569 0.005061 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
reg.1 <- lm(cas ~
phq +
sp.1 + sp.2 + sp.3 + sp.4 + sp.5 + sp.6 +
sj + sdo + rwa + nd + pol.orient +
gb.rs + gb.rf + gb.cs + gb.cf + gb.as + gb.af +
asimp.all + aspro.all +
ps + int, data = data)
summary(reg.1)
##
## Call:
## lm(formula = cas ~ phq + sp.1 + sp.2 + sp.3 + sp.4 + sp.5 + sp.6 +
## sj + sdo + rwa + nd + pol.orient + gb.rs + gb.rf + gb.cs +
## gb.cf + gb.as + gb.af + asimp.all + aspro.all + ps + int,
## data = data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.6143 -0.4167 -0.0790 0.3627 2.8190
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.246419 0.298516 -0.825 0.409306
## phq 0.113137 0.040603 2.786 0.005435 **
## sp.1 0.007587 0.024511 0.310 0.756995
## sp.2 0.141952 0.022188 6.398 2.47e-10 ***
## sp.3 0.056826 0.027350 2.078 0.038002 *
## sp.4 -0.069734 0.031053 -2.246 0.024955 *
## sp.5 -0.134060 0.022814 -5.876 5.80e-09 ***
## sp.6 0.053397 0.028871 1.849 0.064697 .
## sj 0.004379 0.021938 0.200 0.841821
## sdo -0.001412 0.025959 -0.054 0.956636
## rwa 0.074057 0.027537 2.689 0.007285 **
## nd 0.077434 0.022071 3.508 0.000472 ***
## pol.orient 0.002751 0.001387 1.983 0.047658 *
## gb.rs -0.005915 0.022245 -0.266 0.790360
## gb.rf 0.023379 0.022462 1.041 0.298213
## gb.cs 0.022049 0.019353 1.139 0.254871
## gb.cf 0.026948 0.023803 1.132 0.257872
## gb.as -0.006156 0.025210 -0.244 0.807126
## gb.af 0.022095 0.023114 0.956 0.339363
## asimp.all 0.023322 0.026248 0.889 0.374481
## aspro.all -0.008069 0.028802 -0.280 0.779415
## ps 0.001660 0.001384 1.200 0.230584
## int 0.269565 0.021732 12.404 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.6636 on 950 degrees of freedom
## (38 observations deleted due to missingness)
## Multiple R-squared: 0.3563, Adjusted R-squared: 0.3414
## F-statistic: 23.9 on 22 and 950 DF, p-value: < 2.2e-16
lm.beta(reg.1)
##
## Call:
## lm(formula = cas ~ phq + sp.1 + sp.2 + sp.3 + sp.4 + sp.5 + sp.6 +
## sj + sdo + rwa + nd + pol.orient + gb.rs + gb.rf + gb.cs +
## gb.cf + gb.as + gb.af + asimp.all + aspro.all + ps + int,
## data = data)
##
## Standardized Coefficients::
## (Intercept) phq sp.1 sp.2 sp.3 sp.4
## 0.000000000 0.099219407 0.013593404 0.205896124 0.083952165 -0.135548819
## sp.5 sp.6 sj sdo rwa nd
## -0.228447040 0.100573855 0.005878890 -0.001781934 0.093822559 0.107887798
## pol.orient gb.rs gb.rf gb.cs gb.cf gb.as
## 0.063495864 -0.008457515 0.040862705 0.035082756 0.044283793 -0.008278084
## gb.af asimp.all aspro.all ps int
## 0.038547880 0.031159202 -0.009457283 0.042372491 0.413139922
confint(lm.beta(reg.1), level = 0.95)
## 2.5 % 97.5 %
## (Intercept) -0.585827796 0.58582780
## phq 0.019537748 0.17890107
## sp.1 -0.034509002 0.06169581
## sp.2 0.162353933 0.24943831
## sp.3 0.030279089 0.13762524
## sp.4 -0.196489094 -0.07460854
## sp.5 -0.273218594 -0.18367549
## sp.6 0.043915521 0.15723219
## sj -0.037173483 0.04893126
## sdo -0.052725428 0.04916156
## rwa 0.039781509 0.14786361
## nd 0.064574498 0.15120110
## pol.orient 0.060773703 0.06621802
## gb.rs -0.052111856 0.03519683
## gb.rf -0.003218219 0.08494363
## gb.cs -0.002897378 0.07306289
## gb.cf -0.002429333 0.09099692
## gb.as -0.057751996 0.04119583
## gb.af -0.006812470 0.08390823
## asimp.all -0.020351789 0.08267019
## aspro.all -0.065980782 0.04706622
## ps 0.039657167 0.04508782
## int 0.370492601 0.45578724
res.lm <- residuals(reg.1)
describe (res.lm)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 973 0 0.66 -0.08 -0.05 0.55 -1.61 2.82 4.43 0.8 1.01 0.02
qqnorm(res.lm)
qqline(res.lm,col="red")
shapiro.test(res.lm)
##
## Shapiro-Wilk normality test
##
## data: res.lm
## W = 0.96449, p-value = 1.185e-14
par(mfrow = c(2, 2))
plot(reg.1)
par(mfrow = c(1, 1))
vif(reg.1)
## phq sp.1 sp.2 sp.3 sp.4 sp.5 sp.6
## 1.871179 2.846450 1.528439 2.409379 5.376792 2.230440 4.363977
## sj sdo rwa nd pol.orient gb.rs gb.rf
## 1.279981 1.584060 1.796186 1.395542 1.513136 1.492823 2.274586
## gb.cs gb.cf gb.as gb.af asimp.all aspro.all ps
## 1.399400 2.258023 1.695805 2.399883 1.814883 1.681662 1.841178
## int
## 1.637072
reg.2tt <- lm(cas.tt ~
phq.tt +
sp.1 + sp.2 + sp.3.tt + sp.4.tt + sp.5.t + sp.6.tt +
sj + sdo + rwa + nd + pol.orient +
gb.rs + gb.rf + gb.cs + gb.cf + gb.as + gb.af +
asimp.all + aspro.all +
ps + int, data = data)
summary(reg.2tt)
##
## Call:
## lm(formula = cas.tt ~ phq.tt + sp.1 + sp.2 + sp.3.tt + sp.4.tt +
## sp.5.t + sp.6.tt + sj + sdo + rwa + nd + pol.orient + gb.rs +
## gb.rf + gb.cs + gb.cf + gb.as + gb.af + asimp.all + aspro.all +
## ps + int, data = data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.00458 -0.21457 -0.01818 0.20985 0.94408
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.1514888 0.1567958 -0.966 0.334213
## phq.tt 0.1085496 0.0368769 2.944 0.003324 **
## sp.1 0.0011477 0.0116619 0.098 0.921622
## sp.2 0.0795000 0.0110279 7.209 1.15e-12 ***
## sp.3.tt 0.0646777 0.0315520 2.050 0.040650 *
## sp.4.tt -0.0568865 0.0377945 -1.505 0.132618
## sp.5.t -0.2892400 0.0427067 -6.773 2.21e-11 ***
## sp.6.tt 0.0402991 0.0339630 1.187 0.235698
## sj 0.0020907 0.0107647 0.194 0.846045
## sdo 0.0013065 0.0127639 0.102 0.918494
## rwa 0.0364852 0.0135365 2.695 0.007156 **
## nd 0.0424208 0.0108791 3.899 0.000103 ***
## pol.orient 0.0010907 0.0006827 1.598 0.110480
## gb.rs -0.0035403 0.0109360 -0.324 0.746217
## gb.rf 0.0082135 0.0110525 0.743 0.457585
## gb.cs 0.0096166 0.0094898 1.013 0.311145
## gb.cf 0.0159797 0.0117079 1.365 0.172620
## gb.as -0.0120831 0.0124050 -0.974 0.330279
## gb.af 0.0057007 0.0113782 0.501 0.616470
## asimp.all 0.0074760 0.0129059 0.579 0.562547
## aspro.all -0.0034820 0.0141841 -0.245 0.806132
## ps 0.0010427 0.0006673 1.563 0.118498
## int 0.1397825 0.0106714 13.099 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.3266 on 950 degrees of freedom
## (38 observations deleted due to missingness)
## Multiple R-squared: 0.3861, Adjusted R-squared: 0.3719
## F-statistic: 27.16 on 22 and 950 DF, p-value: < 2.2e-16
lm.beta(reg.2tt)
##
## Call:
## lm(formula = cas.tt ~ phq.tt + sp.1 + sp.2 + sp.3.tt + sp.4.tt +
## sp.5.t + sp.6.tt + sj + sdo + rwa + nd + pol.orient + gb.rs +
## gb.rf + gb.cs + gb.cf + gb.as + gb.af + asimp.all + aspro.all +
## ps + int, data = data)
##
## Standardized Coefficients::
## (Intercept) phq.tt sp.1 sp.2 sp.3.tt sp.4.tt
## 0.000000000 0.101684852 0.004081202 0.228845797 0.081168269 -0.083254370
## sp.5.t sp.6.tt sj sdo rwa nd
## -0.250536043 0.058379117 0.005570086 0.003272363 0.091734117 0.117298219
## pol.orient gb.rs gb.rf gb.cs gb.cf gb.as
## 0.049967520 -0.010045555 0.028489809 0.030366799 0.052114296 -0.032244161
## gb.af asimp.all aspro.all ps int
## 0.019738409 0.019822292 -0.008099054 0.052826050 0.425164661
confint(lm.beta(reg.2tt), level = 0.95)
## 2.5 % 97.5 %
## (Intercept) -0.307706143 0.307706143
## phq.tt 0.029315225 0.174054479
## sp.1 -0.018804859 0.026967264
## sp.2 0.207203952 0.250487641
## sp.3.tt 0.019248692 0.143087846
## sp.4.tt -0.157424799 -0.009083940
## sp.5.t -0.334346385 -0.166725701
## sp.6.tt -0.008272022 0.125030256
## sj -0.015555173 0.026695346
## sdo -0.021776237 0.028320962
## rwa 0.065169203 0.118299031
## nd 0.095948437 0.138648000
## pol.orient 0.048627680 0.051307360
## gb.rs -0.031507019 0.011415910
## gb.rf 0.006799666 0.050179953
## gb.cs 0.011743367 0.048990230
## gb.cf 0.029137864 0.075090729
## gb.as -0.056588445 -0.007899876
## gb.af -0.002590829 0.042067648
## asimp.all -0.005505148 0.045149731
## aspro.all -0.035934923 0.019736815
## ps 0.051516459 0.054135642
## int 0.404222361 0.446106961
res.lm <- residuals(reg.2tt)
describe (res.lm)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 973 0 0.32 -0.02 -0.01 0.31 -1 0.94 1.95 0.17 -0.19 0.01
qqnorm(res.lm)
qqline(res.lm,col="red")
shapiro.test(res.lm)
##
## Shapiro-Wilk normality test
##
## data: res.lm
## W = 0.99635, p-value = 0.02263
par(mfrow = c(2, 2))
plot(reg.2tt)
par(mfrow = c(1, 1))
vif(reg.2tt)
## phq.tt sp.1 sp.2 sp.3.tt sp.4.tt sp.5.t sp.6.tt
## 1.846777 2.661230 1.559504 2.426414 4.734825 2.117703 3.746156
## sj sdo rwa nd pol.orient gb.rs gb.rf
## 1.272869 1.581727 1.792631 1.400417 1.514003 1.490193 2.274553
## gb.cs gb.cf gb.as gb.af asimp.all aspro.all ps
## 1.389692 2.256243 1.695851 2.401903 1.812181 1.684459 1.768864
## int
## 1.630435
reg.1 <- lm(cas ~ age + gender.d + income +
phq +
sp.1 + sp.2 + sp.3 + sp.4 + sp.5 + sp.6 +
sj + sdo + rwa + nd + pol.orient +
gb.rs + gb.rf + gb.cs + gb.cf + gb.as + gb.af +
asimp.all + aspro.all +
ps + int, data = data)
summary(reg.1)
##
## Call:
## lm(formula = cas ~ age + gender.d + income + phq + sp.1 + sp.2 +
## sp.3 + sp.4 + sp.5 + sp.6 + sj + sdo + rwa + nd + pol.orient +
## gb.rs + gb.rf + gb.cs + gb.cf + gb.as + gb.af + asimp.all +
## aspro.all + ps + int, data = data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.75974 -0.42343 -0.07685 0.33687 2.85577
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.3830943 0.3016382 -1.270 0.204380
## age 0.0075653 0.0017647 4.287 2.00e-05 ***
## gender.d 0.0595672 0.0452385 1.317 0.188245
## income -0.0038873 0.0076114 -0.511 0.609666
## phq 0.1069877 0.0403119 2.654 0.008088 **
## sp.1 0.0107310 0.0245949 0.436 0.662711
## sp.2 0.1313573 0.0221405 5.933 4.17e-09 ***
## sp.3 0.0563581 0.0271074 2.079 0.037880 *
## sp.4 -0.0653914 0.0307991 -2.123 0.033999 *
## sp.5 -0.1394717 0.0226605 -6.155 1.11e-09 ***
## sp.6 0.0516286 0.0286612 1.801 0.071967 .
## sj 0.0025020 0.0217482 0.115 0.908434
## sdo -0.0110514 0.0259265 -0.426 0.670017
## rwa 0.0499384 0.0279071 1.789 0.073861 .
## nd 0.0752849 0.0219980 3.422 0.000647 ***
## pol.orient 0.0031837 0.0013809 2.306 0.021348 *
## gb.rs -0.0042958 0.0222975 -0.193 0.847269
## gb.rf 0.0204468 0.0223891 0.913 0.361344
## gb.cs 0.0326628 0.0193907 1.684 0.092423 .
## gb.cf 0.0449708 0.0239626 1.877 0.060866 .
## gb.as -0.0126843 0.0252242 -0.503 0.615178
## gb.af 0.0223092 0.0229411 0.972 0.331073
## asimp.all 0.0491968 0.0266346 1.847 0.065044 .
## aspro.all 0.0039539 0.0286833 0.138 0.890391
## ps 0.0008671 0.0013862 0.626 0.531771
## int 0.2731016 0.0215490 12.674 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.6576 on 947 degrees of freedom
## (38 observations deleted due to missingness)
## Multiple R-squared: 0.3699, Adjusted R-squared: 0.3533
## F-statistic: 22.24 on 25 and 947 DF, p-value: < 2.2e-16
lm.beta(reg.1)
##
## Call:
## lm(formula = cas ~ age + gender.d + income + phq + sp.1 + sp.2 +
## sp.3 + sp.4 + sp.5 + sp.6 + sj + sdo + rwa + nd + pol.orient +
## gb.rs + gb.rf + gb.cs + gb.cf + gb.as + gb.af + asimp.all +
## aspro.all + ps + int, data = data)
##
## Standardized Coefficients::
## (Intercept) age gender.d income phq sp.1
## 0.000000000 0.128795465 0.036433573 -0.013825022 0.093826391 0.019227245
## sp.2 sp.3 sp.4 sp.5 sp.6 sj
## 0.190528526 0.083261518 -0.127107019 -0.237668281 0.097243377 0.003358816
## sdo rwa nd pol.orient gb.rs gb.rf
## -0.013947813 0.063267237 0.104893825 0.073494525 -0.006142010 0.035736957
## gb.cs gb.cf gb.as gb.af asimp.all aspro.all
## 0.051970791 0.073900616 -0.017055743 0.038921902 0.065728373 0.004634027
## ps int
## 0.022136051 0.418560666
confint(lm.beta(reg.1), level = 0.95)
## 2.5 % 97.5 %
## (Intercept) -0.591956595 0.591956595
## age 0.125332242 0.132258687
## gender.d -0.052345636 0.125212781
## income -0.028762250 0.001112206
## phq 0.014715331 0.172937450
## sp.1 -0.029039483 0.067493973
## sp.2 0.147078480 0.233978572
## sp.3 0.030064057 0.136458980
## sp.4 -0.187549388 -0.066664650
## sp.5 -0.282138902 -0.193197659
## sp.6 0.040996490 0.153490264
## sj -0.039321352 0.046038984
## sdo -0.064827895 0.036932270
## rwa 0.008500400 0.118034074
## nd 0.061723305 0.148064345
## pol.orient 0.070784611 0.076204438
## gb.rs -0.049900279 0.037616259
## gb.rf -0.008200953 0.079674868
## gb.cs 0.013917083 0.090024499
## gb.cf 0.026874631 0.120926602
## gb.as -0.066557525 0.032446040
## gb.af -0.006099387 0.083943192
## asimp.all 0.013458732 0.117998014
## aspro.all -0.051656166 0.060924220
## ps 0.019415642 0.024856460
## int 0.376271332 0.460850000
res.lm <- residuals(reg.1)
describe (res.lm)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 973 0 0.65 -0.08 -0.05 0.56 -1.76 2.86 4.62 0.82 1.16 0.02
qqnorm(res.lm)
qqline(res.lm,col="red")
shapiro.test(res.lm)
##
## Shapiro-Wilk normality test
##
## data: res.lm
## W = 0.96363, p-value = 7.496e-15
par(mfrow = c(2, 2))
plot(reg.1)
par(mfrow = c(1, 1))
vif(reg.1)
## age gender.d income phq sp.1 sp.2 sp.3
## 1.356622 1.150684 1.101326 1.878455 2.918727 1.550015 2.410470
## sp.4 sp.5 sp.6 sj sdo rwa nd
## 5.386729 2.241096 4.380055 1.281119 1.609228 1.878741 1.411896
## pol.orient gb.rs gb.rf gb.cs gb.cf gb.as gb.af
## 1.527175 1.527571 2.301482 1.430706 2.330526 1.728991 2.407692
## asimp.all aspro.all ps int
## 1.903161 1.698533 1.882125 1.639358
reg.2tt <- lm(cas.tt ~ age + gender.d + income +
phq.tt +
sp.1 + sp.2 + sp.3.tt + sp.4.tt + sp.5.t + sp.6.tt +
sj + sdo + rwa + nd + pol.orient +
gb.rs + gb.rf + gb.cs + gb.cf + gb.as + gb.af +
asimp.all + aspro.all +
ps + int, data = data)
summary(reg.2tt)
##
## Call:
## lm(formula = cas.tt ~ age + gender.d + income + phq.tt + sp.1 +
## sp.2 + sp.3.tt + sp.4.tt + sp.5.t + sp.6.tt + sj + sdo +
## rwa + nd + pol.orient + gb.rs + gb.rf + gb.cs + gb.cf + gb.as +
## gb.af + asimp.all + aspro.all + ps + int, data = data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.08606 -0.22196 -0.01366 0.20086 0.93149
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.2160093 0.1575803 -1.371 0.170766
## age 0.0043564 0.0008649 5.037 5.66e-07 ***
## gender.d 0.0284948 0.0221942 1.284 0.199497
## income -0.0028101 0.0037318 -0.753 0.451635
## phq.tt 0.1042517 0.0364818 2.858 0.004362 **
## sp.1 0.0027154 0.0116665 0.233 0.816002
## sp.2 0.0736569 0.0109588 6.721 3.11e-11 ***
## sp.3.tt 0.0637844 0.0311588 2.047 0.040926 *
## sp.4.tt -0.0537941 0.0373289 -1.441 0.149891
## sp.5.t -0.3012030 0.0422690 -7.126 2.05e-12 ***
## sp.6.tt 0.0403285 0.0335977 1.200 0.230309
## sj 0.0011138 0.0106330 0.105 0.916594
## sdo -0.0037569 0.0127000 -0.296 0.767435
## rwa 0.0223559 0.0136762 1.635 0.102453
## nd 0.0410455 0.0108058 3.798 0.000155 ***
## pol.orient 0.0013335 0.0006771 1.969 0.049207 *
## gb.rs -0.0021743 0.0109238 -0.199 0.842269
## gb.rf 0.0067004 0.0109768 0.610 0.541734
## gb.cs 0.0159616 0.0094784 1.684 0.092512 .
## gb.cf 0.0260870 0.0117355 2.223 0.026457 *
## gb.as -0.0160965 0.0123629 -1.302 0.193233
## gb.af 0.0055455 0.0112524 0.493 0.622245
## asimp.all 0.0223421 0.0130542 1.711 0.087318 .
## aspro.all 0.0033371 0.0140724 0.237 0.812604
## ps 0.0005699 0.0006668 0.855 0.392940
## int 0.1417732 0.0105433 13.447 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.3224 on 947 degrees of freedom
## (38 observations deleted due to missingness)
## Multiple R-squared: 0.4035, Adjusted R-squared: 0.3877
## F-statistic: 25.62 on 25 and 947 DF, p-value: < 2.2e-16
lm.beta(reg.2tt)
##
## Call:
## lm(formula = cas.tt ~ age + gender.d + income + phq.tt + sp.1 +
## sp.2 + sp.3.tt + sp.4.tt + sp.5.t + sp.6.tt + sj + sdo +
## rwa + nd + pol.orient + gb.rs + gb.rf + gb.cs + gb.cf + gb.as +
## gb.af + asimp.all + aspro.all + ps + int, data = data)
##
## Standardized Coefficients::
## (Intercept) age gender.d income phq.tt sp.1
## 0.000000000 0.147190320 0.034588406 -0.019833566 0.097658699 0.009655732
## sp.2 sp.3.tt sp.4.tt sp.5.t sp.6.tt sj
## 0.212025978 0.080047205 -0.078728699 -0.260898188 0.058421705 0.002967483
## sdo rwa nd pol.orient gb.rs gb.rf
## -0.009409881 0.056209148 0.113495260 0.061091375 -0.006169736 0.023241409
## gb.cs gb.cf gb.as gb.af asimp.all aspro.all
## 0.050402641 0.085076743 -0.042954213 0.019200984 0.059239404 0.007761851
## ps int
## 0.028872189 0.431219448
confint(lm.beta(reg.2tt), level = 0.95)
## 2.5 % 97.5 %
## (Intercept) -0.309246868 0.309246868
## age 0.145493018 0.148887622
## gender.d -0.008967131 0.078143942
## income -0.027157119 -0.012510014
## phq.tt 0.026064097 0.169253302
## sp.1 -0.013239432 0.032550895
## sp.2 0.190519625 0.233532331
## sp.3.tt 0.018899008 0.141195402
## sp.4.tt -0.151985645 -0.005471752
## sp.5.t -0.343849963 -0.177946412
## sp.6.tt -0.007512754 0.124356163
## sj -0.017899565 0.023834530
## sdo -0.034333238 0.015513477
## rwa 0.029369924 0.083048373
## nd 0.092289119 0.134701401
## pol.orient 0.059762517 0.062420233
## gb.rs -0.027607416 0.015267943
## gb.rf 0.001699765 0.044783052
## gb.cs 0.031801528 0.069003754
## gb.cf 0.062046141 0.108107346
## gb.as -0.067216086 -0.018692340
## gb.af -0.002881440 0.041283408
## asimp.all 0.033620915 0.084857893
## aspro.all -0.019854832 0.035378534
## ps 0.027563649 0.030180729
## int 0.410528455 0.451910441
res.lm <- residuals(reg.2tt)
describe (res.lm)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 973 0 0.32 -0.01 -0.01 0.31 -1.09 0.93 2.02 0.16 -0.1 0.01
qqnorm(res.lm)
qqline(res.lm,col="red")
shapiro.test(res.lm)
##
## Shapiro-Wilk normality test
##
## data: res.lm
## W = 0.99666, p-value = 0.03747
par(mfrow = c(2, 2))
plot(reg.2tt)
par(mfrow = c(1, 1))
vif(reg.2tt)
## age gender.d income phq.tt sp.1 sp.2 sp.3.tt
## 1.355608 1.152228 1.101380 1.854120 2.732142 1.579818 2.427458
## sp.4.tt sp.5.t sp.6.tt sj sdo rwa nd
## 4.738223 2.128123 3.760721 1.274023 1.606398 1.877109 1.417325
## pol.orient gb.rs gb.rf gb.cs gb.cf gb.as gb.af
## 1.527754 1.525298 2.301465 1.422173 2.325449 1.727897 2.409776
## asimp.all aspro.all ps int
## 1.901961 1.700864 1.811640 1.632649
reg.1 <- lm(cas ~ gender.d + income +
phq +
sp.1 + sp.2 + sp.3 + sp.4 + sp.5 + sp.6 +
sj + sdo + rwa + nd + pol.orient +
gb.rs + gb.rf + gb.cs + gb.cf + gb.as + gb.af +
asimp.all + aspro.all +
ps + int, data = data)
summary(reg.1)
##
## Call:
## lm(formula = cas ~ gender.d + income + phq + sp.1 + sp.2 + sp.3 +
## sp.4 + sp.5 + sp.6 + sj + sdo + rwa + nd + pol.orient + gb.rs +
## gb.rf + gb.cs + gb.cf + gb.as + gb.af + asimp.all + aspro.all +
## ps + int, data = data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.63667 -0.42300 -0.07667 0.36486 2.80087
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.2756727 0.3033382 -0.909 0.363689
## gender.d 0.0657762 0.0456278 1.442 0.149751
## income 0.0006036 0.0076078 0.079 0.936777
## phq 0.1105962 0.0406709 2.719 0.006662 **
## sp.1 0.0131106 0.0248129 0.528 0.597362
## sp.2 0.1395879 0.0222583 6.271 5.43e-10 ***
## sp.3 0.0559929 0.0273546 2.047 0.040940 *
## sp.4 -0.0684979 0.0310715 -2.205 0.027727 *
## sp.5 -0.1336776 0.0228266 -5.856 6.52e-09 ***
## sp.6 0.0509855 0.0289223 1.763 0.078250 .
## sj 0.0035900 0.0219451 0.164 0.870088
## sdo -0.0035560 0.0261035 -0.136 0.891670
## rwa 0.0742354 0.0275748 2.692 0.007224 **
## nd 0.0804002 0.0221661 3.627 0.000302 ***
## pol.orient 0.0028543 0.0013913 2.052 0.040488 *
## gb.rs -0.0103092 0.0224564 -0.459 0.646283
## gb.rf 0.0199535 0.0225930 0.883 0.377367
## gb.cs 0.0223051 0.0194151 1.149 0.250906
## gb.cf 0.0272034 0.0238168 1.142 0.253663
## gb.as -0.0034436 0.0253612 -0.136 0.892022
## gb.af 0.0236498 0.0231483 1.022 0.307200
## asimp.all 0.0256406 0.0262994 0.975 0.329833
## aspro.all -0.0072660 0.0288243 -0.252 0.801035
## ps 0.0017232 0.0013843 1.245 0.213486
## int 0.2696828 0.0217307 12.410 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.6636 on 948 degrees of freedom
## (38 observations deleted due to missingness)
## Multiple R-squared: 0.3577, Adjusted R-squared: 0.3414
## F-statistic: 22 on 24 and 948 DF, p-value: < 2.2e-16
lm.beta(reg.1)
##
## Call:
## lm(formula = cas ~ gender.d + income + phq + sp.1 + sp.2 + sp.3 +
## sp.4 + sp.5 + sp.6 + sj + sdo + rwa + nd + pol.orient + gb.rs +
## gb.rf + gb.cs + gb.cf + gb.as + gb.af + asimp.all + aspro.all +
## ps + int, data = data)
##
## Standardized Coefficients::
## (Intercept) gender.d income phq sp.1 sp.2
## 0.000000000 0.040231247 0.002146756 0.096990980 0.023490860 0.202466681
## sp.3 sp.4 sp.5 sp.6 sj sdo
## 0.082722028 -0.133145478 -0.227794738 0.096031975 0.004819389 -0.004488006
## rwa nd pol.orient gb.rs gb.rf gb.cs
## 0.094049165 0.112020960 0.065890263 -0.014739939 0.034874834 0.035490438
## gb.cf gb.as gb.af asimp.all aspro.all ps
## 0.044703303 -0.004630375 0.041260798 0.034256673 -0.008515798 0.043991087
## int
## 0.413320924
confint(lm.beta(reg.1), level = 0.95)
## 2.5 % 97.5 %
## (Intercept) -0.595291950 0.59529195
## gender.d -0.049311923 0.12977442
## income -0.012783286 0.01707680
## phq 0.017175635 0.17680632
## sp.1 -0.025203775 0.07218550
## sp.2 0.158785427 0.24614793
## sp.3 0.029039536 0.13640452
## sp.4 -0.194122349 -0.07216861
## sp.5 -0.272591149 -0.18299833
## sp.6 0.039272753 0.15279120
## sj -0.038247196 0.04788598
## sdo -0.055715357 0.04673934
## rwa 0.039934480 0.14816385
## nd 0.068520753 0.15552117
## pol.orient 0.063159866 0.06862066
## gb.rs -0.058809925 0.02933005
## gb.rf -0.009463316 0.07921298
## gb.cs -0.002611157 0.07359203
## gb.cf -0.002036480 0.09144309
## gb.as -0.054401006 0.04514026
## gb.af -0.004166978 0.08668857
## asimp.all -0.017355094 0.08586844
## aspro.all -0.065082538 0.04805094
## ps 0.041274499 0.04670768
## int 0.370675040 0.45596681
res.lm <- residuals(reg.1)
describe (res.lm)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 973 0 0.66 -0.08 -0.05 0.56 -1.64 2.8 4.44 0.8 1.01 0.02
qqnorm(res.lm)
qqline(res.lm,col="red")
shapiro.test(res.lm)
##
## Shapiro-Wilk normality test
##
## data: res.lm
## W = 0.96479, p-value = 1.395e-14
par(mfrow = c(2, 2))
plot(reg.1)
par(mfrow = c(1, 1))
vif(reg.1)
## gender.d income phq sp.1 sp.2 sp.3 sp.4
## 1.149505 1.080463 1.877636 2.917241 1.538359 2.410446 5.383747
## sp.5 sp.6 sj sdo rwa nd pol.orient
## 2.233123 4.379935 1.280944 1.601910 1.801250 1.407741 1.522446
## gb.rs gb.rf gb.cs gb.cf gb.as gb.af asimp.all
## 1.521525 2.301421 1.408494 2.260809 1.716365 2.407245 1.822159
## aspro.all ps int
## 1.684391 1.843063 1.637113
reg.2tt <- lm(cas.tt ~ gender.d + income +
phq.tt +
sp.1 + sp.2 + sp.3.tt + sp.4.tt + sp.5.t + sp.6.tt +
sj + sdo + rwa + nd + pol.orient +
gb.rs + gb.rf + gb.cs + gb.cf + gb.as + gb.af +
asimp.all + aspro.all +
ps + int, data = data)
summary(reg.2tt)
##
## Call:
## lm(formula = cas.tt ~ gender.d + income + phq.tt + sp.1 + sp.2 +
## sp.3.tt + sp.4.tt + sp.5.t + sp.6.tt + sj + sdo + rwa + nd +
## pol.orient + gb.rs + gb.rf + gb.cs + gb.cf + gb.as + gb.af +
## asimp.all + aspro.all + ps + int, data = data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.01626 -0.21353 -0.01729 0.21002 0.95457
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.1649514 0.1592625 -1.036 0.3006
## gender.d 0.0321762 0.0224655 1.432 0.1524
## income -0.0002290 0.0037437 -0.061 0.9512
## phq.tt 0.1057362 0.0369466 2.862 0.0043 **
## sp.1 0.0037975 0.0118135 0.321 0.7479
## sp.2 0.0783656 0.0110583 7.087 2.68e-12 ***
## sp.3.tt 0.0637250 0.0315567 2.019 0.0437 *
## sp.4.tt -0.0556321 0.0378039 -1.472 0.1415
## sp.5.t -0.2886635 0.0427346 -6.755 2.49e-11 ***
## sp.6.tt 0.0373861 0.0340216 1.099 0.2721
## sj 0.0017257 0.0107682 0.160 0.8727
## sdo 0.0004641 0.0128342 0.036 0.9712
## rwa 0.0364530 0.0135578 2.689 0.0073 **
## nd 0.0439406 0.0109284 4.021 6.26e-05 ***
## pol.orient 0.0011477 0.0006848 1.676 0.0940 .
## gb.rs -0.0056801 0.0110409 -0.514 0.6070
## gb.rf 0.0064850 0.0111169 0.583 0.5598
## gb.cs 0.0098666 0.0095209 1.036 0.3003
## gb.cf 0.0161082 0.0117148 1.375 0.1694
## gb.as -0.0109011 0.0124772 -0.874 0.3825
## gb.af 0.0064111 0.0113947 0.563 0.5738
## asimp.all 0.0086583 0.0129315 0.670 0.5033
## aspro.all -0.0029943 0.0141952 -0.211 0.8330
## ps 0.0010743 0.0006676 1.609 0.1079
## int 0.1398354 0.0106709 13.104 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.3265 on 948 degrees of freedom
## (38 observations deleted due to missingness)
## Multiple R-squared: 0.3875, Adjusted R-squared: 0.372
## F-statistic: 24.99 on 24 and 948 DF, p-value: < 2.2e-16
lm.beta(reg.2tt)
##
## Call:
## lm(formula = cas.tt ~ gender.d + income + phq.tt + sp.1 + sp.2 +
## sp.3.tt + sp.4.tt + sp.5.t + sp.6.tt + sj + sdo + rwa + nd +
## pol.orient + gb.rs + gb.rf + gb.cs + gb.cf + gb.as + gb.af +
## asimp.all + aspro.all + ps + int, data = data)
##
## Standardized Coefficients::
## (Intercept) gender.d income phq.tt sp.1 sp.2
## 0.000000000 0.039057064 -0.001616237 0.099049302 0.013503452 0.225580515
## sp.3.tt sp.4.tt sp.5.t sp.6.tt sj sdo
## 0.079972572 -0.081418530 -0.250036631 0.054159213 0.004597687 0.001162565
## rwa nd pol.orient gb.rs gb.rf gb.cs
## 0.091653005 0.121500587 0.052581670 -0.016117384 0.022494335 0.031156319
## gb.cf gb.as gb.af asimp.all aspro.all ps
## 0.052533293 -0.029090062 0.022197874 0.022957222 -0.006964696 0.054427813
## int
## 0.425325369
confint(lm.beta(reg.2tt), level = 0.95)
## 2.5 % 97.5 %
## (Intercept) -0.3125477515 0.312547751
## gender.d -0.0050308151 0.083144943
## income -0.0089630671 0.005730594
## phq.tt 0.0265426994 0.171555904
## sp.1 -0.0096801835 0.036687088
## sp.2 0.2038788870 0.247282143
## sp.3.tt 0.0180434297 0.141901715
## sp.4.tt -0.1556075281 -0.007229531
## sp.5.t -0.3339019900 -0.166171273
## sp.6.tt -0.0126072295 0.120925655
## sj -0.0165344831 0.025729858
## sdo -0.0240240908 0.026349220
## rwa 0.0650462324 0.118259778
## nd 0.1000540164 0.142947158
## pol.orient 0.0512378378 0.053925502
## gb.rs -0.0377847414 0.005549973
## gb.rf 0.0006777396 0.044310931
## gb.cs 0.0124717847 0.049840853
## gb.cf 0.0295432992 0.075523287
## gb.as -0.0535761283 -0.004603997
## gb.af -0.0001639660 0.044559715
## asimp.all -0.0024204155 0.048334860
## aspro.all -0.0348222871 0.020892895
## ps 0.0531175936 0.055738033
## int 0.4043840768 0.446266660
res.lm <- residuals(reg.2tt)
describe (res.lm)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 973 0 0.32 -0.02 -0.01 0.32 -1.02 0.95 1.97 0.17 -0.18 0.01
qqnorm(res.lm)
qqline(res.lm,col="red")
shapiro.test(res.lm)
##
## Shapiro-Wilk normality test
##
## data: res.lm
## W = 0.99661, p-value = 0.03444
par(mfrow = c(2, 2))
plot(reg.2tt)
par(mfrow = c(1, 1))
vif(reg.2tt)
## gender.d income phq.tt sp.1 sp.2 sp.3.tt sp.4.tt
## 1.150978 1.080615 1.853999 2.731216 1.568322 2.427458 4.737770
## sp.5.t sp.6.tt sj sdo rwa nd pol.orient
## 2.120741 3.759584 1.273857 1.599404 1.798503 1.413315 1.523222
## gb.rs gb.rf gb.cs gb.cf gb.as gb.af asimp.all
## 1.519106 2.301430 1.398995 2.259181 1.715870 2.409214 1.819592
## aspro.all ps int
## 1.687294 1.770775 1.630475
3.5 Social dominance orientation