загрузка библиотек

Загрузка переменных

ltu <- read_sav("/Users/dariagugnina/Desktop/Даша/BSGLTUM6.sav")
names(ltu)
##   [1] "IDCNTRY"   "IDBOOK"    "IDSCHOOL"  "IDCLASS"   "IDSTUD"   
##   [6] "IDGRADE"   "ITSEX"     "ITADMINI"  "ITLANG"    "BSBG01"   
##  [11] "BSBG03"    "BSBG04"    "BSBG05"    "BSBG06A"   "BSBG06B"  
##  [16] "BSBG06C"   "BSBG06D"   "BSBG06E"   "BSBG06F"   "BSBG06G"  
##  [21] "BSBG06H"   "BSBG06I"   "BSBG06J"   "BSBG06K"   "BSBG07A"  
##  [26] "BSBG07B"   "BSBG08"    "BSBG09A"   "BSBG09B"   "BSBG10A"  
##  [31] "BSBG10B"   "BSBG11"    "BSBG12"    "BSBG13A"   "BSBG13B"  
##  [36] "BSBG13C"   "BSBG14A"   "BSBG14B"   "BSBG14C"   "BSBG14D"  
##  [41] "BSBG14E"   "BSBG14F"   "BSBG15A"   "BSBG15B"   "BSBG15C"  
##  [46] "BSBG15D"   "BSBG15E"   "BSBG15F"   "BSBG15G"   "BSBG16A"  
##  [51] "BSBG16B"   "BSBG16C"   "BSBG16D"   "BSBG16E"   "BSBG16F"  
##  [56] "BSBG16G"   "BSBG16H"   "BSBG16I"   "BSBM17A"   "BSBM17B"  
##  [61] "BSBM17C"   "BSBM17D"   "BSBM17E"   "BSBM17F"   "BSBM17G"  
##  [66] "BSBM17H"   "BSBM17I"   "BSBM18A"   "BSBM18B"   "BSBM18C"  
##  [71] "BSBM18D"   "BSBM18E"   "BSBM18F"   "BSBM18G"   "BSBM18H"  
##  [76] "BSBM18I"   "BSBM18J"   "BSBM19A"   "BSBM19B"   "BSBM19C"  
##  [81] "BSBM19D"   "BSBM19E"   "BSBM19F"   "BSBM19G"   "BSBM19H"  
##  [86] "BSBM19I"   "BSBM20A"   "BSBM20B"   "BSBM20C"   "BSBM20D"  
##  [91] "BSBM20E"   "BSBM20F"   "BSBM20G"   "BSBM20H"   "BSBM20I"  
##  [96] "BSBS21A"   "BSBS21B"   "BSBS21C"   "BSBS21D"   "BSBS21E"  
## [101] "BSBS21F"   "BSBS21G"   "BSBS21H"   "BSBS21I"   "BSBS22A"  
## [106] "BSBS22B"   "BSBS22C"   "BSBS22D"   "BSBS22E"   "BSBS22F"  
## [111] "BSBS22G"   "BSBS22H"   "BSBS22I"   "BSBS22J"   "BSBS23A"  
## [116] "BSBS23B"   "BSBS23C"   "BSBS23D"   "BSBS23E"   "BSBS23F"  
## [121] "BSBS23G"   "BSBS23H"   "BSBS24A"   "BSBS24B"   "BSBS24C"  
## [126] "BSBS24D"   "BSBS24E"   "BSBS24F"   "BSBS24G"   "BSBS24H"  
## [131] "BSBS24I"   "BSBM25AA"  "BSBS25AB"  "BSBM25BA"  "BSBS25BB" 
## [136] "BSBM26AA"  "BSBS26AB"  "BSBM26BA"  "BSBS26BB"  "BSBB21"   
## [141] "BSBB22A"   "BSBB22B"   "BSBB22C"   "BSBB22D"   "BSBB22E"  
## [146] "BSBB22F"   "BSBB22G"   "BSBB22H"   "BSBB22I"   "BSBB23A"  
## [151] "BSBB23B"   "BSBB23C"   "BSBB23D"   "BSBB23E"   "BSBB23F"  
## [156] "BSBB23G"   "BSBB23H"   "BSBB23I"   "BSBB23J"   "BSBB24A"  
## [161] "BSBB24B"   "BSBB24C"   "BSBB24D"   "BSBB24E"   "BSBB24F"  
## [166] "BSBB24G"   "BSBB24H"   "BSBE25"    "BSBE26A"   "BSBE26B"  
## [171] "BSBE26C"   "BSBE26D"   "BSBE26E"   "BSBE26F"   "BSBE26G"  
## [176] "BSBE26H"   "BSBE26I"   "BSBE27A"   "BSBE27B"   "BSBE27C"  
## [181] "BSBE27D"   "BSBE27E"   "BSBE27F"   "BSBE27G"   "BSBE27H"  
## [186] "BSBE27I"   "BSBE27J"   "BSBE28A"   "BSBE28B"   "BSBE28C"  
## [191] "BSBE28D"   "BSBE28E"   "BSBE28F"   "BSBE28G"   "BSBE28H"  
## [196] "BSBC29"    "BSBC30A"   "BSBC30B"   "BSBC30C"   "BSBC30D"  
## [201] "BSBC30E"   "BSBC30F"   "BSBC30G"   "BSBC30H"   "BSBC30I"  
## [206] "BSBC31A"   "BSBC31B"   "BSBC31C"   "BSBC31D"   "BSBC31E"  
## [211] "BSBC31F"   "BSBC31G"   "BSBC31H"   "BSBC31I"   "BSBC31J"  
## [216] "BSBC32A"   "BSBC32B"   "BSBC32C"   "BSBC32D"   "BSBC32E"  
## [221] "BSBC32F"   "BSBC32G"   "BSBC32H"   "BSBP33"    "BSBP34A"  
## [226] "BSBP34B"   "BSBP34C"   "BSBP34D"   "BSBP34E"   "BSBP34F"  
## [231] "BSBP34G"   "BSBP34H"   "BSBP34I"   "BSBP35A"   "BSBP35B"  
## [236] "BSBP35C"   "BSBP35D"   "BSBP35E"   "BSBP35F"   "BSBP35G"  
## [241] "BSBP35H"   "BSBP35I"   "BSBP35J"   "BSBP36A"   "BSBP36B"  
## [246] "BSBP36C"   "BSBP36D"   "BSBP36E"   "BSBP36F"   "BSBP36G"  
## [251] "BSBP36H"   "BSBS37A"   "BSBS37B"   "BSBS37C"   "BSBS37D"  
## [256] "BSBS37E"   "BSBS37F"   "BSBS37G"   "BSBS37H"   "BSBS37I"  
## [261] "BSBM38AA"  "BSBB38AB"  "BSBE38AC"  "BSBC38AD"  "BSBP38AE" 
## [266] "BSBM38BA"  "BSBB38BB"  "BSBE38BC"  "BSBC38BD"  "BSBP38BE" 
## [271] "BSBM39AA"  "BSBS39AB"  "BSBM39BA"  "BSBS39BB"  "ITACCOMM1"
## [276] "IDPOP"     "IDGRADER"  "BSDAGE"    "TOTWGT"    "HOUWGT"   
## [281] "SENWGT"    "WGTADJ1"   "WGTADJ2"   "WGTADJ3"   "WGTFAC1"  
## [286] "WGTFAC2"   "WGTFAC3"   "JKZONE"    "JKREP"     "BSMMAT01" 
## [291] "BSMMAT02"  "BSMMAT03"  "BSMMAT04"  "BSMMAT05"  "BSSSCI01" 
## [296] "BSSSCI02"  "BSSSCI03"  "BSSSCI04"  "BSSSCI05"  "BSMALG01" 
## [301] "BSMALG02"  "BSMALG03"  "BSMALG04"  "BSMALG05"  "BSMDAT01" 
## [306] "BSMDAT02"  "BSMDAT03"  "BSMDAT04"  "BSMDAT05"  "BSMNUM01" 
## [311] "BSMNUM02"  "BSMNUM03"  "BSMNUM04"  "BSMNUM05"  "BSMGEO01" 
## [316] "BSMGEO02"  "BSMGEO03"  "BSMGEO04"  "BSMGEO05"  "BSSCHE01" 
## [321] "BSSCHE02"  "BSSCHE03"  "BSSCHE04"  "BSSCHE05"  "BSSEAR01" 
## [326] "BSSEAR02"  "BSSEAR03"  "BSSEAR04"  "BSSEAR05"  "BSSBIO01" 
## [331] "BSSBIO02"  "BSSBIO03"  "BSSBIO04"  "BSSBIO05"  "BSSPHY01" 
## [336] "BSSPHY02"  "BSSPHY03"  "BSSPHY04"  "BSSPHY05"  "BSMKNO01" 
## [341] "BSMKNO02"  "BSMKNO03"  "BSMKNO04"  "BSMKNO05"  "BSMAPP01" 
## [346] "BSMAPP02"  "BSMAPP03"  "BSMAPP04"  "BSMAPP05"  "BSMREA01" 
## [351] "BSMREA02"  "BSMREA03"  "BSMREA04"  "BSMREA05"  "BSSKNO01" 
## [356] "BSSKNO02"  "BSSKNO03"  "BSSKNO04"  "BSSKNO05"  "BSSAPP01" 
## [361] "BSSAPP02"  "BSSAPP03"  "BSSAPP04"  "BSSAPP05"  "BSSREA01" 
## [366] "BSSREA02"  "BSSREA03"  "BSSREA04"  "BSSREA05"  "BSMIBM01" 
## [371] "BSMIBM02"  "BSMIBM03"  "BSMIBM04"  "BSMIBM05"  "BSSIBM01" 
## [376] "BSSIBM02"  "BSSIBM03"  "BSSIBM04"  "BSSIBM05"  "BSBGHER"  
## [381] "BSDGHER"   "BSBGSSB"   "BSDGSSB"   "BSBGSB"    "BSDGSB"   
## [386] "BSBGSLM"   "BSDGSLM"   "BSBGEML"   "BSDGEML"   "BSBGSCM"  
## [391] "BSDGSCM"   "BSBGSVM"   "BSDGSVM"   "BSBGSLS"   "BSDGSLS"  
## [396] "BSBGESL"   "BSDGESL"   "BSBGSCS"   "BSDGSCS"   "BSBGSVS"  
## [401] "BSDGSVS"   "BSBGSLB"   "BSDGSLB"   "BSBGEBL"   "BSDGEBL"  
## [406] "BSBGSCB"   "BSDGSCB"   "BSBGSLE"   "BSDGSLE"   "BSBGEEL"  
## [411] "BSDGEEL"   "BSBGSCE"   "BSDGSCE"   "BSBGSLC"   "BSDGSLC"  
## [416] "BSBGECL"   "BSDGECL"   "BSBGSCC"   "BSDGSCC"   "BSBGSLP"  
## [421] "BSDGSLP"   "BSBGEPL"   "BSDGEPL"   "BSBGSCP"   "BSDGSCP"  
## [426] "BSDG06S"   "BSDGEDUP"  "BSDMLOWP"  "BSDSLOWP"  "BSDMWKHW" 
## [431] "BSDSWKHS"  "BSDBWKHB"  "BSDCWKHC"  "BSDPWKHP"  "BSDEWKHE" 
## [436] "VERSION"
ltu1 <- ltu[c('BSBM18C', 'BSBM18E', 'BSBM18G', 'BSBM18I', 'BSBM18J','BSBM20A', 'BSBM20B','BSBM20C', 'BSBM20D',
              'BSBM20E', 'BSBM19A','BSBM19B','BSBM19C','BSBM19F','BSBM19G','BSBM19H')]

Переводим в тип numeric

ltu2 <- as.data.frame(lapply(ltu1, as.numeric))

Матрица корреляции

ltu.cor <- hetcor(ltu2)
ltu.cor<- ltu.cor$correlations
corrgram(ltu.cor)