R version 3.6.3 (2020-02-29) -- "Holding the Windsock" Copyright (C) 2020 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. > source('/home/pw/wessanet/cretab') > > > > myrfcuid = '' > > x <- array(list(2,2,1,2,2,2,2,2,2,2,2,1,2,2,1,1,2,2,2,2,1,2,2,2,2,1,1,1,2,2,2,1,1,2,1,1,2,2,1,2,2,2,1,2,2,2,2,2,2,1,2,2,2,1,2,2,2,2,1,2,2,1,2,1,1,1,2,2,1,2,2,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,1,1,2,2,2,2,1,2,2,2,2,2,1,2,2,2,1,2,2,2,2,2,2,1,2,2,2,1,2,2,2,2,1,2,2,1,2,1,1,1,2,2,1,2,2,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,1,2,2,2,2,2,1,1,2,2,2,1,2,2,2,2,2,2,2,1,2,1,2,2,2,1,2,2,2,2,2,2,1,2,2,2,2,2,1,2,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,3,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,2,1,1,2,2,1,1,1,1,2,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,1,2,2,2,2,2,1,1,2,2,2,1,2,2,2,2,2,2,2,2,1,2,1,2,2,2,2,2,2,1,2,2,2,1,2,2,2,2,2,1,1,2,2,2,2,1,2,2,2,2,1,1,1,1,1,1,2,2,2,2,2,1,2,2,2,2,2,2,1,2,2,2,2,2,2,2,1,2,2,2,2,2,1,1,2,2,1,1,1,2,2,2,2,2),dim=c(38,10),dimnames=list(c('Q1','Q2','Q3','Q4','Q5','Q6','Q7','Q8','Q9','Q10','Q11','Q12','Q13','Q14','Q15','Q16','Q17','Q18','Q19','Q20','Q21','Q22','Q23','Q24','Q25','Q26','Q27','Q28','Q29','Q30','Q31','Q32','Q33','Q34','Q35','Q36','Q37','Q38 '),1:10)) > y <- array(NA,dim=c(38,10),dimnames=list(c('Q1','Q2','Q3','Q4','Q5','Q6','Q7','Q8','Q9','Q10','Q11','Q12','Q13','Q14','Q15','Q16','Q17','Q18','Q19','Q20','Q21','Q22','Q23','Q24','Q25','Q26','Q27','Q28','Q29','Q30','Q31','Q32','Q33','Q34','Q35','Q36','Q37','Q38 '),1:10)) > 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 (Mon, 17 Jul 2017 15:03:19 +0200) > #Author: root > #To cite this work: Wessa P. (2017), Cronbach alpha (v1.0.5) in Free Statistics Software (v$_version), Office for Research Development and Education, URL https://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 median_r 0.96 0.97 1 0.45 31 0.019 1.9 0.27 0.5 lower alpha upper 95% confidence boundaries 0.92 0.96 1 Reliability if an item is dropped: raw_alpha std.alpha G6(smc) average_r S/N var.r med.r Q1 0.96 0.97 1 0.46 31 0.12 0.50 Q2 0.96 0.97 1 0.45 30 0.12 0.50 Q3 0.96 0.97 1 0.45 30 0.12 0.50 Q4 0.96 0.97 1 0.45 30 0.12 0.50 Q5- 0.96 0.97 1 0.46 32 0.12 0.51 Q6 0.96 0.97 1 0.45 30 0.12 0.50 Q7 0.96 0.97 1 0.44 29 0.12 0.49 Q8 0.96 0.97 1 0.45 30 0.12 0.50 Q9 0.96 0.97 1 0.44 29 0.12 0.49 Q10 0.96 0.97 1 0.44 29 0.12 0.49 Q11 0.96 0.97 1 0.44 29 0.12 0.49 Q12 0.96 0.97 1 0.46 32 0.11 0.51 Q13 0.96 0.97 1 0.45 30 0.12 0.50 Q14 0.96 0.97 1 0.44 29 0.12 0.49 Q15 0.96 0.97 1 0.45 30 0.12 0.50 Q16 0.96 0.97 1 0.46 31 0.12 0.51 Q17 0.96 0.97 1 0.44 29 0.12 0.49 Q18 0.96 0.97 1 0.44 29 0.12 0.49 Q19 0.96 0.97 1 0.44 29 0.12 0.49 Q20 0.96 0.97 1 0.44 29 0.12 0.49 Q21- 0.96 0.97 1 0.44 30 0.12 0.50 Q22 0.96 0.97 1 0.44 30 0.12 0.50 Q23 0.96 0.97 1 0.44 30 0.12 0.50 Q24- 0.96 0.97 1 0.47 32 0.11 0.51 Q25 0.96 0.97 1 0.44 29 0.12 0.49 Q26 0.96 0.97 1 0.46 31 0.12 0.51 Q27- 0.96 0.97 1 0.45 30 0.12 0.50 Q28- 0.96 0.97 1 0.45 30 0.12 0.50 Q29 0.96 0.97 1 0.44 29 0.12 0.49 Q30 0.96 0.97 1 0.44 29 0.12 0.49 Q31 0.96 0.97 1 0.46 32 0.11 0.51 Q32 0.96 0.97 1 0.46 32 0.11 0.51 Q33- 0.96 0.97 1 0.47 32 0.11 0.51 Q34 0.96 0.97 1 0.44 30 0.12 0.50 Q35 0.96 0.97 1 0.45 30 0.12 0.50 Q36 0.96 0.97 1 0.45 30 0.12 0.50 Q37 0.96 0.97 1 0.44 30 0.12 0.50 Q38\r\r 0.96 0.97 1 0.47 33 0.10 0.51 Item statistics n raw.r std.r r.cor r.drop mean sd Q1 10 0.451 0.450 0.450 0.412 1.7 0.48 Q2 10 0.690 0.697 0.697 0.668 1.8 0.42 Q3 10 0.700 0.675 0.675 0.674 1.7 0.48 Q4 10 0.690 0.697 0.697 0.668 1.8 0.42 Q5- 10 0.384 0.378 0.370 0.339 2.5 0.53 Q6 10 0.612 0.628 0.628 0.585 1.8 0.42 Q7 10 0.945 0.959 0.960 0.941 1.9 0.32 Q8 10 0.690 0.697 0.697 0.668 1.8 0.42 Q9 10 0.945 0.959 0.960 0.941 1.9 0.32 Q10 10 0.945 0.959 0.960 0.941 1.9 0.32 Q11 10 0.945 0.959 0.960 0.941 1.9 0.32 Q12 10 0.297 0.273 0.273 0.252 1.3 0.48 Q13 10 0.612 0.628 0.628 0.585 1.8 0.42 Q14 10 0.945 0.959 0.960 0.941 1.9 0.32 Q15 10 0.609 0.595 0.595 0.578 1.7 0.48 Q16 10 0.488 0.455 0.456 0.447 1.5 0.53 Q17 10 0.945 0.959 0.960 0.941 1.9 0.32 Q18 10 0.945 0.959 0.960 0.941 1.9 0.32 Q19 10 0.945 0.959 0.960 0.941 1.9 0.32 Q20 10 0.945 0.959 0.960 0.941 1.9 0.32 Q21- 10 0.794 0.788 0.788 0.778 2.8 0.42 Q22 10 0.794 0.788 0.788 0.778 1.8 0.42 Q23 10 0.794 0.788 0.788 0.778 1.8 0.42 Q24- 10 0.192 0.204 0.204 0.152 2.2 0.42 Q25 10 0.945 0.959 0.960 0.941 1.9 0.32 Q26 10 0.428 0.409 0.409 0.385 1.6 0.52 Q27- 10 0.677 0.668 0.669 0.650 2.7 0.48 Q28- 10 0.690 0.697 0.697 0.668 2.8 0.42 Q29 10 0.945 0.959 0.960 0.941 1.9 0.32 Q30 10 0.945 0.959 0.960 0.941 1.9 0.32 Q31 10 0.343 0.346 0.346 0.297 1.6 0.52 Q32 10 0.271 0.273 0.273 0.223 1.4 0.52 Q33- 10 0.186 0.193 0.193 0.137 2.4 0.52 Q34 10 0.794 0.788 0.788 0.778 1.8 0.42 Q35 10 0.700 0.675 0.675 0.674 1.7 0.48 Q36 10 0.700 0.675 0.675 0.674 1.7 0.48 Q37 10 0.794 0.788 0.788 0.778 1.8 0.42 Q38\r\r 10 0.093 0.082 0.082 0.047 2.0 0.47 Non missing response frequency for each item 1 2 3 miss Q1 0.3 0.7 0.0 0 Q2 0.2 0.8 0.0 0 Q3 0.3 0.7 0.0 0 Q4 0.2 0.8 0.0 0 Q5 0.5 0.5 0.0 0 Q6 0.2 0.8 0.0 0 Q7 0.1 0.9 0.0 0 Q8 0.2 0.8 0.0 0 Q9 0.1 0.9 0.0 0 Q10 0.1 0.9 0.0 0 Q11 0.1 0.9 0.0 0 Q12 0.7 0.3 0.0 0 Q13 0.2 0.8 0.0 0 Q14 0.1 0.9 0.0 0 Q15 0.3 0.7 0.0 0 Q16 0.5 0.5 0.0 0 Q17 0.1 0.9 0.0 0 Q18 0.1 0.9 0.0 0 Q19 0.1 0.9 0.0 0 Q20 0.1 0.9 0.0 0 Q21 0.8 0.2 0.0 0 Q22 0.2 0.8 0.0 0 Q23 0.2 0.8 0.0 0 Q24 0.2 0.8 0.0 0 Q25 0.1 0.9 0.0 0 Q26 0.4 0.6 0.0 0 Q27 0.7 0.3 0.0 0 Q28 0.8 0.2 0.0 0 Q29 0.1 0.9 0.0 0 Q30 0.1 0.9 0.0 0 Q31 0.4 0.6 0.0 0 Q32 0.6 0.4 0.0 0 Q33 0.4 0.6 0.0 0 Q34 0.2 0.8 0.0 0 Q35 0.3 0.7 0.0 0 Q36 0.3 0.7 0.0 0 Q37 0.2 0.8 0.0 0 Q38\r\r 0.1 0.8 0.1 0 There were 42 warnings (use warnings() to see them) > > 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="/home/pw/wessanet/rcomp/tmp/1nwi81606659543.tab") > > > proc.time() user system elapsed 0.323 0.033 0.337