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 = 'Learning Activities' > par4 = 'all' > par3 = 'all' > par2 = 'female' > par1 = '3' > 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 RC3 h2 u2 BC 0.25 0.43 0.60 0.61 0.391 NNZFG -0.01 -0.03 0.85 0.72 0.280 MRT 0.11 -0.04 0.62 0.40 0.602 AFL 0.94 0.08 0.01 0.90 0.104 LPM 0.95 0.19 0.06 0.94 0.055 LPC 0.82 0.05 0.28 0.76 0.240 W 0.05 0.85 0.09 0.73 0.273 WPA 0.14 0.84 -0.09 0.74 0.257 RC1 RC2 RC3 SS loadings 2.57 1.66 1.57 Proportion Var 0.32 0.21 0.20 Cumulative Var 0.32 0.53 0.72 Test of the hypothesis that 3 factors are sufficient. The degrees of freedom for the null model are 28 and the objective function was 3.76 The degrees of freedom for the model are 7 and the objective function was 0.77 The number of observations was 254 with Chi Square = 190.81 with prob < 1e-37 Fit based upon off diagonal values = 0.92> fs <- factor.scores(y,fit) > fs RC1 RC2 RC3 1 0.1932507684 0.696450034 -0.165295359 2 0.3845048454 0.328414387 0.741425088 3 -0.5916497220 0.737976697 -0.619081951 4 1.1406850970 -0.245475265 -0.619346162 5 -0.6410918952 -0.225349125 0.691420618 6 -0.1129522459 -0.026778076 -0.891211120 7 -0.3704235108 -0.023609284 -0.685572985 8 0.3169574836 -0.819927460 2.209658930 9 0.0336429333 -0.532375254 2.011948059 10 -0.7577718294 -0.456261198 0.720246055 11 -0.7586995956 0.352427884 1.022924068 12 0.2111087201 -0.120849987 0.835502150 13 -0.0756532674 1.097067875 1.353942551 14 0.3200981859 -0.301772733 2.832079194 15 0.1804141298 0.213537615 0.646206275 16 0.4634665534 0.684782330 0.053258731 17 -0.1096521268 0.801788638 1.716792551 18 0.3005084794 0.796275657 0.423590101 19 0.0006536033 0.176814537 -0.037708374 20 1.2154437100 1.067669993 0.676587220 21 5.8520678074 0.620159035 -2.192270867 22 1.2872623348 0.748304096 -0.319287789 23 -0.0387802949 0.965242151 0.251197006 24 -0.0431720900 0.499659100 0.114803534 25 0.2265753408 -0.212346082 1.889268499 26 0.4162433983 -0.123459245 -0.199827359 27 2.4079721032 -0.500315543 -1.514289497 28 -0.6097685010 1.087973293 0.373957805 29 -0.4581490854 0.815421394 1.636062146 30 1.5039352952 0.316381413 0.175373569 31 -0.0956002631 1.137621078 2.155822247 32 -0.1557310999 -0.294917198 -0.501421621 33 1.4827483163 0.761329675 1.125566169 34 0.1879790441 1.145611687 -0.410371393 35 0.0711602234 -0.530800940 1.367669375 36 -0.3853719351 1.090055678 0.325291453 37 -0.6281332575 -1.609576279 1.494753239 38 -0.2520359849 -0.162121616 1.378148810 39 0.7095428927 -0.693596170 1.847281477 40 -0.9645581795 0.615107771 0.822680195 41 -0.2006665564 -0.243457499 1.254919315 42 0.8823869910 -0.546275047 1.860081862 43 1.8462491958 0.378774794 2.059988084 44 0.3685716711 -0.305026068 -0.967596461 45 2.2448175712 -0.365225773 -1.140490794 46 0.4101285889 0.448410615 1.471503876 47 -0.5861881431 -0.228514993 1.243287090 48 0.1484933335 -0.973805738 -0.220495184 49 -0.5185326981 0.349628160 -1.020287422 50 -0.7870357367 -0.278088789 0.999177552 51 0.9602405832 -0.265023560 0.488101969 52 -0.4131716829 0.227113348 2.311281834 53 0.2973341171 -0.227638921 0.444006530 54 5.1267594518 -1.595573494 -2.308066438 55 2.7814512251 -0.491576358 -0.026697854 56 -0.4568996676 -1.359614367 0.147046366 57 -0.5095965476 -1.154558569 0.250361612 58 1.7192773659 -0.237722945 -0.249355443 59 -0.6729022429 -0.484524915 -0.868378369 60 0.5167310753 -0.365581353 0.989598218 61 0.6978787985 0.385299389 -0.041579166 62 -0.3813115591 -0.948468221 1.680924278 63 0.1897403688 -0.403596765 0.954250935 64 4.1182016482 -1.748709940 0.717080091 65 -1.1175637618 -0.281379562 0.349815775 66 3.5367655349 -0.583093999 0.886474307 67 -0.3661998996 -0.596272704 0.953443993 68 1.3773284167 -1.702731821 1.378941519 69 -0.9716939445 -0.621380805 0.511581213 70 -0.4658157116 -1.060775795 0.090759549 71 -0.5141769053 -0.035829730 0.307535276 72 -0.8849589252 0.274509793 0.677514882 73 0.8981392510 -1.119615210 0.528624611 74 -0.9742673340 -0.493726661 -0.145974880 75 0.8615946744 -1.609729489 1.084805554 76 -0.5489189976 -0.691466135 0.340117315 77 -0.5875612202 -0.282180103 0.564937098 78 -0.9823119177 -1.013823099 0.082436297 79 0.2450571338 -1.558614203 0.198515309 80 -0.0321569369 0.978388269 0.162557698 81 -0.2858507747 -0.330574735 0.765031933 82 -0.6307006198 -0.675478399 1.474691964 83 0.3353169337 -0.832593479 -0.245604160 84 -0.2802349141 -0.471806877 0.442334289 85 -0.6578956926 -0.360971845 1.064030616 86 -0.2558011148 -1.134091960 -0.186763086 87 -0.9050533312 -0.617247930 -0.316123445 88 0.8982311084 -0.998922555 1.507696227 89 -0.7912716750 0.869762684 0.938826905 90 -0.5690605020 -0.934375344 -0.404011596 91 -0.7289421059 -0.979337970 -0.272530691 92 0.3988636148 -0.301748025 0.280471935 93 -0.4776591757 -1.013294004 0.740065051 94 -0.8028248488 -1.146386822 0.431614870 95 0.4717612090 -0.546340098 1.399604453 96 -0.6237458391 -1.363015513 0.191299353 97 -1.0371411168 -0.216906267 0.077703621 98 -0.3621344073 -0.348650715 0.847398121 99 -0.7087046082 -0.318597594 0.384076759 100 -0.7867891837 0.818480592 -0.083582003 101 -0.4731265043 -1.204722322 0.487112015 102 -0.9688766976 -0.064514303 0.658175741 103 -0.2372515081 -1.202150122 0.342166990 104 -0.3625703973 0.295502252 0.010087442 105 -0.6848097678 0.163650235 -0.339591480 106 -1.0119249063 -0.807209985 0.561245376 107 -0.1566683432 -1.237486707 0.365944589 108 -0.2431133833 -1.055144840 0.987937735 109 -0.1205526571 -1.380019384 1.239478945 110 1.8449705175 -0.185475644 -0.039047029 111 -0.9954021172 -0.238253714 1.362819746 112 1.8082164169 -0.046654689 0.023732426 113 -0.6068599846 -0.841821544 0.165521547 114 -0.5947137990 0.774480367 0.247976094 115 1.8726238517 -1.686027134 -1.431563335 116 -0.8900629654 0.503433774 0.258538268 117 0.6427718814 -1.031620847 -0.269352627 118 1.2139130560 -1.263960692 0.052216217 119 -0.3581997045 -0.792082990 0.294450033 120 -0.7711850750 0.017735280 0.007247995 121 -0.8320545948 -0.495111020 0.373708351 122 -0.2860971426 -0.111085729 -0.166863145 123 -0.1144559651 0.271789385 0.102068405 124 -0.7056977112 0.745928124 0.180114477 125 -0.3045382164 -0.321211115 1.042060471 126 -0.9672145262 -0.729370088 0.163241434 127 -0.0562862640 -0.350920248 0.051769003 128 -0.1199539085 -0.409390255 0.272589798 129 -0.4506689316 -1.479114991 0.024591814 130 -0.4048383323 -0.352805248 0.726919339 131 -1.0243872547 -0.347004850 0.774448381 132 -0.4972534937 -0.507566311 0.732581167 133 0.7102001058 0.742311582 -1.334442157 134 -0.2995073579 -0.789200357 0.481192076 135 0.4069086630 -0.781733889 0.511834202 136 -0.4759463255 -0.449489738 0.021324490 137 -0.9152867247 1.231378239 0.529583704 138 -0.5758967287 0.383684436 0.185815221 139 -0.3352887714 0.147832035 0.270640966 140 -0.4511794360 0.750754363 0.132463758 141 1.8597791313 2.104548159 0.603058002 142 -0.3630719295 0.606816139 0.099103274 143 -0.1066645340 0.151962635 0.042130276 144 1.9797942636 0.757103485 -0.209310135 145 2.4516865035 -0.316747201 1.537043759 146 -0.1600359281 0.517408912 0.416632394 147 -0.7854754035 2.834201391 -0.943545005 148 0.3354809899 1.939001359 -0.757292208 149 0.0111706027 0.095914534 1.039077225 150 0.3234037575 1.687353483 0.202306708 151 -0.6864275252 0.067910735 -0.039736420 152 -0.7454098435 -0.366651490 -1.705553178 153 0.1225783160 0.913770612 -1.040244345 154 -0.0323742812 -0.801862647 -1.338966863 155 -0.1427726361 0.820473701 -1.055462768 156 -0.2340644440 -2.368398375 -2.230927213 157 -0.7684579338 -1.208827728 -1.569690928 158 5.0841802917 0.571830140 -0.977770304 159 0.2473757111 0.074560200 -0.279287152 160 -0.0339317891 -0.846009302 -0.041684325 161 0.0495928943 3.538489495 -0.083594984 162 -0.5972346592 -0.446556155 2.010158513 163 -0.3847723496 0.968028790 0.872596551 164 -0.6469942432 0.970894463 -0.150470182 165 0.2185359259 -1.046902147 0.428232373 166 0.1384832752 0.550307633 0.420656513 167 0.8394474214 2.326655211 0.714607094 168 -0.5744676088 0.488516971 0.333337164 169 1.6928729886 0.177768679 0.869730127 170 -0.1966753883 -0.656342242 -0.885490476 171 -0.3246893303 0.983015876 0.259563451 172 1.5109618280 0.772862043 1.016451625 173 -0.5089387439 -0.018335584 -0.163700352 174 -0.3964746637 -1.006297205 -1.512969898 175 -0.8033634254 -0.212976154 -1.692569302 176 -0.3520020617 1.118737541 -0.125804483 177 0.2875629349 0.941774695 0.146600047 178 0.4236329815 2.148734897 -0.735949837 179 0.1056704799 2.058207689 0.485333554 180 -0.3679616783 0.948691867 -0.084875499 181 -0.1373346803 4.192175532 0.390743122 182 -0.4491370356 -0.565011627 0.737149633 183 -0.1668258253 0.766153157 -0.214021141 184 1.0227539756 -0.068534768 0.582029816 185 -0.2572994689 0.393837688 -0.045496992 186 0.7986962956 1.604312928 1.196665582 187 0.9037534465 0.600594546 1.085063701 188 -0.3624776707 0.621899737 -0.768623878 189 -0.2406957953 -0.557257194 -0.860551652 190 -0.6090301334 0.413383120 0.659739062 191 0.1405671898 -0.711996960 0.186090585 192 0.4844317395 0.105425947 1.415664963 193 -0.1277559522 -0.392678207 -0.916333750 194 -0.0770384441 -1.000881636 -1.126268419 195 -0.3028581381 1.733897872 -0.938986562 196 -0.7179521970 0.088327866 -0.634008268 197 -0.8320173087 -0.192552271 -0.314657454 198 0.7333908472 1.650378661 -0.873437677 199 0.5911770487 0.821306911 0.387725732 200 -0.2095340954 -2.491794549 -1.816928493 201 -0.6512411789 -1.378483413 0.866027207 202 -0.2745215522 -0.645526801 0.354440396 203 -1.1621306315 -2.231509103 -2.868551356 204 -0.8580843615 1.982754822 -0.176669831 205 -0.4590932127 -0.346119347 0.032318042 206 -0.8253275415 1.848037874 -1.015951176 207 -0.8981313636 -0.190147862 -1.269577587 208 -0.1531576958 0.309084106 -1.191764153 209 -1.0741100848 -0.231985549 -1.266346709 210 -0.5866197243 -0.072755800 -1.396321902 211 -0.7323618497 1.558625528 -1.047990416 212 0.6399900252 -0.440437899 -0.614891481 213 -0.6379615491 0.635510048 -0.001613024 214 -0.2338395695 -0.003887360 -1.468307217 215 -1.0161741682 1.211047501 -0.858522042 216 -0.0224255154 -0.160531502 -0.598031108 217 0.2078065488 -0.069415579 -2.249222914 218 1.5829733272 1.107523447 -1.483485465 219 -0.5602969013 0.388607454 0.128123497 220 -0.4240344236 -0.213713186 -1.412957712 221 -0.5727818279 1.844034900 -0.358987916 222 -0.0801754785 -0.822762242 -0.404688218 223 -0.7244284354 -0.584673013 -0.205596121 224 -0.3169129613 -0.456173956 -0.447732684 225 -0.0236749894 -0.240351880 -0.344289956 226 -0.3477873205 1.937231876 -0.723889580 227 -0.2423199073 -1.047134483 -1.783685668 228 -0.0133225163 -0.249070356 -1.285802472 229 -0.4851520408 0.565564312 -0.981039339 230 -0.5722159141 -1.428723386 -1.706581438 231 0.1123100132 2.553580426 -0.368332498 232 -0.6627658253 -0.861348086 -0.388678916 233 -0.6797585744 -0.029241403 0.090390539 234 -0.3835623495 0.989138603 -0.600500780 235 -0.4900549826 -2.443217182 -1.371314660 236 -0.6529630173 -1.333801956 -1.505379845 237 -0.2059491852 0.978064644 -2.626322881 238 -0.1911046571 -1.082318683 -2.096173950 239 -0.7598529786 1.214965154 -0.926591649 240 -0.7191095546 -0.183881814 -0.835716893 241 -0.5093831794 0.812857017 -1.352290858 242 -0.5970975817 -0.885214277 -0.953968871 243 -0.7399787418 -0.465639528 -1.844486559 244 -0.0248016481 2.282700293 -0.747933236 245 -0.2688040293 0.906125708 -1.065105789 246 -0.0035662385 -0.766715547 -0.595345664 247 -0.6131788096 -0.132164493 -0.914018312 248 -0.0823613736 1.502477531 -1.093468810 249 -0.2288878131 0.935056227 -0.687999015 250 -0.3051797637 0.137855800 -1.103433354 251 -0.0542310418 -0.003014612 -1.794983496 252 -0.4058142127 0.689800063 -1.093710606 253 -0.7030708419 0.371541170 -1.698391369 254 -0.4884254353 -0.623142823 -0.483425090 > postscript(file="/var/wessaorg/rcomp/tmp/185t11335787724.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/2zj861335787724.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/3wjge1335787724.tab") > > try(system("convert tmp/185t11335787724.ps tmp/185t11335787724.png",intern=TRUE)) character(0) > try(system("convert tmp/2zj861335787724.ps tmp/2zj861335787724.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.874 0.195 1.065