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 = 'CSUQ' > par4 = 'all' > par3 = 'all' > par2 = 'all' > par1 = '2' > par5 <- 'CSUQ' > par4 <- 'all' > par3 <- 'all' > 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 U1 0.68 0.47 0.68 0.32 U2 0.67 0.47 0.66 0.34 U3 0.65 0.37 0.56 0.44 U4 0.54 0.49 0.52 0.48 U5 0.59 0.41 0.51 0.49 U6 0.62 0.41 0.54 0.46 U7 0.59 0.47 0.56 0.44 U8 0.45 0.38 0.35 0.65 U9 0.45 0.49 0.44 0.56 U10 0.40 0.00 0.16 0.84 U11 0.37 0.27 0.22 0.78 U12 0.56 0.10 0.32 0.68 U13 0.61 0.22 0.42 0.58 U14 0.49 0.26 0.30 0.70 U15 0.56 0.31 0.41 0.59 U16 0.65 0.17 0.45 0.55 U17 0.60 0.18 0.39 0.61 U18 0.62 0.24 0.45 0.55 U19 0.52 0.30 0.36 0.64 U20 0.71 0.47 0.72 0.28 U21 0.17 0.81 0.68 0.32 U22 0.22 0.82 0.71 0.29 U23 0.20 0.77 0.63 0.37 U24 0.24 0.74 0.61 0.39 U25 -0.45 -0.46 0.41 0.59 U26 0.32 0.11 0.12 0.88 U27 0.38 0.33 0.25 0.75 U28 0.13 0.77 0.61 0.39 U29 0.26 0.73 0.60 0.40 U30 0.51 0.54 0.55 0.45 U31 0.55 0.46 0.51 0.49 U32 0.53 0.10 0.29 0.71 U33 0.39 0.11 0.17 0.83 RC1 RC2 SS loadings 8.26 6.91 Proportion Var 0.25 0.21 Cumulative Var 0.25 0.46 Test of the hypothesis that 2 factors are sufficient. The degrees of freedom for the null model are 528 and the objective function was 21.36 The degrees of freedom for the model are 463 and the objective function was 6.12 The number of observations was 447 with Chi Square = 2649.16 with prob < 2.5e-302 Fit based upon off diagonal values = 0.97> fs <- factor.scores(y,fit) > fs RC1 RC2 1 0.488953663 -0.122864642 2 1.397120180 1.214742709 3 1.813546594 0.273401193 4 0.742783397 0.870340108 5 0.474289714 1.737617622 6 -1.050855828 0.556578393 7 0.056985249 -0.648884799 8 -1.035971454 0.616181769 9 2.578066238 0.168238065 10 -0.632426410 -0.672366324 11 1.664106868 -0.208851767 12 -0.627267446 1.492958803 13 0.626562740 0.076297090 14 0.096773543 0.536053746 15 -1.265144489 -0.450783260 16 0.402117681 0.024793893 17 0.209379135 1.497496849 18 -0.292041726 1.743858071 19 0.849910129 0.247638639 20 0.454505800 1.116826598 21 0.478195125 -0.094064068 22 0.282327230 0.006506861 23 0.067794809 0.340509307 24 0.237404372 0.617617666 25 0.975265875 -0.699840553 26 1.724277797 -0.083288352 27 0.201519838 0.379577330 28 0.136335402 -0.087615846 29 0.253806397 1.164599777 30 -0.518830216 -1.083515004 31 0.971155089 0.057842325 32 0.905487817 -1.396679118 33 0.737916097 0.038626534 34 -0.613137915 0.061451190 35 -0.309370009 -0.029421583 36 -0.123853064 -0.306490314 37 0.047996512 1.901311353 38 0.971155089 0.057842325 39 0.055368473 -0.822470639 40 -0.539678388 -0.038273944 41 1.722452800 0.611167351 42 0.793124677 0.187675256 43 1.041199434 0.773919361 44 0.376089153 -0.445418687 45 -0.638499304 0.357426682 46 0.454342020 -0.617121567 47 -0.635327138 0.977725660 48 -0.350848870 0.611266651 49 0.766323973 0.732780844 50 -0.864885369 -0.786843845 51 -1.477884999 0.705063103 52 0.579483627 0.118964318 53 0.336386289 0.304864636 54 -0.193032553 1.469045217 55 0.754001826 -0.353858765 56 -0.211014167 -0.672512077 57 -0.624284388 -0.499572814 58 0.451851581 0.365081771 59 0.047674062 1.354724956 60 -2.498558113 0.537201444 61 -0.161301266 0.245621822 62 -0.342298881 -1.005382166 63 0.366033740 0.608319631 64 1.535073024 0.308822641 65 -0.278428066 0.386211505 66 0.880941472 0.384066705 67 -0.325649979 -0.208278564 68 0.722259494 0.876313215 69 -0.229856672 -2.698242279 70 0.641980039 0.648781705 71 0.188114665 0.164279354 72 0.642444940 0.542470592 73 1.857791724 0.188322422 74 -1.903211483 -1.706597360 75 0.595152007 1.530344383 76 -0.294515690 1.328309986 77 -1.247944996 -0.186933403 78 0.841858734 -0.629287139 79 1.687173562 -0.150692278 80 0.023200850 -0.355721549 81 0.533464608 -0.768482402 82 0.235694339 -0.167650231 83 -1.069565394 -0.134742849 84 -3.496991513 1.205761393 85 0.737570643 -0.124439712 86 2.135808113 -0.140346729 87 1.383357879 1.065701565 88 1.117610602 0.160083546 89 -1.567857303 0.512126476 90 -2.386871976 -1.194848684 91 0.260296092 0.869990245 92 -0.890065708 -0.678262214 93 0.292850187 0.375962956 94 0.225850546 0.424020274 95 -0.217036130 -1.301991970 96 0.357918535 0.622467471 97 0.527843386 0.248381121 98 1.144465679 -0.262159769 99 1.180004130 1.206801385 100 0.678234817 0.651724742 101 0.152828503 -0.541059399 102 1.365468072 -0.380364211 103 2.199089121 0.639917025 104 -1.302228551 1.646041838 105 -1.613216356 -1.101373161 106 -1.193568809 0.328932705 107 0.291774460 -0.630601964 108 0.497334613 0.381744064 109 0.894049910 0.763925688 110 0.208960017 0.904977895 111 0.395263525 0.387764820 112 1.191848291 -0.343645711 113 -1.755189868 -0.227189195 114 -1.611722795 1.996025565 115 -0.318991245 0.364016144 116 1.297389442 -2.861615253 117 -1.251135037 0.253998615 118 -0.798705084 -0.777335600 119 -1.370879251 0.651208093 120 0.753372076 -0.251021078 121 -2.719674510 1.619358684 122 -0.396369066 1.735717180 123 0.899637278 -0.372651112 124 -1.465645396 0.274055331 125 0.384542356 -1.576957411 126 -0.455038227 0.926263724 127 0.856587339 -0.285805957 128 0.342930689 0.610981736 129 -0.632426410 -0.672366324 130 0.510344544 0.301011280 131 -0.278053154 -0.751987467 132 -1.206259258 1.000136605 133 -0.182523041 -0.543609136 134 0.026109083 -0.440845798 135 0.231764050 -1.961988451 136 0.299897361 -1.543019920 137 -0.133076309 0.777811297 138 -0.170475670 -0.336311648 139 -1.297388845 0.003897153 140 -1.919933097 0.328677369 141 -0.724312566 0.243032750 142 -1.051645297 0.072484960 143 0.361397715 -0.511555629 144 -1.349115786 -1.008510072 145 0.155784880 0.309061544 146 0.303853820 1.164158678 147 0.434943710 1.766498026 148 1.344109393 1.286985894 149 0.351275107 0.143219475 150 -1.071350907 -0.369321899 151 1.068459313 -0.905861444 152 0.532041201 -0.068553934 153 -0.090392269 -0.159880730 154 0.903716494 -0.245236981 155 -2.644173692 -1.505111115 156 0.262292306 0.093872437 157 -0.319465244 0.611300610 158 -1.415143277 1.336115521 159 -1.101233851 1.185680775 160 -0.094070849 0.931346313 161 -0.578102073 -1.384017408 162 1.255921442 0.861140322 163 -0.354145176 0.277192862 164 -0.472312236 -0.575886383 165 -0.388995983 -1.741635813 166 1.504556359 -0.047436011 167 -0.204154065 -0.328910566 168 -0.782646635 1.550176042 169 0.538041587 -0.163922426 170 -0.251706392 0.114203581 171 -0.346707436 0.084224977 172 0.274377332 -0.236929611 173 2.083794573 -0.481144008 174 -1.146941977 -0.187199720 175 0.410855460 0.483267887 176 -1.033416397 -0.027635950 177 0.479786704 -0.444050055 178 -0.012380861 1.125657197 179 -0.629796704 1.501613549 180 0.235621537 -0.058911731 181 -1.176817290 -1.598200357 182 0.785421543 -0.588261294 183 0.156108574 -0.065818673 184 -1.637872599 -0.831292855 185 -1.354394977 -1.825647684 186 -0.152961512 -1.766799239 187 0.178845557 -0.024221102 188 0.151263406 -1.397017016 189 -3.735986123 -2.159469163 190 -1.337936562 1.002255506 191 -0.708046382 -0.958080476 192 1.246768560 0.899273545 193 -0.013593355 0.471285110 194 -0.575840808 1.303106969 195 -0.305276003 1.631906349 196 -0.272756929 -0.434682323 197 0.659917487 -0.523368875 198 0.944526758 -1.250805249 199 -0.753350227 -2.033467410 200 -1.695528961 -0.509534896 201 0.813530406 -0.094109591 202 0.414706555 0.346830208 203 0.889900396 -1.065073635 204 -0.854947687 0.950867784 205 -1.026796695 -0.548845743 206 1.220058700 0.069965358 207 0.556095599 -1.477358907 208 1.273765822 -1.623363583 209 -0.096998972 1.309516248 210 1.066519815 0.065038639 211 0.785992329 0.762698845 212 0.364985893 -2.789237327 213 -0.869957562 -1.280206276 214 -1.088391685 -0.655724481 215 0.123392404 1.590428011 216 0.294705679 0.557527528 217 -0.078174459 -1.017373232 218 1.070695439 0.702119625 219 -0.418445291 -1.710771163 220 -1.989752907 -1.462163938 221 -0.647708268 0.519535199 222 0.638395390 -1.158190677 223 -0.664288975 0.085221329 224 1.534093271 -1.349490552 225 -0.990201531 -1.789715520 226 -1.581745847 1.431585443 227 1.555447984 1.155972643 228 -0.224998815 0.631761526 229 0.053737204 -1.448566440 230 1.085395631 0.861296120 231 -0.565533628 -0.775209238 232 -0.703355190 1.264963506 233 0.021898899 1.582180652 234 0.147296779 0.837290973 235 0.084994277 0.441874240 236 1.670896589 -0.763496315 237 1.140132659 0.172607594 238 1.044085393 -0.771441940 239 -1.179796625 -0.896319694 240 0.894950187 -0.086702411 241 0.068409695 0.671909759 242 0.411219224 -0.934599008 243 -0.168121514 1.369995239 244 -0.143875465 -2.046142104 245 2.673121612 -0.055439065 246 0.412650612 -0.773119182 247 1.058914209 0.531648193 248 1.477933822 -1.783484232 249 0.663708122 1.089482735 250 -0.227776435 1.082264811 251 0.247134868 -2.923517046 252 0.067485839 0.478682073 253 -0.228470623 0.679298233 254 -0.166660158 -0.937709645 255 -2.171416027 -1.419046673 256 0.192979472 0.917296915 257 -0.739031345 1.188007803 258 -1.426467915 2.053400785 259 0.168875152 -1.070707493 260 1.704625995 -0.566752771 261 -0.733243867 -1.711071661 262 1.609194651 -0.759782062 263 -1.968675614 -0.564941175 264 0.921433687 0.098158411 265 1.173902470 1.012951538 266 0.701725305 -0.042511093 267 1.440411202 0.886382236 268 1.546292861 -1.940238691 269 -1.318965211 0.921459235 270 0.085804709 0.336814633 271 -0.489891214 -1.914017992 272 0.100243311 0.181538624 273 -0.047097980 0.549088699 274 -1.131815252 -1.989399821 275 -0.498587117 -0.634942816 276 1.631926852 -0.462236458 277 0.440119319 0.542146616 278 1.417896202 -0.970164614 279 0.610612981 0.094328074 280 1.775046354 -0.992560751 281 0.207799066 -0.539363065 282 0.207496223 -0.011988984 283 1.183436262 -1.884423185 284 -0.776555007 0.236411511 285 0.106440576 -0.293808020 286 -0.296694488 -0.099049800 287 0.278810434 0.393025529 288 -0.287604204 -1.670793860 289 -0.532665058 -0.756067821 290 -0.580430287 -0.642503022 291 -0.870501652 0.590589835 292 0.442552855 -2.509767094 293 0.450205622 -0.027711430 294 -0.490113807 -2.168407424 295 0.209548653 0.511848455 296 0.003018513 -1.546187057 297 0.026549705 0.839482444 298 -0.185594497 -0.100978039 299 -0.898785328 -0.222717970 300 -0.123135567 2.062449202 301 -0.616344727 -0.293539655 302 -0.835075827 -3.053942918 303 -1.025160008 -1.863475768 304 -0.936377830 0.998210692 305 -1.284854656 -0.109263415 306 -1.131340029 -0.863633447 307 0.846104921 0.086194511 308 -0.529849030 -1.732173703 309 0.112130995 -1.654110350 310 -1.559449179 -1.682161569 311 -0.444619759 0.701018179 312 0.241784097 0.501250446 313 0.455637768 -0.524887630 314 0.354855417 0.787566834 315 1.140832765 0.070184563 316 -0.971447832 0.864522406 317 0.253743828 0.491684155 318 0.418625296 0.340949355 319 0.842104011 0.508915862 320 -0.419649278 0.242646107 321 0.282996796 -1.576294757 322 0.101277447 0.253343674 323 -0.055120770 0.642452855 324 -0.948206797 -1.622847774 325 0.121801428 0.820711996 326 -0.977043346 1.749984467 327 -1.634850020 -0.523556038 328 0.858984121 0.953256830 329 -1.110417560 -0.026692046 330 0.153763704 0.879878188 331 2.010264668 -1.645182937 332 -1.436329124 -0.610656234 333 0.395386733 0.589856324 334 -0.547043938 -0.849295164 335 0.746077017 -0.376497848 336 -0.744567279 2.026746471 337 0.628156890 -1.271086976 338 -0.579880715 0.309044891 339 0.705652646 0.191387648 340 -3.128893285 -1.837496489 341 1.577485709 -1.005820531 342 -0.075452518 0.083864669 343 -1.207069998 0.728680343 344 -0.057549453 0.550653558 345 0.292077286 1.035129815 346 0.367122313 0.591708751 347 0.160842337 -0.889301697 348 0.551595113 -0.820429485 349 0.433852470 0.349944613 350 0.015439121 1.339074037 351 -0.113723025 0.636680743 352 0.780260970 -0.080166764 353 -1.211384226 1.779044797 354 1.358435345 0.900202672 355 0.585077968 0.399792781 356 1.122978737 -0.145940511 357 1.098852135 0.751806222 358 -0.306239159 0.637421284 359 1.013028475 -2.380597631 360 -0.658133512 -0.816717108 361 -1.427537580 1.675543346 362 0.606717826 -0.347398560 363 1.355310730 -1.263782669 364 -0.730900985 -1.376570487 365 -0.287668466 -0.453578950 366 0.053737204 -1.448566440 367 0.395208485 0.416994925 368 0.136496664 0.142607194 369 0.681285612 0.863653268 370 -0.831232640 0.124159016 371 -0.777747419 1.066834654 372 0.493578996 -0.415451502 373 -0.207853479 0.729662188 374 -1.658859697 0.463248303 375 -1.112950607 0.314272255 376 1.070421513 -0.082229959 377 -0.089143138 -0.926048470 378 -1.539891713 -0.128132464 379 -0.863205776 1.705469435 380 0.626348746 -0.913914495 381 0.098494563 0.211514837 382 -1.129513773 0.802147028 383 -0.408440076 -0.483763228 384 -1.066044187 -0.664843537 385 0.864860512 0.579692512 386 0.668492400 -0.001553627 387 -0.914429006 0.316910928 388 -2.638284523 -0.131327547 389 1.289453816 -1.523849293 390 1.086876249 -1.106520245 391 -1.924711380 -1.843190106 392 0.983139883 -0.408088164 393 0.249879085 0.632369534 394 1.121793903 0.173905447 395 0.693279436 -0.105431692 396 0.631854740 1.306805531 397 0.464257105 0.760219826 398 0.104608745 1.286528080 399 -2.617477169 0.879135559 400 1.436361148 0.350968686 401 -0.178914178 0.487280660 402 -0.112314916 0.219326264 403 0.742359433 0.246670032 404 -0.638733268 -0.932790300 405 0.761056128 0.887587547 406 -0.448772575 0.388813985 407 -0.183253313 0.926165176 408 -0.694997460 0.895295067 409 1.414473848 -0.198693181 410 -0.029426719 -0.119709707 411 -1.647972606 1.570848099 412 0.704901457 -0.769303615 413 -0.398461211 1.134831386 414 0.885885709 0.213879578 415 -1.477444273 0.334691103 416 0.013492552 -2.307505331 417 2.229130614 -1.173744828 418 0.930493793 1.001985279 419 -1.047647725 1.900804701 420 -0.447919266 0.280628796 421 0.078951859 1.418067749 422 -0.298939034 -1.730979166 423 0.088459718 -0.021979190 424 -1.949718173 -1.957911538 425 -1.099621590 1.366780561 426 -1.635340320 -0.394733468 427 0.194667652 0.514940347 428 1.097868069 1.123014798 429 -0.002076727 0.764466591 430 0.212262310 -0.877862006 431 -1.682817987 1.650825825 432 1.397993601 -0.299186263 433 -0.946699853 -0.659084789 434 0.403339230 0.209221867 435 0.550253644 1.392436626 436 1.070295877 -1.336407782 437 -0.113001353 1.087585086 438 0.722602987 0.842550629 439 0.940798302 1.460150959 440 0.388482279 -0.087756760 441 -0.666029449 0.868443695 442 0.752498006 1.292766131 443 1.711209897 0.879183179 444 -2.480192148 0.554175506 445 0.580867824 0.557089134 446 0.247920791 1.081428278 447 -1.957946161 0.717538479 > postscript(file="/var/wessaorg/rcomp/tmp/1bnos1335907424.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/2w0m81335907424.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/3fb241335907424.tab") > > try(system("convert tmp/1bnos1335907424.ps tmp/1bnos1335907424.png",intern=TRUE)) character(0) > try(system("convert tmp/2w0m81335907424.ps tmp/2w0m81335907424.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.024 0.159 1.178