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. > x <- array(list(1 + ,1 + ,2 + ,2 + ,1 + ,2 + ,1 + ,1 + ,1 + ,3 + ,1 + ,2 + ,1 + ,1 + ,2 + ,2 + ,3 + ,2 + ,2 + ,1 + ,2 + ,1 + ,2 + ,1 + ,2 + ,2 + ,3 + ,3 + ,3 + ,3 + ,1 + ,1 + ,2 + ,2 + ,2 + ,2 + ,3 + ,4 + ,4 + ,1 + ,3 + ,3 + ,1 + ,1 + ,2 + ,1 + ,2 + ,1 + ,1 + ,1 + ,1 + ,2 + ,2 + ,1 + ,1 + ,2 + ,1 + ,2 + ,2 + ,2 + ,1 + ,1 + ,1 + ,1 + ,1 + ,3 + ,1 + ,1 + ,1 + ,1 + ,1 + ,1 + ,1 + ,2 + ,3 + ,2 + ,3 + ,1 + ,1 + ,1 + ,2 + ,2 + ,3 + ,2 + ,1 + ,1 + ,1 + ,2 + ,2 + ,1 + ,2 + ,1 + ,2 + ,1 + ,3 + ,2 + ,2 + ,1 + ,2 + ,2 + ,1 + ,3 + ,1 + ,1 + ,1 + ,2 + ,1 + ,3 + ,1 + ,1 + ,1 + ,2 + ,2 + ,1 + ,1 + ,2 + ,1 + ,1 + ,1 + ,4 + ,1 + ,1 + ,1 + ,1 + ,NA + ,1 + ,2 + ,2 + ,2 + ,1 + ,2 + ,2 + ,1 + ,1 + ,2 + ,2 + ,2 + ,1 + ,2 + ,2 + ,2 + ,2 + ,2 + ,2 + ,1 + ,1 + ,1 + ,1 + ,1 + ,3 + ,1 + ,1 + ,1 + ,1 + ,2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+ ,162) + ,dimnames=list(c('Q31_1' + ,'Q31_2' + ,'Q31_3' + ,'Q31_4' + ,'Q31_5' + ,'Q31_7') + ,1:162)) > y <- array(NA,dim=c(6,162),dimnames=list(c('Q31_1','Q31_2','Q31_3','Q31_4','Q31_5','Q31_7'),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.65 0.68 0.69 0.26 1.7 0.46 Reliability if an item is dropped: raw_alpha std.alpha G6(smc) average_r Q31_1 0.57 0.61 0.61 0.24 Q31_2 0.56 0.58 0.58 0.22 Q31_3 0.54 0.58 0.55 0.21 Q31_4 0.64 0.68 0.68 0.30 Q31_5 0.63 0.67 0.67 0.29 Q31_7 0.68 0.70 0.69 0.32 Item statistics n r r.cor r.drop mean sd Q31_1 162 0.68 0.62 0.47 1.5 0.69 Q31_2 162 0.74 0.71 0.56 1.3 0.57 Q31_3 161 0.76 0.74 0.56 1.7 0.70 Q31_4 162 0.53 0.35 0.29 1.9 0.80 Q31_5 161 0.55 0.39 0.31 2.0 0.83 Q31_7 161 0.47 0.27 0.22 2.1 0.96 Non missing response frequency for each item 1 2 3 4 miss Q31_1 0.61 0.30 0.07 0.01 0.00 Q31_2 0.78 0.19 0.02 0.01 0.00 Q31_3 0.45 0.45 0.09 0.01 0.01 Q31_4 0.38 0.40 0.20 0.02 0.00 Q31_5 0.30 0.45 0.20 0.04 0.01 Q31_7 0.34 0.34 0.23 0.09 0.01 > > #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/1eqi21323439445.tab") > > > > proc.time() user system elapsed 0.512 0.034 0.543