R version 2.12.0 (2010-10-15) Copyright (C) 2010 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 = 'bachelor' > par2 = 'all' > par1 = '2' > par5 <- 'ATTLES all' > par4 <- 'all' > par3 <- 'bachelor' > 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 A1 0.53 0.04 0.29 0.71 A2 -0.17 0.51 0.29 0.71 A3 0.53 0.14 0.30 0.70 A4 0.09 0.50 0.26 0.74 A5 0.25 0.37 0.20 0.80 A6 0.49 0.31 0.33 0.67 A7 0.17 0.44 0.22 0.78 A8 0.44 0.45 0.40 0.60 A9 0.06 0.40 0.16 0.84 A10 0.49 0.18 0.27 0.73 A11 0.55 -0.50 0.56 0.44 A12 0.19 0.56 0.35 0.65 A13 0.04 0.49 0.24 0.76 A14 0.28 0.48 0.31 0.69 A15 0.60 -0.04 0.36 0.64 A16 0.56 -0.32 0.42 0.58 A17 0.39 0.18 0.18 0.82 A18 0.46 0.15 0.24 0.76 A19 0.39 0.35 0.27 0.73 A20 0.37 0.15 0.16 0.84 RC1 RC2 SS loadings 3.12 2.69 Proportion Var 0.16 0.13 Cumulative Var 0.16 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.09 The degrees of freedom for the model are 151 and the objective function was 0.94 The number of observations was 446 with Chi Square = 408.2 with prob < 1.5e-25 Fit based upon off diagonal values = 0.8> fs <- factor.scores(y,fit) > fs RC1 RC2 1 0.5843265068 -2.354283250 2 0.9648225257 -0.389550946 3 -0.0004514961 0.255911405 4 0.1919059070 -0.149591045 5 -0.1312434963 -0.871393611 6 -0.2537644390 0.698438121 7 0.4436256879 -0.793899764 8 -1.1648392987 -1.482344365 9 0.2072977914 -0.818111583 10 -2.5930486624 -1.356276633 11 -2.9905235156 -2.241197818 12 -0.1153430405 -1.006384232 13 0.1274354081 0.328025345 14 0.0098679692 -0.343398518 15 0.1954260591 -0.592233540 16 -0.7681534594 -1.402923216 17 -0.4774492621 -1.258603694 18 0.9237121958 -0.355473091 19 0.4171746932 -1.178529746 20 0.2699931778 -0.365533081 21 -0.8309684463 -1.304342280 22 -2.4998240920 -2.309106959 23 -0.3811054784 -0.470993135 24 -0.0732180463 -0.647517468 25 1.5493962377 -0.860758208 26 1.5469253860 -0.935287010 27 0.7057211756 -0.151477986 28 0.3468478927 -0.533551777 29 -0.7265423378 0.307306289 30 -2.3458133299 -2.631375107 31 -0.4546400331 -0.160442653 32 -0.4789429552 -1.522967983 33 0.2043548108 -0.979696697 34 0.5881944555 -0.659906819 35 -0.2621594033 -0.015657899 36 -0.0658985075 -0.351126771 37 -0.4638583749 0.394977484 38 -0.3865884993 -0.256758699 39 0.7355110268 -0.283010228 40 -1.6784908494 0.535906150 41 -0.9711422001 -1.847313934 42 -1.1734505605 -2.129530573 43 -0.3897862311 -1.573504568 44 0.8803686721 -0.224060345 45 -0.6148925485 -0.304836030 46 -0.2725853935 -0.923767788 47 -0.9508441715 -0.830681201 48 0.4133687282 -0.875296926 49 0.7112051986 -0.033655483 50 -0.3785961738 -0.931068407 51 0.2371410012 -0.788280845 52 0.5548066068 -0.150743327 53 0.3838913799 -1.080843188 54 1.4025027500 -0.475272222 55 0.4407870478 -0.480250518 56 -0.5429827355 -1.548032641 57 0.5925108364 -0.476172715 58 -1.3822320297 -1.627953363 59 -0.5268916592 -1.792466729 60 0.9348427233 0.104336388 61 0.3975237021 -0.049200721 62 -1.4678799138 -1.275544915 63 2.4253896930 0.226976662 64 -0.0825887626 -0.700598171 65 0.2973513828 -0.116043055 66 0.2064197894 -0.641817478 67 0.6582868215 -0.272523500 68 -0.5039732897 -0.648195171 69 0.5594582522 -0.610957410 70 0.5599615318 -0.999088734 71 0.5025338670 -1.176303140 72 1.3594514943 -0.391550905 73 1.7462301095 -1.563169101 74 -0.4001369243 -0.398785186 75 0.1324998497 0.595239056 76 0.7474183097 -1.000444151 77 0.8462118243 0.048424493 78 0.7850839422 -0.699921944 79 0.3115628356 -0.141455915 80 -0.0791321317 -0.301120311 81 0.3019228576 -0.526474625 82 0.5439842869 -0.987486387 83 0.4224270434 -0.755371982 84 0.9348415452 -1.372815187 85 0.3468021842 -0.786605420 86 -0.3392585482 0.090048059 87 0.9993165987 -0.660093335 88 0.3877382775 -1.252844556 89 -1.5247050411 -0.544754538 90 0.7956810365 -1.446442529 91 -0.2917389408 -1.949741386 92 0.4427886196 -0.707900880 93 0.6379761314 -1.128190098 94 0.3571991868 -1.070520271 95 0.2288643153 -0.781577817 96 0.0889521934 -0.504398851 97 0.3928028149 -0.323586402 98 0.3548993905 0.236974497 99 -0.1700445803 -0.316883950 100 1.1184518106 -0.970061356 101 -3.4818690104 -1.772396581 102 0.1391864482 0.060013873 103 -2.5256318974 -1.008720633 104 0.9722097959 -1.068641910 105 -1.0120141107 -1.287920746 106 1.4697151510 -1.497143143 107 0.8345434663 0.341582392 108 0.2030235766 0.666061821 109 -0.8346676417 -0.810773162 110 1.1259394248 -0.375564791 111 0.7104519711 -1.700724121 112 -0.4750325450 -2.350454967 113 0.4964449808 -0.623496032 114 0.8690480896 -1.069883940 115 -0.2384026236 0.537997473 116 -1.9446643128 -2.331561401 117 0.0109231044 -1.178701189 118 -1.2980227417 -1.160826552 119 -1.2589171375 0.352233864 120 -1.1984626443 -0.092850995 121 0.8947854457 -0.386354172 122 0.8981652790 -0.024368539 123 0.6485348054 -0.931982901 124 -0.5807077475 -0.356255178 125 0.8203208045 -1.065695024 126 -0.4138143891 -0.550821033 127 0.8131617545 -0.644064772 128 0.2960032935 -1.300641696 129 0.5668910082 -0.929546567 130 -0.1324783204 -1.091727970 131 -0.4892815258 -1.914247462 132 0.2604938618 -0.831329980 133 0.5328046131 -0.384762311 134 1.1364004980 -0.618041195 135 0.2043812744 0.514941003 136 -0.6669148830 -1.072625913 137 0.6794263625 -0.603072666 138 -0.7488474373 -0.678390691 139 1.3414171661 0.097355647 140 0.6751196795 -0.405411427 141 0.2759027155 -1.028212088 142 0.4143554473 -0.523798439 143 0.8036037066 0.184953002 144 1.3310075932 0.769020388 145 0.5529242024 -1.082449520 146 0.4133687282 -0.875296926 147 0.3217618010 -0.499160273 148 1.8073268168 -0.616410554 149 0.9393630162 0.135991498 150 2.2653223402 -0.628823430 151 1.1652945062 0.168637037 152 -1.2255614703 -0.754529592 153 1.0150148575 0.658859598 154 0.9549146597 -0.023802982 155 0.9100628354 0.672659767 156 1.6947306501 0.283779305 157 0.2989210618 -1.465254047 158 2.1264767546 0.271287746 159 0.4227432285 0.247314500 160 -0.9762706512 -0.302675013 161 1.2147975484 -0.304168128 162 0.0998923016 -0.975285234 163 1.7217753669 -0.352110555 164 0.7017019890 -0.715889388 165 2.7829358279 -0.220025702 166 1.4573870671 0.383628306 167 -0.2886736360 -2.178404299 168 -0.8775454940 -1.139577011 169 1.0639152809 0.564594437 170 2.0155242557 -0.844229333 171 -0.0170232614 -0.556648708 172 -0.2816232645 -0.594026015 173 0.0317728302 -0.512982044 174 1.3415790747 -0.528748821 175 1.0847796720 -0.566844599 176 0.9279588910 0.062462902 177 0.7914515717 -0.379756434 178 1.2169731509 0.585901637 179 1.1953737024 -1.220814641 180 1.1348525796 0.088652406 181 0.4258808818 0.049396895 182 1.9515739281 -0.971467842 183 1.0220244061 -0.249106929 184 1.5226557313 0.324658998 185 1.0656305009 0.070653410 186 0.8287915266 -0.934120286 187 0.6441877477 -1.159331508 188 0.1147394959 0.054979054 189 0.2530595562 -0.869329024 190 0.8294006747 -0.797076332 191 0.4727836995 -0.656670872 192 0.8834374337 -0.386413467 193 0.2077358739 -1.161265130 194 -0.3076931975 0.168991564 195 -0.3589564286 1.264862045 196 0.7510719501 -0.303837499 197 1.2728028588 0.192312245 198 1.5415606622 -0.555451767 199 -1.5979956051 0.416762735 200 1.3172400404 -0.955449801 201 0.3103184380 -0.670104193 202 1.1240584476 -0.623395770 203 0.5084419246 0.731672586 204 -0.0204690620 -0.403914545 205 1.2546457862 0.751230910 206 -1.0588873156 0.709429220 207 -1.7826525302 -0.835338012 208 0.0402245700 -0.155056642 209 0.2518697068 -0.362091165 210 -0.2889849304 0.105593403 211 1.1576712910 0.157119721 212 0.1028391282 -0.417005403 213 1.9705630152 -0.803733037 214 0.2488812180 0.891123269 215 2.3248753721 1.902631186 216 0.7427758248 -0.354881332 217 -0.1238731344 -1.618625760 218 2.0579783661 -0.907661965 219 0.5719313560 1.329256833 220 -0.1979011920 -0.525534050 221 2.7083927030 -0.551027901 222 -0.1554314204 -0.944945378 223 1.0796644944 -0.637663741 224 0.2870361891 0.189703746 225 0.5512460986 0.174059775 226 1.0173985068 -1.076086892 227 0.4753494109 -0.697165046 228 0.6932371996 0.088735456 229 1.1968931503 0.142539850 230 -0.2555365992 -0.584852374 231 1.1331221369 -0.309643709 232 1.3371884812 -0.454915405 233 0.3350828833 0.350672877 234 1.1868598000 0.037117248 235 0.0564964068 -0.374904812 236 1.2176085751 0.176361938 237 1.8107493375 -0.762865049 238 1.4988728656 -0.841046444 239 1.3722898730 -0.119491218 240 -1.2853012904 -0.673472131 241 0.6528669412 -1.277346049 242 -1.3806658164 -1.190765613 243 1.2443774165 -0.407321286 244 1.0633109256 -0.184665855 245 -0.8220025298 -0.770768042 246 1.5147929630 -0.187749199 247 1.2920403900 1.280273928 248 -0.8639969889 0.340508300 249 -0.7578511899 1.092155236 250 -0.3866243899 0.506295638 251 -0.3357476067 1.525372208 252 -0.9307395686 0.524472917 253 1.1810002451 0.880475000 254 -1.4851085009 1.363325461 255 -0.2219410479 0.276691542 256 0.2480602503 1.124586906 257 0.0648361072 2.237937094 258 -0.0285453309 0.449544750 259 0.4127721707 1.061825254 260 -1.5149944523 0.406982993 261 -1.1193631524 0.272807216 262 -1.1850815653 0.554348515 263 -1.0602272487 1.341139286 264 1.1313881736 0.226194361 265 -2.6758943556 0.324369279 266 -0.1322543796 0.928761702 267 -0.8470355323 2.171225507 268 -1.5502185542 0.846276359 269 0.0078779836 1.311649862 270 -0.6857147051 0.350769761 271 -0.0968486545 0.007882295 272 -0.6753801274 0.100226879 273 -0.2953765370 0.910604404 274 0.1643131318 0.743622886 275 0.7227397313 0.317295570 276 -0.6982099663 0.954618679 277 -0.4524774993 0.507344308 278 0.0369096175 0.006704378 279 -0.5422847034 -1.095044941 280 -1.0081283184 1.040643238 281 -0.7531375893 0.441523342 282 -1.1013657119 -0.235985345 283 0.1544899074 1.180704111 284 -0.5685746731 -0.064871921 285 0.7281179668 1.030397323 286 -0.7948279689 1.561295097 287 -0.6612167513 1.140479203 288 -0.6028132547 -1.023355344 289 -0.0409763284 1.397948522 290 0.1474258767 0.622391703 291 0.6810884155 -0.243086477 292 -0.0402799788 2.285487597 293 0.9666742047 0.812685386 294 0.4911227672 0.885854008 295 -1.0648627331 0.737966222 296 0.1287621032 0.643922005 297 -2.0836009202 -1.978735143 298 -0.4218710826 1.538249350 299 0.2227615369 0.743734742 300 1.0234568839 1.183452225 301 -0.7024855190 1.522143478 302 -0.1592807735 -0.074261712 303 -0.0372226530 0.732802585 304 -0.7440498757 0.304768770 305 0.9795036191 0.343577882 306 -1.9299589360 -0.321439500 307 -1.0272643197 0.238770489 308 -0.1144702533 0.211994515 309 0.6049521542 -0.167981206 310 0.1788276902 0.395191268 311 0.2028903378 0.113589896 312 -0.9137665876 0.975685585 313 0.2503421149 1.342123478 314 1.2451824677 2.108967215 315 -1.0704731321 0.550237904 316 2.3275660465 0.723923368 317 -0.7255468083 1.064085931 318 -0.3715410999 -0.290186437 319 -0.8111132629 0.542675449 320 -0.5920915140 -0.017635613 321 -0.8330475088 1.134306804 322 -0.1225688850 0.642474802 323 0.6964009635 2.035762345 324 -1.2553096837 2.164721957 325 0.0254166722 1.792331558 326 -0.3755917584 1.569988982 327 0.6996697398 1.524423842 328 -0.8516441426 1.852905553 329 -0.4719966572 -0.110713953 330 -0.1066560970 0.214257793 331 -0.6439371084 -0.139750437 332 -0.9531927589 1.411645678 333 0.1701374527 1.843986030 334 -2.0723785950 1.107866522 335 0.6376944017 0.522169797 336 -0.7648457440 0.973751691 337 -0.7076333612 -1.013469864 338 0.0873519772 1.222978207 339 0.0234232255 0.560773845 340 1.6518068228 -0.105887281 341 0.1072626327 1.151386372 342 -3.6027078746 1.055682443 343 -0.0644034996 0.531913774 344 0.1529111048 -0.083605108 345 -0.1998164187 0.832858253 346 -1.1530624495 1.146657286 347 -2.5791764817 -0.385816842 348 -0.8475330954 1.026687772 349 -1.8337024949 -1.912495085 350 -1.4401869805 1.278393507 351 -1.3390647730 1.473875685 352 0.1105152428 -0.330262004 353 0.1551763724 1.055120814 354 -0.5068336723 0.366314521 355 -1.7291779956 -0.452919711 356 0.3770932543 0.981655576 357 -0.0779659417 0.562365453 358 0.4708857264 0.663978801 359 1.5101300841 0.179341896 360 -1.1810615234 -0.071424491 361 0.2054846133 0.879020435 362 -0.1405158143 1.570775872 363 -1.4383254870 0.745414401 364 -0.1014176867 1.882718085 365 0.8837142631 2.211361594 366 -0.6410959157 1.650002646 367 0.0546906325 0.478749648 368 -0.2485896921 0.777522670 369 -1.4006650746 0.511003596 370 -0.9790218634 0.767006011 371 -1.2684644599 1.189006139 372 -0.9854467714 0.695672769 373 -0.0160594052 -0.464733291 374 0.7579995610 1.150332751 375 -0.8322878402 1.151097746 376 -0.9602761371 1.187092498 377 -1.0188306120 1.134371455 378 -0.4020409260 -0.883706041 379 -1.1276397047 1.081862880 380 -1.7430421509 0.818528690 381 -1.5285753385 0.131561311 382 0.5499761138 0.755935649 383 -0.7031745414 1.665669017 384 -0.2537384885 1.962197213 385 -1.3012667232 1.006693088 386 -0.8015836658 0.805706349 387 -0.5547359944 -0.405274888 388 0.5043633257 -1.405825021 389 0.4913070902 1.842626141 390 0.4831879028 1.474033416 391 -0.6985915843 -0.744712316 392 -0.6892520280 0.913481937 393 -0.0361670198 -0.261276878 394 -0.9523598025 1.389097675 395 -0.2841269827 0.343213552 396 0.5834515877 0.775683341 397 -0.1356584131 -0.335589516 398 1.5163164556 0.364347331 399 -0.9760061937 1.032605056 400 0.9697063974 1.173565513 401 0.1459171193 1.519267655 402 -1.4221613655 -0.404586129 403 -0.0388096204 0.744176451 404 -0.2910588988 1.158832712 405 -1.9977974349 -0.236096460 406 -0.4911045748 1.269901066 407 0.7854476760 1.297914310 408 0.7689494848 1.480792859 409 0.0431368923 -0.258240470 410 -0.5591019611 -0.355471878 411 -0.1235343061 0.301956242 412 -0.2315267836 0.969291023 413 -0.6326443057 1.268544388 414 -0.7054666997 1.147514860 415 0.2236799656 0.528303779 416 -1.6722581928 0.925701515 417 0.0531838622 2.642883198 418 -0.5885435628 -0.129310504 419 0.8369693598 2.086646132 420 0.1980238091 1.822475613 421 -1.4985999624 1.140916101 422 -1.9347419774 0.951435848 423 -0.0412218370 1.412991525 424 -1.5747882861 1.285694034 425 -0.6239900533 0.900014941 426 -0.5854389702 0.723555280 427 -0.5549341279 0.470238956 428 -0.2439604876 1.548485947 429 -1.6249140992 0.422467544 430 0.6575210491 1.698095068 431 -0.4338738186 1.423922991 432 -0.1346647620 2.090122695 433 -0.4856647187 0.191305991 434 -1.0250901989 -1.306021077 435 -0.0911151611 -1.651691228 436 -1.7521972530 -2.830040074 437 -1.1276092797 0.603866773 438 -1.6923347284 0.591104463 439 0.3123364073 0.687311161 440 -0.2712344839 -0.493840620 441 -2.5533908917 -3.193309533 442 -0.1711998995 -0.688555907 443 1.2964687215 2.011662683 444 -0.5398201373 0.462319325 445 -0.4412117397 0.045895119 446 0.2333480950 0.761537996 > postscript(file="/var/www/rcomp/tmp/121691335799305.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/www/rcomp/tmp/2mlw41335799305.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/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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/www/rcomp/tmp/3oml51335799305.tab") > > try(system("convert tmp/121691335799305.ps tmp/121691335799305.png",intern=TRUE)) character(0) > try(system("convert tmp/2mlw41335799305.ps tmp/2mlw41335799305.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.880 0.480 2.544