R version 2.15.1 (2012-06-22) -- "Roasted Marshmallows" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i686-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. > x <- array(list(23 + ,17 + ,23 + ,24 + ,17 + ,20 + ,22 + ,18 + ,20 + ,20 + ,21 + ,21 + ,24 + ,20 + ,24 + ,27 + ,28 + ,22 + ,28 + ,19 + ,23 + ,27 + ,22 + ,20 + ,24 + ,16 + ,25 + ,23 + ,18 + ,23 + ,24 + ,25 + ,27 + ,27 + ,17 + ,27 + ,27 + ,14 + ,22 + ,28 + ,11 + ,24 + ,27 + ,27 + ,25 + ,23 + ,20 + ,22 + ,24 + ,22 + ,28 + ,28 + ,22 + ,28 + ,27 + ,21 + ,27 + ,25 + ,23 + ,25 + ,19 + ,17 + ,16 + ,24 + ,24 + ,28 + ,20 + ,14 + ,21 + ,28 + ,17 + ,24 + ,26 + ,23 + ,27 + ,23 + ,24 + ,14 + ,23 + ,24 + ,14 + ,20 + ,8 + ,27 + ,11 + ,22 + ,20 + ,24 + ,23 + ,21 + ,25 + ,25 + ,22 + ,23 + ,21 + ,21 + ,18 + ,24 + ,12 + ,20 + ,15 + ,20 + ,20 + ,22 + ,24 + ,24 + ,21 + ,19 + ,23 + ,25 + ,28 + ,25 + ,16 + ,23 + ,28 + ,28 + ,27 + ,26 + ,23 + ,22 + ,26 + ,21 + ,27 + ,23 + ,21 + ,26 + ,22 + ,26 + ,22 + ,24 + ,22 + ,21 + ,21 + ,21 + ,19 + ,20 + ,18 + ,24 + ,22 + ,12 + ,19 + ,20 + ,25 + ,26 + ,25 + ,17 + ,22 + ,20 + ,24 + ,28 + ,22 + ,15 + ,21 + ,23 + ,13 + ,23 + ,25 + ,26 + ,28 + ,23 + ,16 + ,10 + ,23 + ,24 + ,24 + ,22 + ,21 + ,21 + ,24 + ,20 + ,21 + ,25 + ,14 + ,24 + ,21 + ,25 + ,24 + ,12 + ,25 + ,25 + ,17 + ,20 + ,25 + ,20 + ,22 + ,23 + ,23 + ,20 + ,21 + ,23 + ,26 + ,16 + ,20 + ,18 + ,17 + ,28 + ,22 + ,25 + ,24 + ,24 + ,24 + ,24 + ,17 + ,23 + ,24 + ,24 + ,25 + ,24 + ,20 + ,23 + ,28 + ,19 + ,28 + ,25 + ,20 + ,26 + ,21 + ,15 + ,22 + ,25 + ,23 + ,19 + ,25 + ,26 + ,26 + ,18 + ,22 + ,18 + ,17 + ,20 + ,18 + ,26 + ,24 + ,25 + ,28 + ,26 + ,27 + ,21 + ,21 + ,12 + ,27 + ,25 + ,15 + ,22 + ,13 + ,21 + ,21 + ,20 + ,23 + ,25 + ,22 + ,22 + ,22 + ,23 + ,21 + ,23 + ,28 + ,24 + ,26 + ,22 + ,27 + ,19 + ,20 + ,22 + ,25 + ,6 + ,28 + ,21 + ,21 + ,26 + ,13 + ,20 + ,10 + ,24 + ,18 + ,19 + ,25 + ,23 + ,22 + ,26 + ,20 + ,21 + ,25 + ,24 + ,24 + ,25 + ,22 + ,25 + ,22 + ,21 + ,21 + ,21 + ,18 + ,20 + ,23 + ,21 + ,21 + ,25 + ,23 + ,24 + ,24 + ,23 + ,23 + ,21 + ,15 + ,18 + ,21 + ,21 + ,24 + ,25 + ,24 + ,24 + ,22 + ,23 + ,19 + ,20 + ,21 + ,20 + ,20 + ,21 + ,18 + ,23 + ,20 + ,20 + ,28 + ,11 + ,27 + ,23 + ,22 + ,23 + ,28 + ,27 + ,26 + ,24 + ,25 + ,23 + ,18 + ,18 + ,17 + ,20 + ,20 + ,21 + ,28 + ,24 + ,25 + ,21 + ,10 + ,23 + ,21 + ,27 + ,27 + ,25 + ,21 + ,24 + ,19 + ,21 + ,20 + ,18 + ,18 + ,27 + ,21 + ,15 + ,21 + ,22 + ,24 + ,24 + ,24 + ,22 + ,21 + ,15 + ,14 + ,15 + ,28 + ,28 + ,25 + ,26 + ,18 + ,25 + ,23 + ,26 + ,22 + ,26 + ,17 + ,24 + ,20 + ,19 + ,21 + ,22 + ,22 + ,22 + ,20 + ,18 + ,23 + ,23 + ,24 + ,22 + ,22 + ,15 + ,20 + ,24 + ,18 + ,23 + ,23 + ,26 + ,25 + ,22 + ,11 + ,23 + ,26 + ,26 + ,22 + ,23 + ,21 + ,25 + ,27 + ,23 + ,26 + ,23 + ,23 + ,22 + ,21 + ,15 + ,24 + ,26 + ,22 + ,24 + ,23 + ,26 + ,25 + ,21 + ,16 + ,20 + ,27 + ,20 + ,26 + ,19 + ,18 + ,21 + ,23 + ,22 + ,26 + ,25 + ,16 + ,21 + ,23 + ,19 + ,22 + ,22 + ,20 + ,16 + ,22 + ,19 + ,26 + ,25 + ,23 + ,28 + ,25 + ,24 + ,18 + ,28 + ,25 + ,25 + ,28 + ,21 + ,23 + ,20 + ,21 + ,21 + ,25 + ,23 + ,20 + ,19 + ,27 + ,25 + ,25 + ,23 + ,22 + ,22 + ,18 + ,21 + ,18 + ,16 + ,16 + ,20 + ,16 + ,18) + ,dim=c(3 + ,162) + ,dimnames=list(c('a' + ,'b' + ,'c ') + ,1:162)) > y <- array(NA,dim=c(3,162),dimnames=list(c('a','b','c '),1:162)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > library(psych) > z <- t(y) > (r <- alpha(z)) Reliability analysis Call: alpha(x = z) raw_alpha std.alpha G6(smc) average_r mean sd 0.47 0.49 0.42 0.24 22 2.6 Reliability if an item is dropped: raw_alpha std.alpha G6(smc) average_r a 0.25 0.25 0.14 0.14 b 0.58 0.59 0.42 0.42 c\r 0.28 0.29 0.17 0.17 Item statistics n r r.cor r.drop mean sd a 162 0.75 0.56 0.37 23 3.2 b 162 0.62 0.25 0.18 21 4.2 c\r 162 0.74 0.54 0.34 22 3.6 > > #Note: the /var/fisher/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/fisher/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Cronbach Alpha and Related Statistics',5,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Items',1,TRUE) > a<-table.element(a,'Cronbach Alpha',1,TRUE) > a<-table.element(a,'Std. Alpha',1,TRUE) > a<-table.element(a,'G6(smc)',1,TRUE) > a<-table.element(a,'Average R',1,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'All itmes',header=TRUE) > a<-table.element(a,round(r$total['raw_alpha'],4)) > a<-table.element(a,round(r$total['std.alpha'],4)) > a<-table.element(a,round(r$total['G6(smc)'],4)) > a<-table.element(a,round(r$total['average_r'],4)) > a<-table.row.end(a) > n = length(z[1,]) > for (i in 1:n) { + a<-table.row.start(a) + a<-table.element(a,paste(colnames(z)[i],' excluded',sep=''),header=TRUE) + a<-table.element(a,round(r$alpha.drop[i,'raw_alpha'],4)) + a<-table.element(a,round(r$alpha.drop[i,'std.alpha'],4)) + a<-table.element(a,round(r$alpha.drop[i,'G6(smc)'],4)) + a<-table.element(a,round(r$alpha.drop[i,'average_r'],4)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/fisher/rcomp/tmp/1yjof1349947113.tab") > > > > proc.time() user system elapsed 0.410 0.072 0.459