R version 3.0.3 (2014-03-06) -- "Warm Puppy" Copyright (C) 2014 The R Foundation for Statistical Computing Platform: i686-pc-linux-gnu (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- array(list('GTM' + ,232.2067361 + ,49.03843822 + ,21.37654757 + ,67.63922514 + ,77.33843478 + ,49.86797589 + ,7.880607834 + ,12.85783383 + ,3.701014206 + ,77.33843478 + ,59.18432199 + ,16.8140904 + ,1.420 + ,0.14 + ,0.44 + ,0.82 + ,0.9 + ,0.64 + ,0.87 + ,0.66 + ,0.81 + ,0.83 + ,0.77 + ,95.36 + ,4.64 + ,47.3 + ,48.06 + ,41.04 + ,4.16 + ,36.88 + ,58.96 + ,'PRO' + ,46.98711029 + ,14.60410185 + ,15.2390628 + ,58.41640739 + ,44.44726649 + ,38.09765699 + ,3.17480475 + ,22.8585942 + ,4.444726649 + ,44.44726649 + ,34.28789129 + ,9.524414249 + ,86 + ,0.02 + ,0.49 + ,0.74 + ,0.82 + ,0.57 + ,0.4 + ,0.59 + ,0.75 + ,0.73 + ,0.69 + ,96.65 + ,3.35 + ,51.85 + ,44.8 + ,43.42 + ,6.37 + ,37.05 + ,56.58 + ,'SAC' + ,153.1533807 + ,29.68333565 + ,15.78900832 + ,21.15727115 + ,36.94627948 + ,10.10496533 + ,1.578900832 + ,13.89432733 + ,3.789361998 + ,36.94627948 + ,29.68333565 + ,6.631383496 + ,590 + ,0.36 + ,0.48 + ,0.76 + ,0.86 + ,0.57 + ,0.83 + ,0.6 + ,0.75 + ,0.88 + ,0.75 + ,97.01 + ,2.99 + ,48.35 + ,48.66 + ,61.43 + ,10.69 + ,50.74 + ,38.57 + ,'CHM' + ,76.40150559 + ,11.38596952 + ,7.425632293 + ,14.35622243 + ,35.80804906 + ,9.405800904 + ,0.825070255 + ,5.445463681 + ,1.320112408 + ,35.80804906 + ,26.40224815 + ,9.240786853 + ,325 + ,0.78 + ,0.56 + ,0.7 + ,0.79 + ,0.52 + ,0.5 + ,0.43 + ,0.67 + ,0.78 + ,0.63 + ,97.42 + ,2.58 + ,55.68 + ,41.74 + ,68.27 + ,18.59 + ,49.68 + ,31.73 + ,'ESC' + ,301.0646157 + ,35.58683401 + ,26.33425717 + ,98.21966187 + ,73.87826741 + ,70.74662601 + ,8.113798154 + ,28.46946721 + ,3.985725409 + ,73.87826741 + ,59.6435338 + ,12.09952356 + ,156 + ,0.07 + ,0.49 + ,0.72 + ,0.81 + ,0.54 + ,0.5 + ,0.46 + ,0.8 + ,0.74 + ,0.67 + ,94.67 + ,5.33 + ,38.57 + ,56.1 + ,47.93 + ,3.75 + ,44.18 + ,52.07 + ,'SRO' + ,80.59956801 + ,19.71500225 + ,20.29485525 + ,82.33912703 + ,67.84280185 + ,56.82559471 + ,4.638824058 + ,24.64375281 + ,8.697795109 + ,67.84280185 + ,55.6658887 + ,11.88698665 + ,109 + ,0.03 + ,0.52 + ,0.71 + ,0.8 + ,0.54 + ,0.4 + ,0.49 + ,0.65 + ,0.56 + ,0.56 + ,96.22 + ,3.78 + ,55.42 + ,40.8 + ,58.41 + ,11.34 + ,47.07 + ,41.59 + ,'SOL' + ,11.61243273 + ,5.573967713 + ,0.928994619 + ,8.593200224 + ,18.34764372 + ,3.715978475 + ,0 + ,7.664205605 + ,1.161243273 + ,18.34764372 + ,13.47042197 + ,4.877221749 + ,369 + ,0.96 + ,0.54 + ,0.61 + ,0.65 + ,0.52 + ,0.53 + ,0.41 + ,0.69 + ,0.69 + ,0.6 + ,97.13 + ,2.87 + ,45.41 + ,51.72 + ,81.24 + ,24.02 + ,57.22 + ,18.76 + ,'TOT' + ,21.37050532 + ,4.443372393 + ,0.634767485 + ,7.828798978 + ,15.86918712 + ,0.846356646 + ,0.423178323 + ,9.098333947 + ,3.173837423 + ,15.86918712 + ,10.57945808 + ,4.443372393 + ,439 + ,0.97 + ,0.54 + ,0.61 + ,0.68 + ,0.47 + ,0.47 + ,0.41 + ,0.51 + ,0.59 + ,0.5 + ,94.18 + ,5.82 + ,58.74 + ,35.44 + ,76.15 + ,24.74 + ,51.41 + ,23.85 + ,'QUT' + ,100.4559641 + ,30.66683325 + ,9.465071991 + ,26.88080446 + ,34.83146493 + ,17.54193342 + ,1.766813438 + ,10.34847871 + ,2.650220158 + ,34.83146493 + ,25.87119678 + ,8.076861433 + ,372 + ,0.52 + ,0.53 + ,0.7 + ,0.8 + ,0.52 + ,0.59 + ,0.51 + ,0.83 + ,0.72 + ,0.69 + ,95.62 + ,4.38 + ,59.43 + ,36.19 + ,66.5 + ,15.42 + ,51.08 + ,33.5 + ,'SUC' + ,105.2605406 + ,26.93675251 + ,9.945877848 + ,30.87366249 + ,36.67542456 + ,17.19808045 + ,2.279263674 + ,17.19808045 + ,2.693675251 + ,36.67542456 + ,29.00881039 + ,7.252202598 + ,202 + ,0.23 + ,0.53 + ,0.65 + ,0.73 + ,0.5 + ,0.41 + ,0.39 + ,0.71 + ,0.77 + ,0.62 + ,96.63 + ,3.37 + ,31.4 + ,65.23 + ,73.07 + ,24.07 + ,49 + ,29.93 + ,'RET' + ,86.13605536 + ,24.09169365 + ,5.940417611 + ,35.97252887 + ,37.62264487 + ,23.10162404 + ,1.320092803 + ,18.15127603 + ,2.970208806 + ,37.62264487 + ,28.71201845 + ,7.590533615 + ,178 + ,0.15 + ,0.54 + ,0.69 + ,0.77 + ,0.54 + ,0.39 + ,0.4 + ,0.62 + ,0.74 + ,0.59 + ,95.21 + ,4.79 + ,42.09 + ,53.12 + ,60.5 + ,13.38 + ,47.12 + ,39.5 + ,'SMA' + ,22.79850137 + ,6.262249302 + ,4.696686977 + ,15.55777561 + ,12.72019389 + ,10.66539334 + ,0.293542936 + ,6.849335174 + ,0.880628808 + ,12.72019389 + ,9.88261218 + ,2.641886424 + ,288 + ,0.3 + ,0.56 + ,0.66 + ,0.72 + ,0.54 + ,0.27 + ,0.39 + ,0.59 + ,0.69 + ,0.56 + ,96.78 + ,3.22 + ,64.41 + ,32.37 + ,65.08 + ,15.15 + ,49.93 + ,34.92 + ,'HUE' + ,48.06689382 + ,7.475140811 + ,4.346012099 + ,6.432097907 + ,13.12495654 + ,3.824490647 + ,0.260760726 + ,3.650650163 + ,0.260760726 + ,13.12495654 + ,9.995827828 + ,2.086085808 + ,156 + ,0.57 + ,0.57 + ,0.57 + ,0.65 + ,0.42 + ,0.29 + ,0.4 + ,0.57 + ,0.7 + ,0.56 + ,97.05 + ,2.95 + ,69.43 + ,27.62 + ,55.68 + ,9.57 + ,46.11 + ,44.32 + ,'QUI' + ,23.43819484 + ,5.441009517 + ,2.092695968 + ,6.382722702 + ,14.43960218 + ,2.301965565 + ,0.313904395 + ,5.545644315 + ,1.046347984 + ,14.43960218 + ,8.998592662 + ,4.813200726 + ,131 + ,0.89 + ,0.58 + ,0.53 + ,0.58 + ,0.44 + ,0.31 + ,0.42 + ,0.45 + ,0.66 + ,0.51 + ,97.07 + ,2.93 + ,59.57 + ,37.5 + ,66.47 + ,16.15 + ,50.32 + ,33.53 + ,'BVP' + ,39.46976467 + ,21.96901996 + ,6.330056598 + ,18.61781352 + ,23.08608877 + ,7.44712541 + ,1.489425082 + ,16.3836759 + ,1.861781352 + ,23.08608877 + ,16.3836759 + ,5.585344057 + ,25 + ,0.56 + ,0.54 + ,0.63 + ,0.69 + ,0.5 + ,0.31 + ,0.55 + ,0.56 + ,0.68 + ,0.59 + ,96.33 + ,3.67 + ,59.92 + ,36.41 + ,62.39 + ,22.36 + ,40.03 + ,37.61 + ,'AVP' + ,33.84463438 + ,11.51967766 + ,6.965386494 + ,13.03777472 + ,14.46657195 + ,7.411885628 + ,0.446499134 + ,7.322585802 + ,1.250197576 + ,14.46657195 + ,11.25177818 + ,2.857594459 + ,371 + ,0.9 + ,0.58 + ,0.56 + ,0.6 + ,0.48 + ,0.23 + ,0.24 + ,0.29 + ,0.42 + ,0.32 + ,94.46 + ,5.54 + ,50.45 + ,44.01 + ,77.2 + ,30.2 + ,47 + ,22.8 + ,'PET' + ,51.40177249 + ,7.002099038 + ,11.29884163 + ,59.35870321 + ,25.30303971 + ,41.53517839 + ,3.660188134 + ,17.34610898 + ,2.705356447 + ,25.30303971 + ,21.48371296 + ,3.660188134 + ,17 + ,0.32 + ,0.59 + ,0.66 + ,0.75 + ,0.5 + ,0.31 + ,0.36 + ,0.54 + ,0.43 + ,0.44 + ,97.88 + ,2.12 + ,53.12 + ,44.76 + ,62.7 + ,15.54 + ,47.16 + ,37.3 + ,'IZA' + ,103.7089333 + ,12.65930642 + ,20.69309703 + ,79.8510097 + ,49.17653646 + ,59.15791268 + ,6.816549609 + ,17.28482222 + ,3.408274804 + ,49.17653646 + ,38.95171205 + ,9.494479812 + ,55 + ,0.27 + ,0.52 + ,0.68 + ,0.78 + ,0.46 + ,0.36 + ,0.55 + ,0.72 + ,0.64 + ,0.63 + ,96.88 + ,3.12 + ,49.92 + ,46.96 + ,58.38 + ,24.63 + ,33.75 + ,41.62 + ,'ZAC' + ,64.14773857 + ,8.13140348 + ,42.46399595 + ,92.60765075 + ,67.76169567 + ,66.40646176 + ,7.679658842 + ,23.49072117 + ,5.872680291 + ,67.76169567 + ,50.59539943 + ,14.90757305 + ,82 + ,0.01 + ,0.48 + ,0.68 + ,0.79 + ,0.46 + ,0.43 + ,0.59 + ,0.69 + ,0.76 + ,0.68 + ,97.58 + ,2.42 + ,41.76 + ,55.82 + ,61.48 + ,24.96 + ,36.52 + ,38.52 + ,'CHQ' + ,75.00040761 + ,11.41310551 + ,29.8914668 + ,96.19617498 + ,58.15248996 + ,58.69597117 + ,6.250033968 + ,38.31542563 + ,7.336996397 + ,58.15248996 + ,45.38068142 + ,11.1413649 + ,153 + ,0.07 + ,0.54 + ,0.63 + ,0.72 + ,0.44 + ,0.27 + ,0.5 + ,0.57 + ,0.64 + ,0.57 + ,97.93 + ,2.07 + ,47.66 + ,50.27 + ,66.01 + ,22.03 + ,33.98 + ,33.99 + ,'JAL' + ,12.41662554 + ,11.14312549 + ,12.41662554 + ,54.44212738 + ,35.02125153 + ,33.11100145 + ,4.775625209 + ,18.14737579 + ,5.094000223 + ,35.02125153 + ,28.97212627 + ,5.094000223 + ,154 + ,0 + ,0.55 + ,0.65 + ,0.76 + ,0.42 + ,0.33 + ,0.46 + ,0.51 + ,0.62 + ,0.53 + ,97.9 + ,2.1 + ,42.62 + ,55.28 + ,73.43 + ,18.88 + ,54.55 + ,26.57 + ,'JUT' + ,34.77267651 + ,11.74441392 + ,6.217630898 + ,61.25517848 + ,46.2868078 + ,42.83256841 + ,7.369044028 + ,14.04724018 + ,2.302826259 + ,46.2868078 + ,36.38465489 + ,9.671870286 + ,131 + ,0.03 + ,0.5 + ,0.69 + ,0.77 + ,0.52 + ,0.32 + ,0.5 + ,0.69 + ,0.62 + ,0.6 + ,97.51 + ,2.49 + ,52.56 + ,44.95 + ,48.92 + ,14.31 + ,34.61 + ,51.08) + ,dim=c(32 + ,22) + ,dimnames=list(c('DEP' + ,'Delitos' + ,'Capturas_Delitos' + ,'Armas_robadas' + ,'Homicidios' + ,'OtrasMuertes' + ,'HArmaFuego_M' + ,'HArmaFuego_F' + ,'HNoArmaFuegoM' + ,'HNoArmaFuegoF' + ,'OtrasMuertesT' + ,'OtrasMuertesH' + ,'OtrasMuertesM' + ,'DensidadPoblación' + ,'Etnicidad' + ,'Juventud' + ,'Escolaridad' + ,'Alfabetismo' + ,'Matriculación' + ,'Urbanidad' + ,'IH' + ,'ICV' + ,'ISP' + ,'IBH' + ,'Ocupados' + ,'Desocupados' + ,'Subocupados' + ,'OcupadosPlenos' + ,'PobrezaTotal' + ,'PobrezaExtrema' + ,'PobrezaNoExtrema' + ,'NoPobreza') + ,1:22)) > y <- array(NA,dim=c(32,22),dimnames=list(c('DEP','Delitos','Capturas_Delitos','Armas_robadas','Homicidios','OtrasMuertes','HArmaFuego_M','HArmaFuego_F','HNoArmaFuegoM','HNoArmaFuegoF','OtrasMuertesT','OtrasMuertesH','OtrasMuertesM','DensidadPoblación','Etnicidad','Juventud','Escolaridad','Alfabetismo','Matriculación','Urbanidad','IH','ICV','ISP','IBH','Ocupados','Desocupados','Subocupados','OcupadosPlenos','PobrezaTotal','PobrezaExtrema','PobrezaNoExtrema','NoPobreza'),1:22)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } There were 22 warnings (use warnings() to see them) > par1 = '6' > par1 <- '6' > #'GNU S' R Code compiled by R2WASP v. 1.2.291 () > #Author: root > #To cite this work: Wessa P., 2012, Factor Analysis (v1.0.2) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_factor_analysis.wasp/ > #Source of accompanying publication: > # > library(psych) > par1 <- as.numeric(par1) > x <- t(x) > nrows <- length(x[,1]) > ncols <- length(x[1,]) > y <- array(as.double(x[1:nrows,2:ncols]),dim=c(nrows,ncols-1)) > colnames(y) <- colnames(x)[2:ncols] > rownames(y) <- x[,1] > y Delitos Capturas_Delitos Armas_robadas Homicidios OtrasMuertes GTM 232.20674 49.038438 21.3765476 67.639225 77.33843 PRO 46.98711 14.604102 15.2390628 58.416407 44.44727 SAC 153.15338 29.683336 15.7890083 21.157271 36.94628 CHM 76.40151 11.385970 7.4256323 14.356222 35.80805 ESC 301.06462 35.586834 26.3342572 98.219662 73.87827 SRO 80.59957 19.715002 20.2948553 82.339127 67.84280 SOL 11.61243 5.573968 0.9289946 8.593200 18.34764 TOT 21.37051 4.443372 0.6347675 7.828799 15.86919 QUT 100.45596 30.666833 9.4650720 26.880804 34.83146 SUC 105.26054 26.936753 9.9458778 30.873662 36.67542 RET 86.13606 24.091694 5.9404176 35.972529 37.62264 SMA 22.79850 6.262249 4.6966870 15.557776 12.72019 HUE 48.06689 7.475141 4.3460121 6.432098 13.12496 QUI 23.43819 5.441010 2.0926960 6.382723 14.43960 BVP 39.46976 21.969020 6.3300566 18.617814 23.08609 AVP 33.84463 11.519678 6.9653865 13.037775 14.46657 PET 51.40177 7.002099 11.2988416 59.358703 25.30304 IZA 103.70893 12.659306 20.6930970 79.851010 49.17654 ZAC 64.14774 8.131403 42.4639959 92.607651 67.76170 CHQ 75.00041 11.413106 29.8914668 96.196175 58.15249 JAL 12.41663 11.143125 12.4166255 54.442127 35.02125 JUT 34.77268 11.744414 6.2176309 61.255178 46.28681 HArmaFuego_M HArmaFuego_F HNoArmaFuegoM HNoArmaFuegoF OtrasMuertesT GTM 49.8679759 7.8806078 12.857834 3.7010142 77.33843 PRO 38.0976570 3.1748047 22.858594 4.4447266 44.44727 SAC 10.1049653 1.5789008 13.894327 3.7893620 36.94628 CHM 9.4058009 0.8250703 5.445464 1.3201124 35.80805 ESC 70.7466260 8.1137982 28.469467 3.9857254 73.87827 SRO 56.8255947 4.6388241 24.643753 8.6977951 67.84280 SOL 3.7159785 0.0000000 7.664206 1.1612433 18.34764 TOT 0.8463566 0.4231783 9.098334 3.1738374 15.86919 QUT 17.5419334 1.7668134 10.348479 2.6502202 34.83146 SUC 17.1980804 2.2792637 17.198080 2.6936753 36.67542 RET 23.1016240 1.3200928 18.151276 2.9702088 37.62264 SMA 10.6653933 0.2935429 6.849335 0.8806288 12.72019 HUE 3.8244906 0.2607607 3.650650 0.2607607 13.12496 QUI 2.3019656 0.3139044 5.545644 1.0463480 14.43960 BVP 7.4471254 1.4894251 16.383676 1.8617814 23.08609 AVP 7.4118856 0.4464991 7.322586 1.2501976 14.46657 PET 41.5351784 3.6601881 17.346109 2.7053564 25.30304 IZA 59.1579127 6.8165496 17.284822 3.4082748 49.17654 ZAC 66.4064618 7.6796588 23.490721 5.8726803 67.76170 CHQ 58.6959712 6.2500340 38.315426 7.3369964 58.15249 JAL 33.1110015 4.7756252 18.147376 5.0940002 35.02125 JUT 42.8325684 7.3690440 14.047240 2.3028263 46.28681 OtrasMuertesH OtrasMuertesM DensidadPoblaci\363n Etnicidad Juventud GTM 59.184322 16.814090 1.42 0.14 0.44 PRO 34.287891 9.524414 86.00 0.02 0.49 SAC 29.683336 6.631383 590.00 0.36 0.48 CHM 26.402248 9.240787 325.00 0.78 0.56 ESC 59.643534 12.099524 156.00 0.07 0.49 SRO 55.665889 11.886987 109.00 0.03 0.52 SOL 13.470422 4.877222 369.00 0.96 0.54 TOT 10.579458 4.443372 439.00 0.97 0.54 QUT 25.871197 8.076861 372.00 0.52 0.53 SUC 29.008810 7.252203 202.00 0.23 0.53 RET 28.712018 7.590534 178.00 0.15 0.54 SMA 9.882612 2.641886 288.00 0.30 0.56 HUE 9.995828 2.086086 156.00 0.57 0.57 QUI 8.998593 4.813201 131.00 0.89 0.58 BVP 16.383676 5.585344 25.00 0.56 0.54 AVP 11.251778 2.857594 371.00 0.90 0.58 PET 21.483713 3.660188 17.00 0.32 0.59 IZA 38.951712 9.494480 55.00 0.27 0.52 ZAC 50.595399 14.907573 82.00 0.01 0.48 CHQ 45.380681 11.141365 153.00 0.07 0.54 JAL 28.972126 5.094000 154.00 0.00 0.55 JUT 36.384655 9.671870 131.00 0.03 0.50 Escolaridad Alfabetismo Matriculaci\363n Urbanidad IH ICV ISP IBH GTM 0.82 0.90 0.64 0.87 0.66 0.81 0.83 0.77 PRO 0.74 0.82 0.57 0.40 0.59 0.75 0.73 0.69 SAC 0.76 0.86 0.57 0.83 0.60 0.75 0.88 0.75 CHM 0.70 0.79 0.52 0.50 0.43 0.67 0.78 0.63 ESC 0.72 0.81 0.54 0.50 0.46 0.80 0.74 0.67 SRO 0.71 0.80 0.54 0.40 0.49 0.65 0.56 0.56 SOL 0.61 0.65 0.52 0.53 0.41 0.69 0.69 0.60 TOT 0.61 0.68 0.47 0.47 0.41 0.51 0.59 0.50 QUT 0.70 0.80 0.52 0.59 0.51 0.83 0.72 0.69 SUC 0.65 0.73 0.50 0.41 0.39 0.71 0.77 0.62 RET 0.69 0.77 0.54 0.39 0.40 0.62 0.74 0.59 SMA 0.66 0.72 0.54 0.27 0.39 0.59 0.69 0.56 HUE 0.57 0.65 0.42 0.29 0.40 0.57 0.70 0.56 QUI 0.53 0.58 0.44 0.31 0.42 0.45 0.66 0.51 BVP 0.63 0.69 0.50 0.31 0.55 0.56 0.68 0.59 AVP 0.56 0.60 0.48 0.23 0.24 0.29 0.42 0.32 PET 0.66 0.75 0.50 0.31 0.36 0.54 0.43 0.44 IZA 0.68 0.78 0.46 0.36 0.55 0.72 0.64 0.63 ZAC 0.68 0.79 0.46 0.43 0.59 0.69 0.76 0.68 CHQ 0.63 0.72 0.44 0.27 0.50 0.57 0.64 0.57 JAL 0.65 0.76 0.42 0.33 0.46 0.51 0.62 0.53 JUT 0.69 0.77 0.52 0.32 0.50 0.69 0.62 0.60 Ocupados Desocupados Subocupados OcupadosPlenos PobrezaTotal PobrezaExtrema GTM 95.36 4.64 47.30 48.06 41.04 4.16 PRO 96.65 3.35 51.85 44.80 43.42 6.37 SAC 97.01 2.99 48.35 48.66 61.43 10.69 CHM 97.42 2.58 55.68 41.74 68.27 18.59 ESC 94.67 5.33 38.57 56.10 47.93 3.75 SRO 96.22 3.78 55.42 40.80 58.41 11.34 SOL 97.13 2.87 45.41 51.72 81.24 24.02 TOT 94.18 5.82 58.74 35.44 76.15 24.74 QUT 95.62 4.38 59.43 36.19 66.50 15.42 SUC 96.63 3.37 31.40 65.23 73.07 24.07 RET 95.21 4.79 42.09 53.12 60.50 13.38 SMA 96.78 3.22 64.41 32.37 65.08 15.15 HUE 97.05 2.95 69.43 27.62 55.68 9.57 QUI 97.07 2.93 59.57 37.50 66.47 16.15 BVP 96.33 3.67 59.92 36.41 62.39 22.36 AVP 94.46 5.54 50.45 44.01 77.20 30.20 PET 97.88 2.12 53.12 44.76 62.70 15.54 IZA 96.88 3.12 49.92 46.96 58.38 24.63 ZAC 97.58 2.42 41.76 55.82 61.48 24.96 CHQ 97.93 2.07 47.66 50.27 66.01 22.03 JAL 97.90 2.10 42.62 55.28 73.43 18.88 JUT 97.51 2.49 52.56 44.95 48.92 14.31 PobrezaNoExtrema NoPobreza GTM 36.88 58.96 PRO 37.05 56.58 SAC 50.74 38.57 CHM 49.68 31.73 ESC 44.18 52.07 SRO 47.07 41.59 SOL 57.22 18.76 TOT 51.41 23.85 QUT 51.08 33.50 SUC 49.00 29.93 RET 47.12 39.50 SMA 49.93 34.92 HUE 46.11 44.32 QUI 50.32 33.53 BVP 40.03 37.61 AVP 47.00 22.80 PET 47.16 37.30 IZA 33.75 41.62 ZAC 36.52 38.52 CHQ 33.98 33.99 JAL 54.55 26.57 JUT 34.61 51.08 > fit <- principal(y, nfactors=par1, rotate='varimax') Loading required package: GPArotation The determinant of the smoothed correlation was zero. This means the objective function is not defined for the null model either. The Chi square is thus based upon observed correlations. In factor.stats, the correlation matrix is singular, an approximation is used In factor.scores, the correlation matrix is singular, an approximation is used I was unable to calculate the factor score weights, factor loadings used instead Warning messages: 1: In log(det(m.inv.r)) : NaNs produced 2: In cor.smooth(r) : Matrix was not positive definite, smoothing was done 3: In cor.smooth(r) : Matrix was not positive definite, smoothing was done > fit Principal Components Analysis Call: principal(r = y, nfactors = par1, rotate = "varimax") Standardized loadings (pattern matrix) based upon correlation matrix RC1 RC2 RC6 RC4 RC5 RC3 h2 u2 Delitos 0.32 0.51 0.17 0.46 0.32 0.31 0.81 0.195 Capturas_Delitos 0.18 0.60 0.09 0.48 0.35 0.27 0.83 0.172 Armas_robadas 0.85 0.26 0.18 -0.07 -0.12 0.12 0.86 0.144 Homicidios 0.92 0.05 0.28 -0.06 0.14 0.16 0.98 0.024 OtrasMuertes 0.82 0.42 0.22 0.12 0.16 0.18 0.97 0.034 HArmaFuego_M 0.89 0.07 0.32 -0.03 0.16 0.15 0.95 0.048 HArmaFuego_F 0.79 0.20 0.42 -0.02 0.09 0.19 0.89 0.109 HNoArmaFuegoM 0.85 -0.03 0.09 -0.08 0.07 0.23 0.80 0.200 HNoArmaFuegoF 0.93 0.06 -0.20 -0.06 0.05 -0.03 0.92 0.084 OtrasMuertesT 0.82 0.42 0.22 0.12 0.16 0.18 0.97 0.034 OtrasMuertesH 0.83 0.38 0.20 0.11 0.20 0.19 0.97 0.033 OtrasMuertesM 0.71 0.54 0.27 0.13 0.00 0.10 0.90 0.096 DensidadPoblaci\363n -0.37 0.19 -0.74 0.19 -0.20 -0.06 0.80 0.205 Etnicidad -0.69 -0.16 -0.25 0.26 -0.44 -0.21 0.86 0.137 Juventud -0.46 -0.77 -0.19 -0.18 -0.09 -0.08 0.89 0.106 Escolaridad 0.42 0.70 -0.01 0.09 0.48 0.05 0.91 0.092 Alfabetismo 0.50 0.67 -0.03 0.00 0.44 0.05 0.90 0.100 Matriculaci\363n 0.03 0.59 -0.05 0.34 0.53 0.03 0.75 0.246 Urbanidad 0.03 0.86 -0.25 0.26 0.12 0.06 0.89 0.112 IH 0.43 0.77 0.25 -0.16 0.01 -0.21 0.90 0.096 ICV 0.23 0.81 0.09 -0.04 0.26 0.13 0.81 0.188 ISP -0.11 0.89 0.06 -0.09 0.02 0.17 0.85 0.154 IBH 0.18 0.94 0.13 -0.10 0.13 0.06 0.96 0.038 Ocupados 0.09 -0.01 0.06 -0.97 -0.03 0.03 0.96 0.040 Desocupados -0.09 0.01 -0.06 0.97 0.03 -0.03 0.96 0.040 Subocupados -0.39 -0.16 0.08 -0.06 0.07 -0.88 0.97 0.031 OcupadosPlenos 0.40 0.16 -0.07 -0.06 -0.07 0.88 0.97 0.028 PobrezaTotal -0.31 -0.39 -0.63 -0.07 -0.54 0.18 0.97 0.027 PobrezaExtrema -0.07 -0.39 -0.20 -0.07 -0.81 0.14 0.88 0.122 PobrezaNoExtrema -0.53 -0.13 -0.74 0.03 0.09 0.14 0.87 0.134 NoPobreza 0.30 0.39 0.63 0.07 0.55 -0.14 0.97 0.027 RC1 RC2 RC6 RC4 RC5 RC3 SS loadings 9.57 7.68 2.90 2.81 2.71 2.23 Proportion Var 0.31 0.25 0.09 0.09 0.09 0.07 Cumulative Var 0.31 0.56 0.65 0.74 0.83 0.90 Proportion Explained 0.34 0.28 0.10 0.10 0.10 0.08 Cumulative Proportion 0.34 0.62 0.72 0.82 0.92 1.00 Test of the hypothesis that 6 components are sufficient. The degrees of freedom for the null model are 465 and the objective function was 285.38 The degrees of freedom for the model are 294 and the objective function was NaN The total number of observations was 22 with MLE Chi Square = NaN with prob < NaN Fit based upon off diagonal values = 1> fs <- factor.scores(y,fit) Warning messages: 1: In cor.smooth(r) : Matrix was not positive definite, smoothing was done 2: In factor.scores(y, fit) : The tenBerge based scoring could not invert the correlation matrix, regression scores found instead > fs $scores RC1 RC2 RC6 RC4 RC5 RC3 GTM 0.3975723 2.06782003 1.25475642 1.4232034 0.781820087 0.01391738 PRO 0.2563138 0.52212329 0.75270666 -0.4864310 1.175826358 -0.67106661 SAC -0.3315078 2.10527434 -1.81984006 -0.4422210 0.391291820 -0.10803682 CHM -0.7524228 0.79015487 -0.63198073 -0.6525183 -0.216488985 -0.20047991 ESC 0.9734359 0.14476857 0.70174730 1.8058633 1.185753581 1.44867388 SRO 2.0334534 -0.64082019 -1.25319135 0.3825963 1.130168791 -1.31475288 SOL -1.1408378 0.41160100 -1.18383945 -0.5818057 -0.998419722 0.95120571 TOT -0.2809622 -0.39845597 -1.23909742 1.7201463 -1.313128457 -1.33436968 QUT -0.2806655 1.00835020 -1.00391573 0.6145191 0.005934854 -0.92763485 SUC -0.6348096 0.17771420 -0.08204619 -0.1651473 -0.372584068 2.77652520 RET -0.3849686 -0.28578148 -0.03917406 0.7740584 0.964546637 1.19813949 SMA -0.9695493 -0.37879268 -0.37587229 -0.5495503 0.958780402 -0.89117888 HUE -1.4765041 -0.44449890 1.23048521 -0.5951274 0.377596373 -1.18299121 QUI -1.3086517 -0.66965332 0.81892446 -0.3811367 -0.617409613 -0.31131703 BVP -0.7165312 0.01125417 1.18283635 0.1399885 -0.775038811 -0.70680377 AVP -0.4516407 -2.03480355 -0.30779420 2.1063871 -0.962904993 0.28687250 PET 0.1311736 -1.69062674 -0.12732579 -0.9752526 1.611852527 0.21992865 IZA 0.6796673 0.13870089 1.29906202 -0.2046885 -1.123067644 -0.09553268 ZAC 1.6864507 0.72511178 0.59248028 -0.8549167 -1.997986124 0.20278815 CHQ 1.9596226 -0.66486356 -0.04220022 -0.8934416 -1.063180675 -0.15058796 JAL 0.5369338 -0.85330331 -1.13185063 -1.4396956 0.347394913 0.97662134 JUT 0.0744282 -0.04127366 1.40512943 -0.7448294 0.509242749 -0.17992002 $weights RC1 RC2 RC6 RC4 Delitos -0.056783839 0.013945794 0.053951484 1.408761e-01 Capturas_Delitos -0.048391240 0.029335425 0.066227485 1.203214e-01 Armas_robadas 0.126543094 0.034926494 -0.018159298 1.449416e-02 Homicidios 0.238595537 -0.071158129 0.029035133 -2.321969e-02 OtrasMuertes 0.146550670 0.040591354 -0.010229747 6.791533e-02 HArmaFuego_M 0.060734214 -0.085083786 0.004501243 4.196052e-05 HArmaFuego_F 0.045761626 0.002012634 0.141854161 2.598349e-02 HNoArmaFuegoM 0.139266915 -0.082275632 -0.107749123 -1.654339e-02 HNoArmaFuegoF 0.278028510 -0.040281888 -0.341859432 -1.261290e-02 OtrasMuertesT 0.123581307 0.033351292 -0.015205496 5.214422e-02 OtrasMuertesH 0.039701451 -0.046543741 -0.060540462 3.450391e-02 OtrasMuertesM 0.044466145 0.071792243 0.051391921 5.433165e-02 DensidadPoblaci\363n 0.083783352 0.084223938 -0.358734884 3.635775e-02 Etnicidad -0.034631395 0.089329812 0.077241550 1.183653e-01 Juventud -0.017283851 -0.123462617 -0.047570310 -3.618682e-02 Escolaridad 0.030296859 0.052148020 -0.136819915 -2.436236e-02 Alfabetismo 0.083937293 0.027738779 -0.211581322 -7.869203e-02 Matriculaci\363n -0.018925481 0.022120773 -0.105537496 5.636018e-02 Urbanidad 0.005218628 0.168873493 -0.144191464 3.928723e-02 IH 0.020306407 0.133036643 0.015299776 -4.904555e-02 ICV -0.066168515 0.064036843 -0.015010084 -5.977735e-02 ISP -0.134778663 0.161538015 0.132856397 -8.715374e-02 IBH -0.026200965 0.372342089 0.066422406 -9.250859e-02 Ocupados -0.026314976 0.039843019 -0.023647004 -3.889747e-01 Desocupados 0.026348995 -0.043386543 0.023710236 3.850452e-01 Subocupados 0.077034934 0.019930888 -0.046755588 4.058406e-03 OcupadosPlenos -0.067468013 -0.010570510 0.040594558 -4.337239e-02 PobrezaTotal 0.082978143 0.007533585 -0.232204322 -9.422686e-03 PobrezaExtrema 0.061518441 0.094464671 0.090586036 4.763049e-02 PobrezaNoExtrema 0.028948504 -0.033498483 -0.344062886 -6.570208e-02 NoPobreza -0.015368868 0.013369169 0.266781486 2.799980e-03 RC5 RC3 Delitos 0.052551766 0.1533446878 Capturas_Delitos 0.086954941 0.1274244384 Armas_robadas -0.182768021 -0.0693784808 Homicidios 0.052736129 -0.0143098549 OtrasMuertes -0.023121003 0.0032601690 HArmaFuego_M 0.028412004 -0.0297576796 HArmaFuego_F -0.058530124 0.0494714725 HNoArmaFuegoM 0.057693172 0.0006767908 HNoArmaFuegoF 0.050321659 -0.2426150002 OtrasMuertesT -0.042547197 -0.0049981993 OtrasMuertesH -0.003265434 -0.0131223575 OtrasMuertesM -0.187585766 -0.0706737381 DensidadPoblaci\363n -0.045719678 -0.1345986425 Etnicidad -0.262080481 -0.0955965134 Juventud 0.165543591 0.0596897283 Escolaridad 0.228980153 -0.0594841910 Alfabetismo 0.140156527 -0.0627896509 Matriculaci\363n 0.224445045 0.0159694226 Urbanidad -0.053286939 -0.0538328400 IH -0.237989023 -0.1943710227 ICV -0.004641971 0.0378673600 ISP -0.161434640 0.1000628704 IBH -0.075808390 0.0063427907 Ocupados 0.066832217 0.0477530784 Desocupados -0.071993964 -0.0403135397 Subocupados 0.014924905 -0.4713073466 OcupadosPlenos 0.004314701 0.4704517350 PobrezaTotal -0.172363367 0.0525114632 PobrezaExtrema -0.417522516 0.0127766255 PobrezaNoExtrema 0.286203593 0.0634961549 NoPobreza 0.178793762 -0.0046587702 $r.scores RC1 RC2 RC6 RC4 RC5 RC1 1.000000e+00 6.797016e-16 7.844745e-16 5.223198e-16 8.200600e-16 RC2 5.535767e-16 1.000000e+00 7.744321e-16 -1.502881e-15 4.408027e-16 RC6 5.867880e-16 7.831794e-16 1.000000e+00 -5.310750e-16 1.465780e-15 RC4 4.542662e-16 -1.480780e-15 -5.402444e-16 1.000000e+00 -6.639485e-16 RC5 9.331355e-16 5.445808e-16 1.505726e-15 -6.612115e-16 1.000000e+00 RC3 1.530755e-15 5.032251e-16 -6.230266e-16 -1.620975e-15 -1.596915e-15 RC3 RC1 1.566214e-15 RC2 4.700753e-16 RC6 -5.950959e-16 RC4 -1.658277e-15 RC5 -1.538401e-15 RC3 1.000000e+00 $R2 RC1 RC2 RC6 RC4 RC5 RC3 1 1 1 1 1 1 > postscript(file="/var/wessaorg/rcomp/tmp/1ejpw1396476868.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > fa.diagram(fit) > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/2rfzi1396476868.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(fs$scores,pch=20) > text(fs$scores,labels=rownames(y),pos=3) > dev.off() null device 1 > > #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Rotated Factor Loadings',par1+1,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Variables',1,TRUE) > for (i in 1:par1) { + a<-table.element(a,paste('Factor',i,sep=''),1,TRUE) + } > a<-table.row.end(a) > for (j in 1:length(fit$loadings[,1])) { + a<-table.row.start(a) + a<-table.element(a,rownames(fit$loadings)[j],header=TRUE) + for (i in 1:par1) { + a<-table.element(a,round(fit$loadings[j,i],3)) + } + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/36u2z1396476868.tab") > > try(system("convert tmp/1ejpw1396476868.ps tmp/1ejpw1396476868.png",intern=TRUE)) character(0) > try(system("convert tmp/2rfzi1396476868.ps tmp/2rfzi1396476868.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.199 0.922 4.100