R version 2.13.0 (2011-04-13) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-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. > par5 = 'COLLES preferred' > par4 = 'all' > par3 = 'prep' > par2 = 'all' > par1 = '2' > par5 <- 'COLLES preferred' > par4 <- 'all' > par3 <- 'prep' > par2 <- 'all' > par1 <- '2' > #'GNU S' R Code compiled by R2WASP v. 1.2.291 () > #Author: root > #To cite this work: Wessa P., 2012, Factor Analysis for Information Management 2 (v1.0.7) 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) > x <- as.data.frame(read.table(file='http://www.wessa.net/download/utaut.csv',sep=',',header=T)) > x$U25 <- 6-x$U25 > if(par2 == 'female') x <- x[x$Gender==0,] > if(par2 == 'male') x <- x[x$Gender==1,] > if(par3 == 'prep') x <- x[x$Pop==1,] > if(par3 == 'bachelor') x <- x[x$Pop==0,] > if(par4 != 'all') { + x <- x[x$Year==as.numeric(par4),] + } > cAc <- with(x,cbind( A1, A2, A3, A4, A5, A6, A7, A8, A9,A10)) > cAs <- with(x,cbind(A11,A12,A13,A14,A15,A16,A17,A18,A19,A20)) > cA <- cbind(cAc,cAs) > cCa <- with(x,cbind(C1,C3,C5,C7, C9,C11,C13,C15,C17,C19,C21,C23,C25,C27,C29,C31,C33,C35,C37,C39,C41,C43,C45,C47)) > cCp <- with(x,cbind(C2,C4,C6,C8,C10,C12,C14,C16,C18,C20,C22,C24,C26,C28,C30,C32,C34,C36,C38,C40,C42,C44,C46,C48)) > cC <- cbind(cCa,cCp) > cU <- with(x,cbind(U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33)) > cE <- with(x,cbind(BC,NNZFG,MRT,AFL,LPM,LPC,W,WPA)) > cX <- with(x,cbind(X1,X2,X3,X4,X5,X6,X7,X8,X9,X10,X11,X12,X13,X14,X15,X16,X17,X18)) > if (par5=='ATTLES connected') x <- cAc > if (par5=='ATTLES separate') x <- cAs > if (par5=='ATTLES all') x <- cA > if (par5=='COLLES actuals') x <- cCa > if (par5=='COLLES preferred') x <- cCp > if (par5=='COLLES all') x <- cC > if (par5=='CSUQ') x <- cU > if (par5=='Learning Activities') x <- cE > if (par5=='Exam Items') x <- cX > ncol <- length(x[1,]) > for (jjj in 1:ncol) { + x <- x[!is.na(x[,jjj]),] + } > par1 <- as.numeric(par1) > nrows <- length(x[,1]) > rownames(x) <- 1:nrows > y <- x > fit <- principal(y, nfactors=par1, rotate='varimax') > fit Principal Components Analysis Call: principal(r = y, nfactors = par1, rotate = "varimax") Standardized loadings based upon correlation matrix RC1 RC2 h2 u2 C2 0.56 0.16 0.34 0.66 C4 0.74 0.11 0.56 0.44 C6 0.72 0.07 0.52 0.48 C8 0.72 0.08 0.52 0.48 C10 0.60 0.22 0.40 0.60 C12 0.67 0.15 0.47 0.53 C14 0.52 0.19 0.30 0.70 C16 0.47 0.17 0.25 0.75 C18 0.36 0.52 0.39 0.61 C20 0.22 0.54 0.35 0.65 C22 0.17 0.68 0.50 0.50 C24 0.25 0.62 0.45 0.55 C26 0.58 0.37 0.47 0.53 C28 0.45 0.35 0.33 0.67 C30 0.61 0.27 0.44 0.56 C32 0.54 0.36 0.42 0.58 C34 0.18 0.71 0.54 0.46 C36 0.15 0.75 0.58 0.42 C38 0.21 0.70 0.54 0.46 C40 0.08 0.63 0.40 0.60 C42 0.51 0.40 0.42 0.58 C44 0.44 0.39 0.34 0.66 C46 0.61 0.20 0.41 0.59 C48 0.51 0.26 0.33 0.67 RC1 RC2 SS loadings 5.83 4.44 Proportion Var 0.24 0.18 Cumulative Var 0.24 0.43 Test of the hypothesis that 2 factors are sufficient. The degrees of freedom for the null model are 276 and the objective function was 10.36 The degrees of freedom for the model are 229 and the objective function was 2.72 The number of observations was 426 with Chi Square = 1130.21 with prob < 4.6e-119 Fit based upon off diagonal values = 0.95> fs <- factor.scores(y,fit) > fs RC1 RC2 1 -0.7524015260 0.359872230 2 -0.6764130115 0.257661202 3 -0.6279882797 -0.037571534 4 -0.6923745377 -1.972866463 5 0.0964173006 1.178599291 6 -0.8624316707 0.589759022 7 -0.7061136057 0.137195781 8 -1.3918156927 1.243588881 9 -1.4058143957 0.753169865 10 -0.7212706293 -0.585615889 11 0.8903008679 -0.815763542 12 -1.9474615946 0.263291784 13 0.2081783764 0.583571847 14 -0.6704936797 -0.499250215 15 0.4582847378 0.841728208 16 -0.3849783429 0.051330902 17 -0.9605250634 0.317654778 18 1.7370364541 0.277865385 19 -0.4107369853 -0.280379489 20 -1.2365422344 0.259019030 21 -0.6618216636 -0.859368871 22 -1.0086809555 -1.061724348 23 -1.4768127744 -1.085398297 24 -0.5320591349 0.227701986 25 -2.0003392737 1.008821480 26 2.9684144895 -3.877171675 27 0.1314226572 0.077282845 28 -1.9749676833 -2.112969271 29 -1.7777540662 0.598465696 30 -1.2126049851 0.240316696 31 -0.3547030396 -0.183387497 32 -0.8319245590 0.663809903 33 0.0603130965 -1.208446464 34 -0.9898304653 -1.424791358 35 -0.8338971421 -1.129887151 36 0.0367276888 0.751343879 37 0.6248958923 -1.138403185 38 0.0669489656 0.031576221 39 -1.2611545927 0.140918127 40 -0.8647943031 -1.090116466 41 -0.4800514114 0.416949955 42 0.7999019373 -0.270132486 43 -0.8646083696 1.240233238 44 -1.0611780430 0.428789712 45 -2.5191122245 0.555008373 46 0.7255207635 -1.242541590 47 0.1298879412 -0.562236977 48 -1.3438981382 -1.174938076 49 -0.9782621013 -1.672113048 50 0.7624141895 -1.161155300 51 0.0438728514 -0.519641334 52 1.4053196956 -2.531703611 53 -1.4648492913 -0.591836882 54 0.6373168607 0.943902475 55 -0.7418556870 -2.002153060 56 0.8644033314 -0.642052412 57 0.5288010173 -0.961562576 58 -0.8307918415 -0.620259452 59 -0.7024357943 -0.716019534 60 -0.5073187686 0.544726626 61 0.0055081787 -0.832933690 62 -0.7121089184 0.229551581 63 -2.3693219918 0.259015935 64 -1.2069350522 0.358510827 65 0.4531430935 -0.490817956 66 0.0984105485 -2.008346813 67 -0.0667809222 0.469010636 68 -1.6506320284 -0.024616239 69 -0.2999957073 0.352950360 70 -0.1237958273 -0.558967050 71 -0.2071153038 -2.364371993 72 0.4756586410 -2.130060901 73 0.0096980832 -0.483697270 74 -1.6518056493 0.188865571 75 -0.9212470494 1.301339581 76 0.5858283971 0.405636481 77 0.1856913833 -0.065058236 78 -0.7595169301 -0.043996039 79 0.1451484041 0.100993368 80 0.4508666893 0.963188879 81 0.3901047884 -1.149970647 82 -1.1981608262 0.377089914 83 -0.1134026508 0.540405856 84 0.0492401776 -1.526993945 85 -1.1013378535 1.687948413 86 1.6455680287 -0.210715987 87 -0.1469579508 0.913225144 88 1.0908540042 0.579396717 89 1.5501546103 -1.142741134 90 -0.5285062392 0.153651061 91 0.3501113393 0.035887056 92 -0.6634868846 -1.167707319 93 0.2159315310 -0.073297630 94 -0.1640197510 -0.068185224 95 -1.5543179517 1.095696982 96 0.4299755061 0.232875299 97 -0.5321096248 -0.451813493 98 0.1456177480 -1.904078096 99 -0.1793925501 0.112903250 100 0.5208452893 0.737538142 101 -0.8107294580 -1.071182764 102 -0.8127507409 0.133582484 103 0.1578058386 -0.303982556 104 -0.3230306447 0.092575565 105 -1.3047508879 0.181704474 106 -2.2906119595 -0.511787086 107 -1.0166940093 -0.525290416 108 -0.2272739134 1.407143791 109 -1.4520580410 1.018469693 110 -0.3846790243 0.044564338 111 -0.6342206497 0.916115811 112 -0.1434476056 -0.547817565 113 0.0854093373 0.831757182 114 -0.5142205619 -0.945704506 115 0.1215163329 -0.703368925 116 -0.0456588669 -0.477925488 117 -0.8147353517 0.127423677 118 -2.8879667739 -2.016521145 119 -0.4346020844 -0.045533270 120 -0.4092315391 0.364667274 121 -1.2245663553 -0.298480815 122 -0.2926204657 -1.377010049 123 -0.5049784519 -2.155913402 124 -1.0810268777 -0.412492459 125 -0.1213581124 1.002870745 126 -0.8709525666 -0.251201460 127 1.0605050400 0.118210306 128 -0.4760688179 0.069047930 129 0.3963132671 -0.062103530 130 -0.7664303208 -0.849391850 131 -1.7211368552 -0.565599774 132 -0.9099233088 0.809274247 133 -0.8387226800 1.037677588 134 0.3959633469 -0.682980208 135 -0.4483737160 0.918082060 136 0.1343576886 1.147732654 137 -0.9846464206 -0.409637218 138 0.2621719377 0.458833714 139 -1.8986910468 1.168218176 140 0.6643082284 -0.244116576 141 0.4913848975 -1.389673772 142 0.2192042177 -0.310061997 143 -1.6903503018 -0.413309592 144 0.2889264477 0.991422721 145 0.1364598951 -0.156942353 146 -0.3571769041 0.957142473 147 -0.1728932414 0.364958755 148 -0.1857019299 -0.194160495 149 -1.8318480153 0.039488655 150 -1.1964189306 0.402914255 151 0.2301150536 -0.535155152 152 -0.9915847790 2.864176841 153 -1.3053119903 -0.188954902 154 -0.5058003856 0.707057155 155 0.5052379221 0.124744817 156 0.4158322201 0.367879675 157 -0.3370245982 0.036944500 158 1.5758128666 -0.529106419 159 0.7115555321 0.999403012 160 -1.7743941237 -0.109533852 161 -1.7523947074 1.368222468 162 -0.3863088240 -0.931818490 163 -1.4617980314 -2.798241110 164 -0.2002125747 0.071404237 165 -0.2789725296 0.519896065 166 0.0684837775 0.052396308 167 0.9694732739 0.580943441 168 -0.1375999557 0.824064107 169 -1.3509003189 -0.012096114 170 0.1751299309 -0.618136748 171 0.2248961214 2.227995078 172 -0.5132369171 1.800222313 173 -1.6256051476 -0.805901008 174 0.0006937352 0.257551637 175 -0.5154321999 -0.967017866 176 -1.1721414955 -0.200644885 177 0.3375692530 1.696700725 178 -1.0253626445 1.089750065 179 0.6264793668 -0.663268349 180 0.1729164301 -0.553811374 181 -0.4141592365 -0.943166272 182 -1.3586472621 0.009842228 183 -0.1566325378 0.294524629 184 -1.6872216362 1.257696382 185 0.3839369084 0.377578713 186 -1.1348430240 0.222749725 187 -1.2118213058 -1.029595442 188 -0.5317447789 -1.993980436 189 -0.1611859298 -0.228714386 190 -0.2957322715 -0.618934957 191 -1.3404930100 -0.197256021 192 -1.7528285781 -0.299593341 193 -1.0886442814 0.002946922 194 0.5270391062 0.838068947 195 -0.0451700917 -0.897212727 196 -0.4526307916 -2.702078198 197 0.9904964297 0.759954216 198 -0.4978695232 -0.058886494 199 1.2030149293 0.052212350 200 1.8001660156 -0.358804283 201 0.0167236003 -0.589940867 202 0.6142617312 -1.455238712 203 -0.4367996431 0.108697702 204 -0.4738768357 0.812714996 205 -0.7837500250 0.104927060 206 0.3729191106 -0.102154161 207 0.1058294741 -0.264833130 208 -0.2724747822 -0.180349655 209 1.1467606258 0.994038155 210 -0.2549081354 -1.158288938 211 0.9093382455 -0.452206712 212 -0.7440867054 -0.423088711 213 0.7172045173 1.569229956 214 -2.5240898055 0.719070478 215 -0.4921248246 -0.236126196 216 0.3870747055 -0.066073634 217 0.4809042396 -0.870428549 218 -0.7595907372 0.075134721 219 -0.2464095195 -0.751193067 220 -0.6439552598 1.222848560 221 0.1014077033 2.258543805 222 0.0749570750 -1.348423824 223 -0.2989842793 -1.252459926 224 -0.0886518101 -0.991829780 225 0.6578566241 1.042047521 226 1.6346416458 -0.137647797 227 0.3638998370 0.189316991 228 0.8173087541 -3.424121694 229 -0.3046753303 -0.851021500 230 0.1240373413 0.949613416 231 0.8899559648 0.879416625 232 0.4166261596 0.833008898 233 2.9073873489 -2.157737967 234 1.4888053790 0.304568582 235 0.4289668757 0.760467814 236 0.6696239744 0.747579088 237 -0.4832974342 0.120320116 238 0.5107791164 -1.513862083 239 -0.2703349935 0.855137793 240 1.0110449050 -0.053608458 241 -0.1893886243 0.158848756 242 -1.7122497100 -0.363261605 243 0.9831728580 0.339017240 244 0.4365898558 0.099610377 245 1.8543420213 -1.190749569 246 0.3681672034 0.342876842 247 -0.3443322027 -1.026662143 248 1.3206221604 0.011305605 249 1.3506974906 0.088188362 250 0.5560398395 -0.357116094 251 1.5014186098 -1.091234963 252 -1.5441941205 -1.043685431 253 -0.8718723966 0.374256837 254 -0.8107788234 0.248125201 255 -0.6152122473 -0.416443055 256 -0.3546849687 0.167964289 257 -0.7834984178 -1.986683187 258 0.4661794652 -1.108628864 259 -0.1104201092 -1.577027316 260 0.9646160097 1.706858158 261 -1.0022321407 -1.686845320 262 -0.0428498353 -0.001064993 263 -0.2282749634 0.680961917 264 1.4944695218 1.570624247 265 0.1708727913 0.048616823 266 0.9624184648 0.563425733 267 0.6488965280 0.395331206 268 1.3711116128 0.219478774 269 0.1355068982 0.144652011 270 -0.6666991734 -0.185532902 271 1.2192924681 0.514755746 272 -1.8929932601 -0.885532951 273 0.6461492853 -0.334057922 274 0.4272853000 -2.046998926 275 1.3850997011 0.232553848 276 -1.4691449651 -0.451010216 277 1.2208958619 0.666380480 278 0.5480271482 0.184386625 279 2.5005279909 -1.054927207 280 1.6500314159 1.268974012 281 0.4690751965 2.019217725 282 0.0530488719 -0.182549675 283 1.1927031155 -0.309783024 284 0.2892766950 0.962171334 285 0.4888546565 1.293785199 286 0.0167311871 0.783706535 287 0.5064032977 0.751017078 288 0.8921597899 0.369324301 289 0.5007128338 -0.086945768 290 0.2382949378 -1.444233287 291 0.7180732181 1.171242652 292 0.4891937348 -1.210684456 293 -2.0233010109 0.535785392 294 0.5320105000 -0.755964831 295 0.0632810549 0.529726660 296 0.3592083480 0.729152901 297 1.3876366051 -1.350825729 298 2.1625853074 -0.433255916 299 0.9754987199 -1.385866030 300 -0.3980942153 -0.059191885 301 1.3117899713 0.239033818 302 -1.1814309145 1.015390671 303 1.8572869420 -1.517037580 304 -0.0910758541 0.309068440 305 0.9387176883 2.226036760 306 -2.2319933651 -0.206420203 307 -1.1770880476 0.250581147 308 -0.4447106893 0.923588711 309 -0.6526722017 -0.734864473 310 1.2284959902 0.273878513 311 -0.0508054824 0.786381526 312 0.4891858015 1.819618945 313 0.8836386053 0.533807511 314 0.4851194792 2.497412760 315 -0.4496756360 0.444364408 316 0.1278033757 1.012248794 317 1.1274745596 0.835149124 318 -0.7548277578 -1.008151585 319 -0.5846833913 0.846760271 320 1.3414410820 0.074406572 321 -0.1372203894 0.432686038 322 -1.3164013011 -0.406808415 323 0.3233919973 -0.860539092 324 -2.4762636846 -0.750829225 325 -0.4622770549 0.769384124 326 1.2875902979 1.805602435 327 0.5290720151 -1.521887969 328 0.5255210149 0.090162904 329 -1.3802410215 -0.084621358 330 0.2115103016 0.325590003 331 0.1703534700 0.662479849 332 1.3529764443 1.982782532 333 0.9663044894 1.132659139 334 1.7790032631 0.421608648 335 -0.8253107314 1.344881119 336 -0.1233970980 -0.149655930 337 -0.0857968873 0.213273129 338 1.7790809325 -0.071073995 339 -1.0939182893 -0.142893043 340 0.0797673379 1.512768323 341 0.7429421224 0.309189934 342 1.5224431832 1.252760742 343 1.2873222989 -0.225870274 344 0.4075624425 -0.338823913 345 0.2956990597 -0.900965225 346 0.3727480578 -0.234446747 347 -0.9684544198 1.206767391 348 0.2161136641 1.770001617 349 1.3887687994 0.241615309 350 1.1956638264 -0.690589543 351 0.9230901838 -0.416970971 352 1.1872828145 1.928929142 353 1.7313219994 -0.275054354 354 -1.0362890991 0.659245028 355 0.8549164543 1.082360855 356 -0.4450166077 0.465037409 357 -0.9496865723 0.118915734 358 0.1027249471 -0.534586712 359 0.7479175726 0.163277912 360 1.0577114403 -1.001609032 361 1.0454083000 2.103098491 362 0.8353176786 0.383718916 363 0.6075691175 0.808329631 364 0.8011409981 0.624420380 365 -0.0016850330 0.287700051 366 1.3443204556 -3.328938924 367 0.2707771875 2.047756080 368 0.3411662759 1.465683085 369 1.8038955214 0.814463201 370 0.6271856341 -0.309160557 371 1.2171563698 -0.273819353 372 -0.0042400230 1.480823387 373 -0.0155236460 -0.854568576 374 -0.5672912217 0.126009721 375 -1.1944454806 0.663230689 376 -0.4038205823 0.940010739 377 1.3751388284 0.123659398 378 0.8440600384 0.743813565 379 0.5603923076 -0.704870889 380 1.8680713964 -1.291778779 381 -0.4095420308 -0.032407738 382 1.4158219198 0.780375528 383 0.9568766992 -0.864878576 384 0.0899610005 -0.271683086 385 1.4776395101 1.813405691 386 1.3769178688 -0.652580423 387 1.3606443586 1.744220257 388 1.0735503101 -1.184243714 389 0.7754698544 -0.262965236 390 1.7198758919 0.786009035 391 1.0600130360 0.265615964 392 1.0866283667 0.723309886 393 1.6048176605 -3.103495971 394 1.6883546826 -1.118455927 395 0.2982180372 0.353762581 396 1.2165559911 1.240083558 397 -0.0611079637 0.880121572 398 1.2062534493 -1.109756669 399 -0.2679954202 1.128306532 400 0.5761280184 -0.408442470 401 -0.4732274700 -0.586949407 402 1.1160349656 0.717617775 403 -1.6418114031 -0.331221675 404 -0.9931695066 -0.340274807 405 0.8176809398 -1.900169121 406 -0.5898005802 -0.059084443 407 -0.3029552316 0.655858448 408 -0.4763024076 1.188247746 409 1.4776286666 1.947721555 410 0.3655798504 1.930531893 411 1.2409924318 0.941692771 412 0.4755985175 -0.035542283 413 -1.2125484048 -0.985033650 414 1.3366261657 0.158370098 415 -1.5841829721 0.876248020 416 1.0275924149 0.465799673 417 1.6254997268 -0.371405580 418 1.8381971854 -1.008094721 419 0.9701395310 0.410915377 420 0.0745102515 -0.692107605 421 -1.3326058215 0.101961526 422 0.1606872858 0.379297145 423 0.3816501313 1.215076579 424 2.1945917466 -0.038765848 425 -0.6449707076 -0.493952438 426 1.5214669116 1.785051975 > postscript(file="/var/wessaorg/rcomp/tmp/12k8u1335871414.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/29zoe1335871414.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(fs,pch=20) > text(fs,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/3jok01335871414.tab") > > try(system("convert tmp/12k8u1335871414.ps tmp/12k8u1335871414.png",intern=TRUE)) character(0) > try(system("convert tmp/29zoe1335871414.ps tmp/29zoe1335871414.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.969 0.259 1.223