R version 2.15.2 (2012-10-26) -- "Trick or Treat" 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(4 + ,7 + ,5 + ,7 + ,5 + ,5 + ,5 + ,5 + ,4 + ,6 + ,5 + ,5 + ,3 + ,6 + ,6 + ,6 + ,6 + ,6 + ,6 + ,6 + ,5 + ,5 + ,5 + ,7 + ,5 + ,7 + ,5 + ,6 + ,1 + ,6 + ,6 + ,7 + ,4 + ,7 + ,7 + ,7 + ,5 + ,6 + ,6 + ,6 + ,6 + ,7 + ,7 + ,7 + ,7 + ,7 + ,6 + ,7 + ,5 + ,6 + ,6 + ,5 + ,6 + ,6 + ,6 + ,6 + ,5 + ,7 + ,6 + ,7 + ,4 + ,6 + ,6 + ,6 + ,7 + ,7 + ,7 + ,7 + ,7 + ,7 + ,7 + ,7 + ,6 + ,7 + ,7 + ,7 + ,6 + ,7 + ,6 + ,6 + ,2 + ,5 + ,5 + ,4 + ,7 + ,7 + ,7 + ,7 + ,5 + ,5 + ,5 + ,6 + ,4 + ,6 + ,7 + ,7 + ,7 + ,7 + ,6 + ,7 + ,1 + ,6 + ,2 + ,5 + ,1 + ,6 + ,2 + ,5 + ,7 + ,6 + ,7 + ,7 + ,4 + ,6 + ,4 + ,6 + ,5 + ,6 + ,4 + ,6 + ,5 + ,6 + ,5 + ,6 + ,5 + ,5 + ,5 + ,6 + ,4 + ,3 + ,4 + ,1 + ,5 + ,3 + ,7 + ,5 + ,5 + ,5 + ,7 + ,7 + ,4 + ,6 + ,4 + ,5 + ,7 + ,7 + ,7 + ,7 + ,7 + ,7 + ,4 + ,5 + ,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,5 + ,7 + ,7 + ,7 + ,5 + ,5 + ,6 + ,7 + ,7 + ,5 + ,5 + ,6 + ,3 + ,6 + ,6 + ,7 + ,6 + ,7 + ,5 + ,6 + ,5 + ,5 + ,5 + ,7 + ,7 + ,7 + ,6 + ,6 + ,4 + ,5 + ,5 + ,5 + ,6 + ,6 + ,3 + ,4 + ,4 + ,5 + ,6 + ,7 + ,6 + ,7 + ,7 + ,7 + ,7 + ,7 + ,4 + ,5 + ,4 + ,5 + ,5 + ,7 + ,6 + ,7 + ,4 + ,6 + ,7 + ,6 + ,5 + ,5 + ,5 + ,6 + ,2 + ,6 + ,6 + ,6 + ,7 + ,7 + ,4 + ,7 + ,5 + ,7 + ,4 + ,6 + ,4 + ,6 + ,6 + ,5 + ,2 + ,5 + ,4 + ,5 + ,4 + ,6 + ,3 + ,5) + ,dim=c(4 + ,162) + ,dimnames=list(c('Q1_1' + ,'Q1_8' + ,'Q1_15' + ,'Q1_22') + ,1:162)) > y <- array(NA,dim=c(4,162),dimnames=list(c('Q1_1','Q1_8','Q1_15','Q1_22'),1:162)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par20 = '' > par19 = '' > par18 = '' > par17 = '' > par16 = '' > par15 = '' > par14 = '' > par13 = '' > par12 = '' > par11 = '' > par10 = '' > par9 = '' > par8 = '' > par7 = '' > par6 = '' > par5 = '' > par4 = '' > par3 = '' > par2 = '' > par1 = '' > 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.74 0.77 0.74 0.46 5.6 0.91 Reliability if an item is dropped: raw_alpha std.alpha G6(smc) average_r Q1_1 0.78 0.78 0.73 0.55 Q1_8 0.68 0.72 0.66 0.46 Q1_15 0.68 0.72 0.65 0.46 Q1_22 0.60 0.63 0.53 0.36 Item statistics n r r.cor r.drop mean sd Q1_1 162 0.68 0.49 0.44 4.8 1.55 Q1_8 162 0.77 0.66 0.55 6.1 0.97 Q1_15 162 0.76 0.66 0.54 5.6 1.22 Q1_22 162 0.86 0.84 0.71 6.0 1.03 Non missing response frequency for each item 1 2 3 4 5 6 7 miss Q1_1 0.05 0.04 0.08 0.19 0.31 0.19 0.14 0 Q1_8 0.00 0.01 0.02 0.03 0.17 0.39 0.39 0 Q1_15 0.00 0.02 0.03 0.14 0.22 0.35 0.24 0 Q1_22 0.01 0.01 0.01 0.02 0.24 0.36 0.35 0 > > #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,'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/wessaorg/rcomp/tmp/1tjjy1356104726.tab") > > > > proc.time() user system elapsed 0.497 0.080 0.551