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 = 'male' > 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.24 0.44 0.63 0.64 0.358 NNZFG 0.06 0.15 0.86 0.76 0.241 MRT 0.24 -0.05 0.63 0.46 0.540 AFL 0.91 0.16 0.18 0.89 0.110 LPM 0.94 0.19 0.13 0.94 0.065 LPC 0.78 0.18 0.25 0.71 0.295 W 0.19 0.84 0.13 0.75 0.250 WPA 0.15 0.84 0.08 0.73 0.266 RC1 RC2 RC3 SS loadings 2.51 1.71 1.66 Proportion Var 0.31 0.21 0.21 Cumulative Var 0.31 0.53 0.73 Test of the hypothesis that 3 factors are sufficient. The degrees of freedom for the null model are 28 and the objective function was 4.1 The degrees of freedom for the model are 7 and the objective function was 0.83 The number of observations was 304 with Chi Square = 248.34 with prob < 6.2e-50 Fit based upon off diagonal values = 0.94> fs <- factor.scores(y,fit) > fs RC1 RC2 RC3 1 3.146195446 -0.636561409 1.016478816 2 1.314269086 -0.208806343 -0.161015971 3 0.152004796 0.111392233 1.040573419 4 3.525109409 -0.835569854 -0.587281026 5 2.231410821 0.458918076 2.376549240 6 -0.475959807 -0.677576641 2.099825339 7 -1.082730877 1.324380569 0.647342646 8 1.580817830 -0.235842495 0.458864851 9 1.690628845 -0.148989370 -0.595079661 10 -0.406038249 0.014743475 1.212733661 11 0.277502633 -0.330384432 2.026638188 12 0.484861730 1.125948035 1.318590460 13 -1.046336079 0.957189681 2.037752609 14 0.585565114 1.083467266 0.543424355 15 1.414659233 -0.211190007 -2.431197237 16 -0.269919259 -0.982056224 1.540062330 17 0.248626708 0.834469136 0.823776602 18 -0.853870389 0.963284621 -0.223777525 19 0.130615731 -0.849685624 1.130474136 20 0.769215852 0.155195464 0.869308915 21 -0.813848941 0.135262626 1.785200581 22 -0.324352054 0.627944953 1.810338642 23 1.159868766 -0.012645252 0.646216410 24 0.314846807 -0.401148577 0.003683174 25 1.596775668 0.497258403 0.429142263 26 1.243280073 0.688635422 2.349414928 27 0.122897300 -0.078144971 0.473058730 28 -0.669254977 1.272857795 1.182569037 29 0.717290992 -0.325308428 -0.365924755 30 0.712190650 0.661092058 0.961565572 31 0.752782513 0.660644700 0.754142792 32 4.060387313 -0.009444711 0.030980935 33 -1.012295575 0.827253788 0.693663762 34 0.087450849 -0.702905376 0.685872908 35 -0.757225656 -0.127207204 1.846401306 36 -0.549893277 -0.162373316 1.563188236 37 1.853716556 -0.867412628 1.583926115 38 0.471522282 -0.494438678 0.644882530 39 1.687394608 -0.165329694 0.112465468 40 -0.546630433 -0.069684389 0.170005332 41 0.563244341 0.528292081 0.477958608 42 2.191538318 -0.411811448 -0.816529394 43 3.077378973 0.697679428 -0.514957159 44 1.457783849 0.756836386 0.485720213 45 -0.084121005 -0.522966655 0.625073022 46 3.289405658 -0.766386256 -2.185323721 47 -0.805494530 1.108606401 0.240456697 48 -0.481703764 0.050612211 0.793189365 49 -0.632496996 -0.617397768 -0.053769312 50 -0.632074406 0.224599800 1.181736892 51 3.097670401 0.500072643 -0.802923711 52 0.792302122 -0.903088302 1.860366555 53 0.474955088 0.116751399 0.518928951 54 0.631526099 -1.024681517 -0.313340707 55 0.786499768 -0.673658602 -0.906129636 56 1.251334411 1.257695889 -0.693983601 57 -1.108915021 0.904712419 1.432108416 58 0.657422976 -0.701718823 1.672368654 59 -0.182094876 -0.906438653 1.111714063 60 -0.130121846 -0.151005487 -0.424138196 61 0.311436352 -1.046741910 0.280512872 62 0.497533397 -0.193467573 -1.025890836 63 0.075779967 0.250990700 1.552430800 64 -0.580142145 -0.359937054 0.932391094 65 0.675313123 -0.730888084 0.412751313 66 -0.282321639 0.010939833 -0.134438322 67 -0.291618213 0.499795094 -0.374650147 68 -0.509807550 -0.760529304 -1.121679108 69 -0.220187781 0.879501827 1.057412001 70 1.218043638 0.103515876 -0.710374280 71 -1.221812804 0.317873192 0.961397604 72 0.046263927 1.320683874 1.555888935 73 -0.859134629 -0.229531879 0.209004364 74 -0.498483603 0.393042580 0.539256931 75 -0.122040150 -0.235804538 -0.794555809 76 1.557423212 0.225996056 -0.183530625 77 -0.053880215 -0.927816802 1.385778043 78 2.910258444 -0.621450482 -1.667132144 79 0.020265156 0.684142052 0.237327885 80 0.495771052 -0.259653009 2.233312182 81 -0.350656251 -0.507433769 1.491615102 82 0.431023527 -1.153659364 0.388025362 83 -0.147287783 -0.737047219 0.480724830 84 -0.677973898 0.200469826 -0.050151997 85 -0.938056946 0.735950506 -0.163579983 86 -1.196044368 0.295564402 -0.709810667 87 0.545386792 -0.973067187 1.843785194 88 -0.696245869 -0.629702678 0.960058631 89 -0.445305721 -0.412184454 -0.549547318 90 -0.886904933 -0.173085374 0.465662912 91 -0.751578261 -0.610136095 0.828740134 92 -0.679003276 -0.701846190 0.890804937 93 -0.575463824 -1.049267014 1.649875780 94 -0.125049378 -1.163466541 0.430285317 95 0.919571731 -0.761488583 0.222203666 96 -0.973499082 -0.242641156 -1.104815373 97 -0.239261095 -0.294723028 1.010083231 98 1.173709307 -0.173316491 -0.069093608 99 0.083865113 -0.544244668 0.232904824 100 -0.186698978 -1.139571205 1.188804227 101 -1.020938399 -1.121933980 0.365222812 102 -0.934608256 -0.440597027 -0.053627719 103 -1.036524182 -0.365944272 -0.418407104 104 0.886776765 -1.924439593 0.381030467 105 -0.878534555 -1.191995117 1.175545675 106 -0.808350351 -0.208151535 0.001731943 107 -0.430402446 -0.441876513 0.039129748 108 -0.207835825 -0.886051757 0.872197450 109 -0.268810019 -1.564825385 -0.711155172 110 -0.462755892 0.877235692 0.739178248 111 0.448144295 -0.693127544 -1.225158590 112 -0.404006709 -0.152472661 0.976154783 113 0.323165993 0.066782345 -1.463882863 114 -1.046000508 -0.141083860 -0.297764984 115 -0.431549599 -0.008579581 0.733324764 116 2.323457509 -0.830426551 1.247701632 117 -0.644289766 0.063334266 1.048306484 118 -1.252855173 0.094441823 0.567504580 119 0.339929280 -1.078425875 -0.335716715 120 0.390753103 -1.331317231 0.381178485 121 -0.025790638 -0.433914354 1.410498901 122 -0.381189266 -0.240581695 -1.940457865 123 -0.911836129 -0.332664041 0.759805852 124 -0.492581604 -0.276284102 -0.626291628 125 -1.033808247 0.173301406 -0.137731610 126 -0.934674337 -0.014044940 0.546464534 127 -0.287893677 -0.634089473 1.592699618 128 0.474804174 -1.217953293 0.973314452 129 -0.969452888 -0.718655147 0.075103890 130 0.439027469 -0.391383960 0.987954398 131 -0.288300537 -0.748890428 0.501471414 132 0.169242004 -1.012529374 1.492273721 133 0.430061221 -1.532568616 1.529639388 134 -0.833999995 -0.247471674 1.138365128 135 -0.670489898 0.772340633 1.031556015 136 0.592598355 0.759835459 0.129774726 137 0.480546169 -0.500746109 1.025398720 138 -1.237115430 0.013598436 1.018016544 139 -1.041596148 -0.457943092 -0.254981182 140 -0.601621989 -0.192913475 1.235915159 141 -0.288499498 0.596192726 0.361762462 142 -0.660758217 -0.253607976 1.514137302 143 -0.569325475 -0.343044693 0.842506060 144 -0.490843047 -0.659245799 0.347356145 145 -0.572620364 -0.763737246 1.123627841 146 -0.724886945 -0.723559267 -0.705569554 147 -0.493695703 -0.520889335 1.097659651 148 -1.208050451 -0.473750125 0.923374128 149 -0.852018122 -0.101716752 0.608943024 150 -0.904032550 -0.404237699 -0.669545977 151 -0.408841553 0.935202408 -0.081592154 152 0.405844331 -0.622911597 0.871480180 153 -0.161942000 0.151506352 -1.280502156 154 0.101607249 -0.271284622 -0.444174641 155 -0.163772616 0.086101469 -0.976807061 156 -0.152399240 -0.365443186 0.486542509 157 -0.229884673 0.111171407 -0.190006135 158 -0.675291392 0.651679408 -0.353643216 159 -0.761337984 1.253805253 0.015366376 160 1.692863811 -0.094229223 -2.250510613 161 -0.821661696 1.806145951 -0.037404036 162 -1.156128811 0.710458736 -0.303750718 163 -0.649908771 0.351078897 -0.109849531 164 -0.586019609 -1.672499386 -0.340665188 165 2.216819521 5.574809576 -0.536105599 166 -0.267660095 0.221767451 0.129820281 167 -0.786038141 0.967872840 -0.320887068 168 -0.298004712 -0.811795830 -0.358537443 169 -0.088039005 0.778596699 0.864869443 170 1.469108179 2.299217287 -0.478742148 171 -0.591624847 -0.224578464 -0.763044923 172 -0.573193441 -0.602100458 0.602579793 173 -0.215388950 0.522270629 0.678515284 174 -0.855526883 0.567221331 0.018472377 175 -0.417349089 -0.276205863 -0.073286771 176 -0.692763131 0.221905136 -0.335038093 177 -0.041215683 -0.683084269 -1.241240012 178 1.719237302 1.989025038 -0.560803125 179 1.782435564 -0.213820908 -1.569194517 180 -0.103490291 2.158737914 0.213051992 181 -0.116585126 -0.804817067 0.285990825 182 0.703752990 -0.688267323 0.691178743 183 -1.498824191 -1.587161781 -1.824493319 184 -0.726804731 1.278759477 -1.213654174 185 -0.738347447 0.960716440 0.798349481 186 -0.487403739 0.190204299 -0.156466111 187 -1.462619896 -1.655604310 -1.976980065 188 -0.997744150 1.244498450 0.771546737 189 -0.803912679 1.094332885 0.089474814 190 -0.886200989 2.552785696 0.045533800 191 0.620704636 -0.289774216 -1.701682511 192 0.928311698 0.056466345 -1.141593137 193 -0.421568335 -0.492791354 -0.048679710 194 0.107059722 5.944977837 -1.109936144 195 -0.004521688 -0.065116600 -1.951353848 196 3.652519264 -0.877511424 -0.049122191 197 0.857232836 0.075282953 0.425932049 198 1.472933668 0.411871149 -0.324126510 199 3.660489973 -2.852763154 -1.066078534 200 0.283567044 -0.720370746 0.519380821 201 0.110486508 0.497615443 0.451572976 202 -0.106197705 1.814939340 -0.177028640 203 0.339638277 -0.762849298 0.618664141 204 -1.217334678 0.293754426 0.634457480 205 -0.714099097 0.134371246 -0.218221170 206 -0.434546568 -0.038959618 -0.101742937 207 -0.123614008 0.648381413 0.606371033 208 0.200070058 0.390005689 1.223764386 209 -0.160108752 0.077162815 0.930578943 210 -0.173214931 3.339071686 -0.460099940 211 -0.328477515 0.302896078 0.193495733 212 0.823327735 0.504112137 0.315041161 213 3.089901604 1.571909562 -0.103928286 214 0.013424381 1.210278179 -0.730035580 215 1.341286922 -1.012433995 0.160890211 216 -0.592530106 0.440553329 1.162351268 217 0.621688236 0.995130447 0.497445435 218 1.791029551 0.192153946 -0.263944739 219 2.004419679 2.346995754 0.093525818 220 -1.440495049 -1.697430299 -2.070166410 221 -0.259177133 0.688935132 0.847158657 222 0.262486651 0.050331493 0.679344720 223 0.268666207 0.910967848 0.574333682 224 -0.450567399 0.313267031 -0.230983551 225 -0.460417866 -0.336827983 -0.183217467 226 -0.134831328 1.186084879 1.261820742 227 0.579510869 -0.550439155 1.734365743 228 -0.956015509 0.569501782 -0.328542195 229 -0.750265814 0.004830423 -2.221966177 230 0.198745726 0.167405108 -0.260142762 231 0.466207933 -0.722289767 0.082770911 232 -0.342859854 1.350530352 -1.360186954 233 -0.665132641 0.379203936 -1.417266201 234 -0.333862041 -0.621216367 -0.492808044 235 -0.506859440 0.313026757 -0.489012603 236 -0.611656353 0.299819331 -1.188634856 237 0.634857512 0.739255097 -0.438237276 238 -0.315631050 -0.194527831 -0.492296964 239 0.046151904 0.565170373 -0.512325479 240 0.474360796 1.232593585 -0.524728799 241 -0.438052429 -0.881217237 -0.019089381 242 0.118060459 -0.124345615 -1.662430930 243 -0.115057775 -1.244058807 -0.573127420 244 0.301309368 1.116511201 0.185648269 245 -0.750788189 0.198782182 -0.145366606 246 -0.218914019 1.036530500 -0.942128622 247 -0.773117947 0.431609623 -0.517813486 248 -0.034083252 1.001926607 -0.915012833 249 -0.767809848 1.426931747 -1.061746567 250 -0.477260346 -2.000937671 -1.382085873 251 -0.148948117 -0.521149251 0.101116769 252 0.914438067 0.426285943 -0.020039258 253 -0.934047197 0.605237571 -0.681338527 254 -0.515181173 -0.496672871 -0.065209875 255 0.129528539 0.460937887 0.244330723 256 0.833717710 -0.552807373 -1.325246956 257 -0.875900058 1.420525482 -0.719427148 258 -0.308890391 -1.105550009 -1.851367296 259 -0.792625467 -0.997718554 -1.037118191 260 1.958747162 -0.713402389 -0.064223230 261 0.029959569 -2.320324418 -0.418277480 262 -1.034988968 -0.367913157 -1.057831570 263 -0.399735538 0.176570132 -0.766603526 264 -0.603046914 -0.324889005 -0.329684251 265 -0.198890229 0.389826598 -1.168535286 266 -0.719151503 0.262388231 -0.093340302 267 1.390660137 0.650059416 0.096993215 268 -0.237601113 0.629451966 -1.247730945 269 0.108633819 0.031441981 -0.759993737 270 -0.819965330 0.551162646 -1.670441893 271 -0.677842041 -1.308596020 -2.122540932 272 -1.244663442 -0.127931083 -2.058790780 273 -0.484310340 -1.459522838 -0.747983661 274 -0.654098230 0.935591747 -0.508448124 275 -0.418274147 0.773242440 -0.354692447 276 -0.720828597 -0.213034512 -1.353357848 277 -1.093448756 3.272019694 -0.761030936 278 -1.072857004 0.107024983 -0.742561103 279 -0.877351094 -0.860001132 -1.560954385 280 0.181545250 -1.948052160 -1.136516978 281 -0.216972577 -1.046922108 -1.813712189 282 -0.191424567 1.668408485 -1.778214156 283 -0.672478257 -0.759886858 -0.040383016 284 -0.779480147 -0.457814728 -0.191536863 285 -0.047238730 -0.385180564 -1.171412691 286 -0.950796922 0.204329704 -0.398241608 287 1.031790667 -1.172725447 -0.747020456 288 -0.698563989 0.162038335 -0.346118322 289 -0.819628638 1.722485668 -2.274853961 290 1.728915350 1.157212199 -1.411998967 291 -0.501355469 0.485691738 -0.434262161 292 0.304321648 -0.207116313 -0.623747678 293 -0.437744290 -0.269799853 -0.392325619 294 -0.664380938 -0.022624685 -1.719004785 295 -1.440495049 -1.697430299 -2.070166410 296 -0.275495361 -0.737422200 0.594271497 297 -0.504932239 1.016164919 -0.064624411 298 -0.413212144 -0.504657128 -1.025062429 299 -0.025992255 -0.939885849 -0.598685014 300 0.115639654 -2.291257733 -1.340882125 301 -1.104548299 -0.239857537 -0.731651130 302 -0.788762023 -0.010019079 -0.293844574 303 -1.111573642 -1.324258558 -2.059618229 304 -0.302021764 -0.034118056 -0.924162663 > postscript(file="/var/wessaorg/rcomp/tmp/1ikeu1335787673.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/214lq1335787673.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/3l5sf1335787673.tab") > > try(system("convert tmp/1ikeu1335787673.ps tmp/1ikeu1335787673.png",intern=TRUE)) character(0) > try(system("convert tmp/214lq1335787673.ps tmp/214lq1335787673.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.908 0.204 1.105