R version 2.8.0 (2008-10-20) Copyright (C) 2008 The R Foundation for Statistical Computing ISBN 3-900051-07-0 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. Natural language support but running in an English locale 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. > x <- array(list(1 + ,NA + ,NA + ,0.52 + ,6.82 + ,6.76 + ,2.81 + ,3.00 + ,5.00 + ,3.00 + ,2 + ,6.30 + ,0.30 + ,0.92 + ,3.00 + ,3.82 + ,1.62 + ,3.00 + ,1.00 + ,3.00 + ,3 + ,NA + ,NA + ,1.10 + ,3.53 + ,4.65 + ,1.78 + ,1.00 + ,1.00 + ,1.00 + ,4 + ,NA + ,NA + ,1.22 + ,-0.04 + ,3.76 + ,1.40 + ,5.00 + ,2.00 + ,3.00 + ,5 + ,2.10 + ,0.26 + ,0.59 + ,6.41 + ,6.66 + ,2.80 + ,3.00 + ,5.00 + ,4.00 + ,6 + ,9.10 + ,-0.15 + ,0.99 + ,4.02 + ,5.25 + ,2.26 + ,4.00 + ,4.00 + ,4.00 + ,7 + ,15.80 + ,0.59 + ,1.29 + ,-1.64 + ,-0.52 + ,1.54 + ,1.00 + ,1.00 + ,1.00 + ,8 + ,5.20 + ,0.00 + ,0.79 + ,5.20 + ,5.23 + ,2.59 + ,4.00 + ,5.00 + ,4.00 + ,9 + ,10.90 + ,0.56 + ,1.16 + ,3.52 + ,4.41 + ,1.80 + ,1.00 + ,2.00 + ,1.00 + ,10 + ,8.30 + ,0.15 + ,0.99 + ,4.72 + ,5.64 + ,2.36 + ,1.00 + ,1.00 + ,1.00 + ,11 + ,11.00 + ,0.18 + ,1.10 + ,-0.37 + ,3.81 + ,2.05 + ,5.00 + ,4.00 + ,4.00 + ,12 + ,3.20 + ,-0.15 + ,0.59 + ,5.67 + ,5.63 + ,2.45 + ,5.00 + ,5.00 + ,5.00 + ,13 + ,7.60 + ,0.43 + ,1.01 + ,-0.26 + ,3.38 + ,NA + ,2.00 + ,1.00 + ,2.00 + ,14 + ,NA + ,NA + ,0.49 + ,5.27 + ,5.62 + ,2.56 + ,5.00 + ,5.00 + ,5.00 + ,15 + ,6.30 + ,0.32 + ,0.92 + ,-1.12 + ,3.08 + ,1.62 + ,1.00 + ,1.00 + ,1.00 + ,16 + ,8.60 + ,NA + ,0.93 + ,3.48 + ,4.40 + ,1.45 + ,2.00 + ,2.00 + ,2.00 + ,17 + ,6.60 + ,0.61 + ,1.03 + ,-0.11 + ,3.54 + ,1.62 + ,2.00 + ,2.00 + ,2.00 + ,18 + ,9.50 + ,0.08 + ,1.03 + ,-0.70 + ,3.70 + ,2.08 + ,2.00 + ,2.00 + ,2.00 + ,19 + ,4.80 + ,0.11 + ,0.79 + ,3.15 + ,4.24 + ,NA + ,1.00 + ,2.00 + ,1.00 + ,20 + ,12.00 + ,0.79 + ,1.26 + ,4.78 + ,4.91 + ,NA + ,1.00 + ,1.00 + ,1.00 + ,21 + ,NA + ,-0.52 + ,NA + ,5.72 + ,5.83 + ,2.60 + ,5.00 + ,5.00 + ,5.00 + ,22 + ,3.30 + ,-0.30 + ,0.58 + ,4.44 + ,5.06 + ,2.17 + ,5.00 + ,5.00 + ,5.00 + ,23 + ,11.00 + ,0.53 + ,1.16 + ,-0.92 + ,3.00 + ,1.20 + ,3.00 + ,1.00 + ,2.00 + ,24 + ,NA + ,NA + ,1.08 + ,5.32 + ,5.61 + ,2.40 + ,1.00 + ,4.00 + ,1.00 + ,25 + ,4.70 + ,0.18 + ,0.79 + ,4.93 + ,5.51 + ,2.49 + ,1.00 + ,3.00 + ,1.00 + ,26 + ,NA + ,NA + ,1.11 + ,4.56 + ,5.08 + ,1.80 + ,1.00 + ,1.00 + ,1.00 + ,27 + ,10.40 + ,0.53 + ,1.14 + ,-1.00 + ,3.60 + ,1.45 + ,5.00 + ,1.00 + ,3.00 + ,28 + ,7.40 + ,-0.10 + ,0.91 + ,3.02 + ,3.74 + ,1.83 + ,5.00 + ,3.00 + ,4.00 + ,29 + ,2.10 + ,-0.10 + ,0.46 + ,5.72 + ,5.82 + ,2.53 + ,5.00 + ,5.00 + ,5.00 + ,30 + ,NA + ,NA + ,1.03 + ,5.00 + ,5.20 + ,2.00 + ,1.00 + ,1.00 + ,1.00 + ,31 + ,NA + ,NA + ,NA + ,4.54 + ,4.75 + ,1.52 + ,3.00 + ,5.00 + ,4.00 + ,32 + ,7.70 + ,0.15 + ,0.96 + ,-2.30 + ,-0.85 + ,1.33 + ,5.00 + ,2.00 + ,4.00 + ,33 + ,17.90 + ,0.30 + ,1.30 + ,-2.00 + ,-0.60 + ,1.70 + ,1.00 + ,1.00 + ,1.00 + ,34 + ,6.10 + ,0.28 + ,0.90 + ,4.79 + ,6.12 + ,2.43 + ,1.00 + ,1.00 + ,1.00 + ,35 + ,8.20 + ,0.38 + ,1.03 + ,-0.91 + ,3.48 + ,1.48 + ,2.00 + ,1.00 + ,1.00 + ,36 + ,8.40 + ,0.45 + ,1.05 + ,3.13 + ,3.91 + ,1.65 + ,3.00 + ,1.00 + ,3.00 + ,37 + ,11.90 + ,0.11 + ,1.12 + ,-1.64 + ,-0.40 + ,1.28 + ,4.00 + ,1.00 + ,3.00 + ,38 + ,10.80 + ,0.30 + ,1.11 + ,-1.32 + ,-0.48 + ,1.48 + ,4.00 + ,1.00 + ,3.00 + ,39 + ,13.80 + ,0.75 + ,1.29 + ,3.23 + ,3.80 + ,1.08 + ,2.00 + ,1.00 + ,1.00 + ,40 + ,14.30 + ,0.49 + ,1.24 + ,3.54 + ,4.03 + ,2.08 + ,2.00 + ,1.00 + ,1.00 + ,41 + ,NA + ,0.00 + ,NA + ,5.40 + ,5.69 + ,2.64 + ,5.00 + ,5.00 + ,5.00 + ,42 + ,15.20 + ,0.26 + ,1.23 + ,-0.32 + ,4.19 + ,2.15 + ,2.00 + ,2.00 + ,2.00 + ,43 + ,10.00 + ,-0.05 + ,1.04 + ,4.00 + ,5.06 + ,2.23 + ,4.00 + ,4.00 + ,4.00 + ,44 + ,11.90 + ,0.26 + ,1.14 + ,3.21 + ,4.06 + ,1.23 + ,2.00 + ,1.00 + ,2.00 + ,45 + ,6.50 + ,0.28 + ,0.92 + ,5.28 + ,5.26 + ,2.06 + ,4.00 + ,4.00 + ,4.00 + ,46 + ,7.50 + ,-0.05 + ,0.92 + ,3.40 + ,4.08 + ,1.49 + ,5.00 + ,5.00 + ,5.00 + ,47 + ,NA + ,NA + ,1.10 + ,3.63 + ,4.59 + ,1.80 + ,2.00 + ,2.00 + ,2.00 + ,48 + ,10.60 + ,0.41 + ,1.12 + ,-0.55 + ,3.28 + ,1.32 + ,3.00 + ,1.00 + ,3.00 + ,49 + ,7.40 + ,0.38 + ,0.99 + ,3.63 + ,4.70 + ,1.72 + ,1.00 + ,1.00 + ,1.00 + ,50 + ,8.40 + ,0.08 + ,0.98 + ,3.83 + ,5.25 + ,2.21 + ,2.00 + ,3.00 + ,2.00 + ,51 + ,5.70 + ,-0.05 + ,0.82 + ,-0.12 + ,4.09 + ,2.35 + ,2.00 + ,2.00 + ,2.00 + ,52 + ,4.90 + ,-0.30 + ,0.73 + ,3.56 + ,4.32 + ,2.35 + ,3.00 + ,2.00 + ,3.00 + ,53 + ,NA + ,NA + ,0.41 + ,4.17 + ,4.99 + ,2.18 + ,5.00 + ,5.00 + ,5.00 + ,54 + ,3.20 + ,-0.22 + ,0.58 + ,4.74 + ,5.24 + ,2.18 + ,5.00 + ,5.00 + ,5.00 + ,55 + ,NA + ,NA + ,1.04 + ,3.15 + ,4.10 + ,1.95 + ,2.00 + ,2.00 + ,2.00 + ,56 + ,8.10 + ,0.34 + ,1.01 + ,-1.22 + ,3.00 + ,NA + ,3.00 + ,1.00 + ,2.00 + ,57 + ,11.00 + ,0.36 + ,1.12 + ,-0.05 + ,3.41 + ,1.78 + ,2.00 + ,1.00 + ,2.00 + ,58 + ,4.90 + ,-0.30 + ,0.73 + ,3.30 + ,4.09 + ,2.30 + ,3.00 + ,1.00 + ,3.00 + ,59 + ,13.20 + ,0.41 + ,1.20 + ,-0.98 + ,3.40 + ,1.66 + ,3.00 + ,2.00 + ,2.00 + ,60 + ,9.70 + ,-0.22 + ,1.01 + ,3.62 + ,4.76 + ,2.32 + ,4.00 + ,3.00 + ,4.00 + ,61 + ,12.80 + ,0.82 + ,1.29 + ,3.54 + ,3.59 + ,1.15 + ,2.00 + ,1.00 + ,1.00 + ,62 + ,NA + ,NA + ,NA + ,3.61 + ,4.23 + ,1.58 + ,3.00 + ,1.00 + ,1.00) + ,dim=c(10 + ,62) + ,dimnames=list(c('label' + ,'SWS' + ,'Pslog' + ,'Llog' + ,'wblog' + ,'wbrlog' + ,'tglog' + ,'P' + ,'S' + ,'D ') + ,1:62)) > y <- array(NA,dim=c(10,62),dimnames=list(c('label','SWS','Pslog','Llog','wblog','wbrlog','tglog','P','S','D '),1:62)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par1 = '2' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Dr. Ian E. Holliday > #To cite this work: Ian E. Holliday, 2009, YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: > #Technical description: > library(psych) > par1 <- as.numeric(par1) > x <- t(x) > nrows <- length(x[,1]) > ncols <- length(x[1,]) > y <- array(as.double(x[1:nrows,2:ncols]),dim=c(nrows,ncols-1)) > colnames(y) <- colnames(x)[2:ncols] > rownames(y) <- x[,1] > y SWS Pslog Llog wblog wbrlog tglog P S D\r\r\r 1 NA NA 0.52 6.82 6.76 2.81 3 5 3 2 6.3 0.30 0.92 3.00 3.82 1.62 3 1 3 3 NA NA 1.10 3.53 4.65 1.78 1 1 1 4 NA NA 1.22 -0.04 3.76 1.40 5 2 3 5 2.1 0.26 0.59 6.41 6.66 2.80 3 5 4 6 9.1 -0.15 0.99 4.02 5.25 2.26 4 4 4 7 15.8 0.59 1.29 -1.64 -0.52 1.54 1 1 1 8 5.2 0.00 0.79 5.20 5.23 2.59 4 5 4 9 10.9 0.56 1.16 3.52 4.41 1.80 1 2 1 10 8.3 0.15 0.99 4.72 5.64 2.36 1 1 1 11 11.0 0.18 1.10 -0.37 3.81 2.05 5 4 4 12 3.2 -0.15 0.59 5.67 5.63 2.45 5 5 5 13 7.6 0.43 1.01 -0.26 3.38 NA 2 1 2 14 NA NA 0.49 5.27 5.62 2.56 5 5 5 15 6.3 0.32 0.92 -1.12 3.08 1.62 1 1 1 16 8.6 NA 0.93 3.48 4.40 1.45 2 2 2 17 6.6 0.61 1.03 -0.11 3.54 1.62 2 2 2 18 9.5 0.08 1.03 -0.70 3.70 2.08 2 2 2 19 4.8 0.11 0.79 3.15 4.24 NA 1 2 1 20 12.0 0.79 1.26 4.78 4.91 NA 1 1 1 21 NA -0.52 NA 5.72 5.83 2.60 5 5 5 22 3.3 -0.30 0.58 4.44 5.06 2.17 5 5 5 23 11.0 0.53 1.16 -0.92 3.00 1.20 3 1 2 24 NA NA 1.08 5.32 5.61 2.40 1 4 1 25 4.7 0.18 0.79 4.93 5.51 2.49 1 3 1 26 NA NA 1.11 4.56 5.08 1.80 1 1 1 27 10.4 0.53 1.14 -1.00 3.60 1.45 5 1 3 28 7.4 -0.10 0.91 3.02 3.74 1.83 5 3 4 29 2.1 -0.10 0.46 5.72 5.82 2.53 5 5 5 30 NA NA 1.03 5.00 5.20 2.00 1 1 1 31 NA NA NA 4.54 4.75 1.52 3 5 4 32 7.7 0.15 0.96 -2.30 -0.85 1.33 5 2 4 33 17.9 0.30 1.30 -2.00 -0.60 1.70 1 1 1 34 6.1 0.28 0.90 4.79 6.12 2.43 1 1 1 35 8.2 0.38 1.03 -0.91 3.48 1.48 2 1 1 36 8.4 0.45 1.05 3.13 3.91 1.65 3 1 3 37 11.9 0.11 1.12 -1.64 -0.40 1.28 4 1 3 38 10.8 0.30 1.11 -1.32 -0.48 1.48 4 1 3 39 13.8 0.75 1.29 3.23 3.80 1.08 2 1 1 40 14.3 0.49 1.24 3.54 4.03 2.08 2 1 1 41 NA 0.00 NA 5.40 5.69 2.64 5 5 5 42 15.2 0.26 1.23 -0.32 4.19 2.15 2 2 2 43 10.0 -0.05 1.04 4.00 5.06 2.23 4 4 4 44 11.9 0.26 1.14 3.21 4.06 1.23 2 1 2 45 6.5 0.28 0.92 5.28 5.26 2.06 4 4 4 46 7.5 -0.05 0.92 3.40 4.08 1.49 5 5 5 47 NA NA 1.10 3.63 4.59 1.80 2 2 2 48 10.6 0.41 1.12 -0.55 3.28 1.32 3 1 3 49 7.4 0.38 0.99 3.63 4.70 1.72 1 1 1 50 8.4 0.08 0.98 3.83 5.25 2.21 2 3 2 51 5.7 -0.05 0.82 -0.12 4.09 2.35 2 2 2 52 4.9 -0.30 0.73 3.56 4.32 2.35 3 2 3 53 NA NA 0.41 4.17 4.99 2.18 5 5 5 54 3.2 -0.22 0.58 4.74 5.24 2.18 5 5 5 55 NA NA 1.04 3.15 4.10 1.95 2 2 2 56 8.1 0.34 1.01 -1.22 3.00 NA 3 1 2 57 11.0 0.36 1.12 -0.05 3.41 1.78 2 1 2 58 4.9 -0.30 0.73 3.30 4.09 2.30 3 1 3 59 13.2 0.41 1.20 -0.98 3.40 1.66 3 2 2 60 9.7 -0.22 1.01 3.62 4.76 2.32 4 3 4 61 12.8 0.82 1.29 3.54 3.59 1.15 2 1 1 62 NA NA NA 3.61 4.23 1.58 3 1 1 > 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 SWS -0.69 -0.45 0.67 0.326 Pslog -0.43 -0.73 0.71 0.291 Llog -0.67 -0.61 0.82 0.181 wblog 0.88 0.07 0.78 0.224 wbrlog 0.90 0.01 0.81 0.187 tglog 0.81 0.28 0.73 0.270 P -0.08 0.94 0.88 0.115 S 0.53 0.71 0.78 0.215 D\r\r\r 0.15 0.95 0.94 0.065 RC1 RC2 SS loadings 3.65 3.48 Proportion Var 0.41 0.39 Cumulative Var 0.41 0.79 Test of the hypothesis that 2 factors are sufficient. The degrees of freedom for the null model are 36 and the objective function was 11.34 The degrees of freedom for the model are 19 and the objective function was 3.88 The number of observations was 62 with Chi Square = 216.53 with prob < 1.7e-35 Fit based upon off diagonal values = 0.98> fs <- factor.scores(y,fit) > fs RC1 RC2 1 NA NA 2 -0.14977860 -0.001884138 3 NA NA 4 NA NA 5 1.88387161 0.331411064 6 0.34520792 0.775843415 7 -1.81656554 -0.773516876 8 0.97377531 0.840639252 9 0.23915675 -1.305497980 10 1.12244952 -1.270716836 11 -0.87945669 1.133423897 12 1.02946480 1.491114539 13 NA NA 14 NA NA 15 -0.34315773 -0.694041943 16 NA NA 17 -0.41285015 -0.442629731 18 -0.30525200 -0.163160427 19 NA NA 20 NA NA 21 NA NA 22 0.63627368 1.737471206 23 -1.27977736 -0.229245808 24 NA NA 25 1.54246451 -0.944621820 26 NA NA 27 -1.36102122 0.448547454 28 -0.35223773 1.187681902 29 1.23575340 1.506254927 30 NA NA 31 NA NA 32 -2.24664508 1.669824327 33 -1.87206257 -0.605086629 34 1.40419406 -1.341224987 35 -0.60412395 -0.594158290 36 -0.28119972 -0.204877682 37 -2.20219227 0.899329795 38 -2.03279516 0.768503056 39 -0.68760397 -1.241118276 40 -0.05785864 -1.184673264 41 NA NA 42 -0.51277335 -0.519528630 43 0.21331004 0.698922451 44 -0.43771300 -0.635796386 45 0.52035089 0.514921887 46 -0.43908578 1.574536978 47 NA NA 48 -1.15217905 0.047028856 49 0.49784285 -1.200035683 50 0.72265805 -0.422493978 51 0.28359421 -0.025456725 52 0.64983429 0.455593010 53 NA NA 54 0.71152859 1.652755635 55 NA NA 56 NA NA 57 -0.61953533 -0.491616618 58 0.50924318 0.388829822 59 -1.04344527 -0.167989023 60 0.16062299 0.760256189 61 -0.61497904 -1.275874379 62 NA NA > postscript(file="/var/www/html/freestat/rcomp/tmp/1aej61292981444.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > fa.diagram(fit) There were 12 warnings (use warnings() to see them) > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/2aej61292981444.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/html/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/freestat/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/html/freestat/rcomp/tmp/3eehc1292981444.tab") > > try(system("convert tmp/1aej61292981444.ps tmp/1aej61292981444.png",intern=TRUE)) character(0) > try(system("convert tmp/2aej61292981444.ps tmp/2aej61292981444.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.072 0.436 1.262