R version 3.0.2 (2013-09-25) -- "Frisbee Sailing" Copyright (C) 2013 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-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,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,3,1,1,1,3,1,1,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,2,1,3,1,1,1,1,1,1,2,2,4,1,3,2,4,3,2,1,1,1,2,2,1,1,2,1,1,2,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,3,1,1,2,2,2,1,1,2,3,3,1,2,3,1,1,2,1,2,3,1),dim=c(9,20),dimnames=list(c('V1','V2','V3','V4','V5','V6','V7','V8','V9'),1:20)) > y <- array(NA,dim=c(9,20),dimnames=list(c('V1','V2','V3','V4','V5','V6','V7','V8','V9'),1:20)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par1 = 'TRUE' > par1 <- 'TRUE' > #'GNU S' R Code compiled by R2WASP v. 1.2.327 () > #Author: root > #To cite this work: Wessa P., 2014, Cronbach alpha (v1.0.3) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_cronbach.wasp/ > #Source of accompanying publication: > # > library(psych) > par1b <- T > if(par1=='FALSE') par1b <- F > z <- t(y) > (r <- alpha(z,check.keys=par1b)) Reliability analysis Call: alpha(x = z, check.keys = par1b) raw_alpha std.alpha G6(smc) average_r S/N ase mean sd 0.87 0.88 0.96 0.45 7.4 0.079 1.4 0.45 lower alpha upper 95% confidence boundaries 0.71 0.87 1.03 Reliability if an item is dropped: raw_alpha std.alpha G6(smc) average_r S/N alpha se V1 0.86 0.88 0.94 0.47 7.2 0.087 V2 0.86 0.87 0.96 0.47 7.0 0.087 V3 0.86 0.87 0.93 0.46 6.7 0.088 V4 0.88 0.89 0.95 0.51 8.2 0.083 V5 0.84 0.85 0.93 0.42 5.8 0.093 V6 0.85 0.86 0.93 0.43 5.9 0.091 V7 0.85 0.86 0.93 0.44 6.3 0.092 V8 0.84 0.85 0.91 0.42 5.8 0.095 V9 0.86 0.87 0.94 0.45 6.5 0.087 Item statistics n r r.cor r.drop mean sd V1 20 0.62 0.60 0.54 1.2 0.44 V2 20 0.65 0.59 0.55 1.4 0.60 V3 20 0.69 0.69 0.62 1.7 0.86 V4 20 0.48 0.45 0.31 1.3 0.47 V5 20 0.84 0.84 0.76 1.4 0.60 V6 20 0.82 0.82 0.75 1.4 0.49 V7 20 0.76 0.75 0.72 1.8 0.91 V8 20 0.85 0.86 0.78 1.6 0.75 V9 20 0.73 0.69 0.62 1.1 0.37 Non missing response frequency for each item 1 2 3 4 miss V1 0.75 0.25 0.00 0.00 0 V2 0.60 0.35 0.05 0.00 0 V3 0.50 0.35 0.10 0.05 0 V4 0.70 0.30 0.00 0.00 0 V5 0.60 0.35 0.05 0.00 0 V6 0.65 0.35 0.00 0.00 0 V7 0.50 0.30 0.15 0.05 0 V8 0.55 0.30 0.15 0.00 0 V9 0.85 0.15 0.00 0.00 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/15man1413560566.tab") > > > > proc.time() user system elapsed 0.243 0.076 0.310