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(0,2,2,0,2,0,0,1,2,0,0,2,0,0,0,1,2,2,0,0,0,1,1,1,1,1,1,0,1,0,1,1,0,0,0,1,0,0,0,0,0,2,2,1,1,0,0,0,2,0,0,0,0,0,0,1,1,1,0,0,0,2,1,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,2,2,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,2,2,0,2,1,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,2,0,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,2,1,2,2,0,2,0,1,2,0,1,2,3,2,2,2,0,2,0,0,0,0,0,0,0,0,1,2,2,0,1,1,2,0,0,0,2,2,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0),dim=c(20,10),dimnames=list(c('P3','P4','P5','P6','P7','P8','P9','P10','P11','P12','P13','P14','P16','P18','P19','P20','P21','P22','P26','P27'),1:10)) > y <- array(NA,dim=c(20,10),dimnames=list(c('P3','P4','P5','P6','P7','P8','P9','P10','P11','P12','P13','P14','P16','P18','P19','P20','P21','P22','P26','P27'),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.88 0.88 1 0.29 7.7 0.054 0.91 0.41 0.31 lower alpha upper 95% confidence boundaries 0.77 0.88 0.98 Reliability if an item is dropped: raw_alpha std.alpha G6(smc) average_r S/N var.r med.r P3 0.86 0.87 1 0.27 6.7 0.11 0.27 P4- 0.89 0.89 1 0.31 8.0 0.11 0.33 P5 0.89 0.89 1 0.31 8.2 0.11 0.31 P6 0.87 0.88 1 0.28 7.1 0.12 0.28 P7 0.88 0.89 1 0.32 8.3 0.11 0.33 P8 0.86 0.87 1 0.27 6.7 0.12 0.28 P9 0.88 0.89 1 0.31 8.2 0.12 0.34 P10 0.87 0.88 1 0.29 7.4 0.12 0.31 P11 0.87 0.88 1 0.28 7.1 0.12 0.28 P13 0.87 0.87 1 0.28 6.9 0.12 0.26 P14 0.86 0.87 1 0.27 6.7 0.12 0.27 P16 0.86 0.87 1 0.27 6.7 0.11 0.27 P18 0.86 0.87 1 0.27 6.7 0.11 0.27 P19 0.86 0.87 1 0.27 6.7 0.11 0.27 P20 0.86 0.87 1 0.27 6.6 0.12 0.26 P21- 0.89 0.89 1 0.31 8.2 0.11 0.31 P22 0.86 0.87 1 0.28 6.9 0.12 0.28 P26- 0.88 0.88 1 0.30 7.6 0.12 0.35 P27- 0.88 0.89 1 0.30 7.8 0.12 0.34 Item statistics n raw.r std.r r.cor r.drop mean sd P3 10 0.84 0.82 0.82 0.809 0.2 0.63 P4- 10 0.27 0.27 0.27 0.158 1.8 0.92 P5 10 0.22 0.21 0.21 0.112 1.1 0.88 P6 10 0.66 0.65 0.65 0.589 0.6 0.84 P7 10 0.16 0.17 0.17 0.069 0.4 0.70 P8 10 0.80 0.80 0.80 0.770 0.4 0.70 P9 10 0.18 0.22 0.22 0.128 0.2 0.42 P10 10 0.53 0.52 0.52 0.460 0.5 0.71 P11 10 0.65 0.65 0.65 0.611 1.4 0.52 P13 10 0.71 0.73 0.73 0.672 0.3 0.48 P14 10 0.81 0.81 0.81 0.765 0.6 0.84 P16 10 0.80 0.80 0.80 0.747 0.5 1.08 P18 10 0.84 0.82 0.82 0.809 0.2 0.63 P19 10 0.84 0.82 0.82 0.809 0.2 0.63 P20 10 0.85 0.85 0.85 0.821 0.5 0.71 P21- 10 0.20 0.20 0.20 0.106 2.2 0.79 P22 10 0.71 0.71 0.71 0.646 0.7 0.95 P26- 10 0.42 0.44 0.44 0.346 2.8 0.63 P27- 10 0.33 0.35 0.35 0.254 2.7 0.67 Non missing response frequency for each item 0 1 2 3 miss P3 0.9 0.0 0.1 0.0 0 P4 0.3 0.2 0.5 0.0 0 P5 0.3 0.3 0.4 0.0 0 P6 0.6 0.2 0.2 0.0 0 P7 0.7 0.2 0.1 0.0 0 P8 0.7 0.2 0.1 0.0 0 P9 0.8 0.2 0.0 0.0 0 P10 0.6 0.3 0.1 0.0 0 P11 0.0 0.6 0.4 0.0 0 P13 0.7 0.3 0.0 0.0 0 P14 0.6 0.2 0.2 0.0 0 P16 0.8 0.0 0.1 0.1 0 P18 0.9 0.0 0.1 0.0 0 P19 0.9 0.0 0.1 0.0 0 P20 0.6 0.3 0.1 0.0 0 P21 0.4 0.4 0.2 0.0 0 P22 0.6 0.1 0.3 0.0 0 P26 0.9 0.0 0.1 0.0 0 P27 0.8 0.1 0.1 0.0 0 There were 24 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/11hbe1587313494.tab") > > > proc.time() user system elapsed 0.255 0.046 0.284