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 = 'ATTLES all' > par4 = 'all' > par3 = 'all' > par2 = 'female' > par1 = '2' > par5 <- 'ATTLES all' > par4 <- 'all' > par3 <- 'all' > par2 <- 'female' > 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 A1 0.50 0.06 0.25 0.75 A2 -0.19 0.61 0.41 0.59 A3 0.57 0.04 0.32 0.68 A4 0.12 0.50 0.27 0.73 A5 0.25 0.29 0.14 0.86 A6 0.48 0.10 0.24 0.76 A7 0.08 0.47 0.23 0.77 A8 0.44 0.46 0.41 0.59 A9 -0.07 0.55 0.30 0.70 A10 0.45 0.29 0.29 0.71 A11 0.51 -0.51 0.52 0.48 A12 0.09 0.57 0.34 0.66 A13 0.10 0.33 0.12 0.88 A14 0.20 0.46 0.25 0.75 A15 0.65 -0.16 0.45 0.55 A16 0.42 -0.34 0.29 0.71 A17 0.35 0.14 0.14 0.86 A18 0.55 -0.03 0.31 0.69 A19 0.53 0.17 0.31 0.69 A20 0.28 0.18 0.11 0.89 RC1 RC2 SS loadings 3.03 2.68 Proportion Var 0.15 0.13 Cumulative Var 0.15 0.29 Test of the hypothesis that 2 factors are sufficient. The degrees of freedom for the null model are 190 and the objective function was 3.06 The degrees of freedom for the model are 151 and the objective function was 1.03 The number of observations was 450 with Chi Square = 454.24 with prob < 4.2e-32 Fit based upon off diagonal values = 0.75> fs <- factor.scores(y,fit) > fs RC1 RC2 1 -0.668521221 -1.0975753289 2 2.299204561 -0.3372315530 3 0.075673619 -1.3540062885 4 -1.144086295 -1.7398011822 5 -0.196868263 -0.4817749459 6 -0.303801497 -1.1011431353 7 -1.289879716 -1.4206571532 8 0.316751971 0.7066721385 9 0.348370370 -0.7387386629 10 0.999256354 0.4458954153 11 0.233193295 -1.2687902529 12 0.686955207 -0.6508032973 13 -0.657354549 -1.1269350249 14 -1.387855346 0.1153648426 15 0.474101919 0.1270772832 16 0.122594439 -1.4575601097 17 0.119352865 -1.3885495786 18 0.799884571 -0.9932871745 19 0.541764061 -1.0267978775 20 -0.328306425 -0.2196959699 21 0.209419366 -0.0006642584 22 0.229256513 0.2758624971 23 -0.298474233 -1.8986903335 24 0.715796773 -0.2446284176 25 -0.322170150 -1.1513509994 26 0.263170291 -0.4077562769 27 0.191949743 -1.3044346841 28 1.025407911 -0.2966745393 29 1.738786624 -1.0444431303 30 0.423660927 -0.4927152150 31 2.026476771 -0.3093501073 32 -0.110216028 0.5305747968 33 0.161773398 -0.4100411803 34 0.295856691 -0.3356995550 35 0.660528296 -1.9010906886 36 0.842848393 -0.1657912405 37 -1.123225127 -0.4144844884 38 0.384155444 -0.1716002898 39 0.382355237 -0.2646942338 40 0.428303438 -0.3790024551 41 -0.806162095 -1.8572282813 42 0.774178859 -0.2701241970 43 -0.515680316 0.4701008049 44 0.229799379 0.0851154658 45 -0.054601916 -2.0356731265 46 1.568755968 0.2320721459 47 0.432396308 0.0142658375 48 -0.293331484 -0.4590062744 49 -0.188470880 0.1750565817 50 -0.706132826 0.2425112339 51 0.126624451 -2.1619116187 52 0.066567443 -1.2582414356 53 -1.404239675 -1.1522425977 54 -0.582019902 -1.0258348272 55 0.170852252 0.1451869574 56 0.627568523 -0.4817861171 57 0.567038297 -0.5347153461 58 0.325342808 -0.6369372264 59 0.570218631 -1.8287016396 60 -1.543801611 -2.1074760317 61 -0.673572452 0.2917286225 62 -0.078744928 -0.0411010086 63 0.342108998 -0.9444539140 64 -1.494198269 -1.6191855416 65 -3.543688374 -0.9693245373 66 -0.065280482 -0.3930713699 67 -0.993796707 -1.0747986284 68 0.660816569 -0.0986622595 69 -0.298356707 -0.7293652661 70 1.624431618 -1.1972132414 71 0.679131261 -0.1364276701 72 0.292271682 -0.6396929922 73 -0.728961276 -1.5682519403 74 0.154288944 -1.2038316937 75 0.193659076 -0.4568745947 76 -0.445199012 -0.1347986900 77 -0.749745764 0.5327921441 78 -1.866861815 0.3789285364 79 -1.371501593 -1.9703756888 80 -0.778679038 -1.3596380186 81 0.699095350 -0.1100999143 82 -0.701877629 -0.3512733946 83 -0.661217965 -0.8781217913 84 -1.255299573 -1.0631176462 85 0.670301057 -0.0006665471 86 0.108341070 -0.7699856468 87 0.177588329 0.1413406272 88 1.118409718 -0.2255283472 89 0.277011034 -0.5750225742 90 0.699246792 -0.6374540219 91 0.793590890 0.1628226862 92 0.354411029 -0.0730596677 93 -1.956353136 -1.2872723612 94 2.474833821 0.3872557476 95 -0.516747332 -0.4878152406 96 0.071449196 -0.1702352466 97 0.006852364 -0.6454986982 98 0.482184122 -0.2350094224 99 -0.755799205 -0.7993454290 100 0.391004592 -0.5938764210 101 0.354671532 -1.0872584475 102 0.244590268 -1.2194939101 103 1.226563384 -0.1696729653 104 1.326963820 -1.2381661127 105 0.097597176 0.6738236890 106 0.098236341 -0.4128312368 107 0.373343396 -1.0377021626 108 0.255375981 -0.8017398324 109 0.648134862 -1.1501456385 110 -1.948399366 -0.5476755480 111 -0.692176850 -2.0968304497 112 0.348468919 -0.8198074095 113 0.324322292 -0.9347954685 114 0.039665872 -0.7942214446 115 -0.249786209 -0.2921911923 116 -0.470893026 -0.2643249871 117 0.985131014 -0.9598076355 118 -4.260814194 -1.8183054647 119 -1.257581172 -1.4884683993 120 1.202439844 -1.3599628910 121 0.784750765 0.5619556111 122 -1.125998467 -0.7091427948 123 0.265156269 -1.5290655846 124 -0.881834486 -2.3518862173 125 0.234704910 -0.5650135197 126 0.299235025 -0.4088728130 127 -2.484159451 -2.4398975823 128 0.393860470 -0.8006681112 129 0.668209705 -1.1734554356 130 -0.635910370 -0.5101843496 131 0.590023169 -0.4842546347 132 0.020892888 -1.3048141535 133 0.465449941 -1.2083762454 134 -0.456030145 -0.9987786173 135 -0.976250554 -1.9264749351 136 0.298979424 -1.1324848188 137 0.684995657 -0.4391585404 138 0.013203578 -0.9336272816 139 0.374627253 -0.6031324355 140 1.340678635 0.7291327790 141 0.080813809 -0.8865150685 142 -0.580170358 -1.0679917581 143 -0.682827324 -1.4047910466 144 1.286070859 -0.5279474976 145 -0.042278076 -0.5525187749 146 0.118730154 -1.6687664412 147 0.320973883 0.4210216993 148 1.149138854 0.6720995494 149 0.183001443 -0.6628530713 150 0.497705086 -0.4069568792 151 0.810129466 0.2809105176 152 -0.394134108 -1.4630443079 153 0.829950515 -1.1888825919 154 1.793898768 -0.2513896243 155 1.707387408 -0.8569118426 156 1.873858743 -0.2500940833 157 0.722870527 -0.1086506786 158 0.071972992 0.0566868062 159 1.491524555 -1.3544692447 160 2.609523213 0.1134790209 161 1.056488129 0.4906128101 162 1.188242589 -1.1862395999 163 0.497798648 -0.7899908401 164 1.268982025 -0.1446253984 165 0.838674877 -0.5353920055 166 0.815807769 -1.0248380946 167 1.243430885 -0.9457107036 168 0.331717597 -0.7131739844 169 3.077112879 0.2136651325 170 1.406633108 -0.1899427257 171 0.753044635 -0.3275853853 172 -0.879443151 -0.2838548672 173 0.756420633 -0.9393311482 174 1.677532929 -0.3981156375 175 -0.547987572 -1.4995163479 176 0.396842881 -0.8213173326 177 0.703868960 -0.5512244186 178 -0.696814316 -1.9491154582 179 2.309720174 -0.3000158083 180 1.087717787 0.5577431128 181 0.674115218 -1.0060165556 182 1.093664541 -0.2242214350 183 1.266095118 -2.0071006328 184 -0.420245139 -0.1221171912 185 1.064541373 -0.3226551836 186 -0.075147169 -0.3059091186 187 0.618291488 0.0056412630 188 1.028145667 -0.4888062812 189 0.976402302 0.0196729517 190 -0.514940406 -1.2995075315 191 1.223037124 -0.3104570614 192 2.036234052 -0.6775860563 193 1.042898750 -0.0633652533 194 0.465615686 -0.1578225299 195 0.319433538 -0.1543034529 196 0.464543940 -0.4077112069 197 1.772973463 -0.8079838783 198 0.964207940 -0.1418657078 199 0.747839566 -1.0440173522 200 0.136949285 -0.1678312291 201 1.290489261 -0.6496622371 202 -0.520331435 0.5871260940 203 0.360810124 -0.5044645765 204 0.833268582 -0.1781132165 205 0.163124042 -1.7067278859 206 1.538572380 -0.8680838265 207 -0.568710524 -2.2981623286 208 1.632582220 -0.3050826962 209 2.413887674 -0.6655800237 210 0.880026039 -0.1139807019 211 1.588393164 0.4417762874 212 0.081474825 -1.5224907889 213 1.276633944 -0.4439146794 214 0.029403867 -1.1102931344 215 1.472219300 -0.0835304805 216 2.853928731 -0.0467907090 217 0.911625648 0.7992683369 218 2.051672432 -0.8314881382 219 0.756277362 -0.2740124646 220 0.672688664 -0.2671764916 221 0.863105838 -1.0493457438 222 1.968409131 -1.0471542344 223 0.770179946 -0.0953498628 224 0.754068025 -1.1338096395 225 0.685715164 -0.6622845421 226 0.468954173 -0.9605112449 227 0.585158009 -0.1594346231 228 -0.141416108 -1.1007109781 229 0.421829600 -0.0391414923 230 -1.763945262 0.2753562023 231 0.135914119 -0.7128703165 232 0.913832759 -0.4646377565 233 -0.352411624 -0.5569187346 234 -1.241224090 0.6348754711 235 -2.381940932 -0.5492179480 236 -0.042304892 -0.1553907543 237 -0.475305550 0.2456370835 238 2.353803704 2.3025978156 239 0.511165869 -0.2259503712 240 1.910374522 -0.9388237713 241 1.010164096 -0.6566429131 242 0.100184993 0.2840614975 243 0.170177133 -0.4174340947 244 -0.475803381 -0.4759509933 245 0.822350307 0.1308015676 246 1.498840563 -0.5761166276 247 1.261657725 -0.6389504078 248 -1.646806984 -1.4444128113 249 0.802698316 -0.0222095889 250 1.010720826 -0.0974662238 251 1.498109647 -0.1011951562 252 -0.182866867 1.7337503908 253 -0.502173002 0.5811195040 254 -0.719377198 0.0268858480 255 0.288977272 2.2666200405 256 -0.358159974 1.9374906213 257 1.058020572 0.5454164662 258 -1.559802964 1.0817872453 259 -0.971898796 -1.2498418834 260 0.092860782 1.6341202058 261 -0.879638136 0.4218126447 262 1.058082262 1.4619810689 263 0.290732176 2.1815250868 264 -0.633645802 0.5306437482 265 -0.283197001 1.1879514184 266 0.647977194 0.8088999985 267 -0.297112552 -1.2121880256 268 0.729142684 1.1044324984 269 -0.637847996 1.0298067600 270 -0.622203703 1.0508822264 271 -1.076388258 0.2418224490 272 -0.820317460 1.9635643074 273 0.285291500 -0.1254223080 274 -1.903328585 0.7999854648 275 0.022840838 1.3252312618 276 -0.019332294 1.0464995628 277 -1.211311037 2.1356370566 278 1.328418255 1.5049962010 279 0.611418027 1.4300406164 280 -0.415824470 -0.2187892315 281 0.729142684 1.1044324984 282 -1.310985641 1.3792955094 283 -2.428222738 1.0873077641 284 -0.213041431 0.5255081894 285 0.280142579 0.7955737717 286 0.253869646 0.9643528873 287 -0.726157001 1.6510527152 288 -0.151211809 1.5896062020 289 -0.265815750 1.4412468566 290 -1.227216271 1.0167266120 291 -1.669860751 -0.6008441955 292 0.973182041 1.1053274936 293 -1.750715503 0.5735359826 294 0.124620775 1.1768566077 295 -0.606953202 0.6458722924 296 1.440622339 2.1429470290 297 0.224335342 0.4700639454 298 1.293552743 1.6305423757 299 -0.637392073 1.1396612393 300 -0.975220296 0.3781807157 301 -1.458600625 1.3174550635 302 0.230057439 1.1299113023 303 0.288977272 2.2666200405 304 -1.037254438 1.3456292492 305 1.058020572 0.5454164662 306 -0.047929687 0.8667713521 307 -1.603353021 0.9726088565 308 -0.708241828 -0.0953517512 309 -0.070897921 0.6668741243 310 0.652771208 0.0889394866 311 -0.574498368 0.6204204168 312 0.018444499 0.0890667494 313 -0.990801811 -0.9377246439 314 -0.834290163 0.1463898347 315 -0.776269562 1.6484629003 316 -0.692147493 1.2464539730 317 0.219203832 0.5634251861 318 0.510404314 0.9538518884 319 0.050402985 0.7587142627 320 -0.180516696 1.2964451960 321 -0.049419457 0.7625015872 322 -0.957063216 0.3984675068 323 0.872882049 0.5064347396 324 -2.225550487 -0.4667722955 325 -1.076388258 0.2418224490 326 -0.243825576 0.2753159913 327 0.486410937 -0.1201100270 328 0.285291500 -0.1254223080 329 -0.939768064 0.8794440388 330 -0.768569490 1.1765467429 331 -0.538488771 -0.2099088171 332 -0.822597211 1.0376032008 333 -0.205474521 0.7839205092 334 0.274065772 1.8159895455 335 -0.249365019 1.5644608590 336 0.662149840 1.7548503581 337 -0.550690189 -0.0362320397 338 -0.719446619 1.2345361018 339 0.372856766 1.7906503100 340 -2.012872267 0.9914758459 341 -1.151544075 -0.6126777590 342 1.509410665 0.1937989823 343 0.198058965 1.2498412330 344 -1.411651370 1.1106431590 345 -0.167218546 1.0990031584 346 -0.728318415 0.0206186131 347 -1.209030397 0.5394444989 348 0.482025025 2.3511031741 349 0.570621209 0.1518706170 350 -0.632695155 0.9707621829 351 -0.088054512 -0.0150960911 352 -0.434126333 1.1782227286 353 -1.694771320 0.9379616878 354 -2.001162320 -2.0099198789 355 -1.550566335 1.2355147808 356 -0.756179154 1.1846668866 357 -2.048572172 -1.5903923871 358 -1.445401644 -0.3903654924 359 -0.314242530 0.3083131493 360 0.001481964 0.4161257128 361 0.051782848 0.8904568209 362 0.016177297 0.0753243474 363 -0.592229603 1.0056659392 364 -0.969534089 0.7847411380 365 0.302752058 1.0827050279 366 -0.729810035 0.1314531180 367 0.670058168 1.7664018980 368 -0.157645727 1.0249367911 369 0.839989944 0.5276404461 370 -0.255628942 0.3208048680 371 -0.940224733 -0.0643732851 372 -1.599723454 -0.4691030283 373 -2.488814492 -0.6652288391 374 -1.256308792 -0.3164303940 375 -0.004539375 0.7708217704 376 0.400468583 0.7021255338 377 -0.350567204 0.5673482991 378 -0.888297567 0.0416904819 379 -0.566652673 0.3373387226 380 -0.107904710 0.6093733005 381 0.768672373 0.7816350093 382 -1.038428794 0.0719703500 383 0.470010180 2.2755229851 384 -0.465013255 1.1277221045 385 0.207284474 1.5834178817 386 -0.369919475 0.7491475998 387 -0.455884346 0.8348032390 388 -0.591585250 0.6500500333 389 0.059328396 0.5903656636 390 1.712440154 1.8161060541 391 -0.766691130 0.2386492779 392 -0.912353967 0.5428541222 393 0.005765623 0.9057593568 394 -0.609506589 1.7361476966 395 -0.369617584 -0.1225909716 396 -0.098840220 0.8766968155 397 -0.522621950 1.4655935705 398 -1.267793301 1.3562653457 399 -0.195167735 -0.1413542505 400 0.301196650 0.9507172693 401 -0.534032015 0.4184520607 402 0.168839248 1.0336035987 403 -1.356362227 0.1294614255 404 0.183514502 1.1737396167 405 -1.474343240 0.8627862263 406 -0.463419969 1.4864511284 407 -0.099852137 0.7011170429 408 -1.506156651 0.6325293987 409 -1.025198726 0.6732322936 410 -1.157506517 1.1029353417 411 -0.817934134 0.4741287100 412 -0.393283114 -0.3126549767 413 -0.825620056 1.0164086708 414 -1.915629695 1.0505641860 415 0.590282450 0.9492799548 416 -1.308192074 1.1055124411 417 -0.789833030 0.8036532885 418 -1.009289356 0.1126163684 419 0.239596573 -1.3008813265 420 0.691904108 1.8927898314 421 0.702359149 1.4613651128 422 -0.735713756 0.9913450998 423 -0.202753802 -0.0059929395 424 -0.937004279 1.3307762032 425 -0.430419194 0.4732641879 426 0.564231125 0.8123373842 427 1.612915912 0.3390790061 428 -0.642100221 0.7269059371 429 1.153046289 1.2406350100 430 -0.195207370 0.7943615412 431 -0.595400990 1.4671191873 432 0.907813224 1.5480476090 433 -0.004798615 -0.3190274858 434 -0.960467308 -0.1182254220 435 -0.286325289 1.1143152976 436 -0.714725086 1.0582839078 437 -1.888483964 1.0834555036 438 0.233278430 2.8315998662 439 0.293421263 1.6947779338 440 0.204086336 1.3992244991 441 -1.397419684 0.9944516381 442 -0.559497869 0.7865237080 443 -0.707320463 0.7959213625 444 -0.159448924 1.3810109082 445 -1.936523556 0.5173325363 446 0.678652907 1.8634259445 447 -1.498763348 -1.2007884730 448 -2.742612871 -2.4867372120 449 -1.146439306 0.4868961812 450 -0.611634278 0.0135605442 > postscript(file="/var/wessaorg/rcomp/tmp/1avft1335791091.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/2co2o1335791091.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/3ar751335791091.tab") > > try(system("convert tmp/1avft1335791091.ps tmp/1avft1335791091.png",intern=TRUE)) character(0) > try(system("convert tmp/2co2o1335791091.ps tmp/2co2o1335791091.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.930 0.160 1.086