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(7,7,7,5,5,5,5,5,6,5,4,4,4,5,5,5,5,5,5,5,6,6,6,7,7,4,7,7,6,5,5,6,6,7,7,6,6,5,5,6,5,2,4,6,5,5,6,6,4,5,4,6,6,6,6,6,6,6,7,7,5,5,6,5,3,3,4,3,7,6,6,7,3,5,6,6,5,5,6,6,3,3,4,4,5,5,5,6,2,1,2,2,6,5,6,6,3,4,5,5,6,6,6,7,6,6,6,7,5,4,5,5,5,4,5,6,7,5,5,6,6,4,6,6,5,5,6,6,5,6,5,5,4,3,4,4,4,5,6,5,6,5,5,6,5,3,5,5,5,5,5,5,7,7,7,7,5,6,5,6,5,4,5,4,6,5,7,5,5,5,5,5,6,6,7,6,7,7,6,6,5,3,3,4,5,4,4,4,5,6,6,6,6,5,5,5,2,2,4,5,4,4,4,6,4,4,6,5,6,5,5,6,3,4,4,5,6,6,6,6,6,2,5,5,5,4,5,6,6,6,6,6,1,4,6,3,5,5,6,6,7,6,5,6,4,4,5,5,5,6,5,5,6,6,5,6,4,5,4,4,6,6,5,5,6,6,6,6,5,4,6,6,5,6,5,6,3,3,5,5,5,5,5,6,6,5,6,6,5,5,6,6,6,6,6,6,6,6,6,6,4,4,4,4,4,4,4,4,6,5,5,5,7,6,6,7,4,3,3,5,5,6,7,7,6,2,5,5,6,5,6,6,5,3,6,6,3,4,5,5,7,6,6,6,6,5,6,7,4,4,4,5,4,5,6,4,5,5,5,5,3,4,4,4,7,7,7,6,6,4,6,6,6,6,6,5,4,4,4,4,5,4,5,5,6,6,6,7,5,3,5,6,6,4,4,5,6,7,7,6,4,5,6,6,5,5,5,5,6,6,6,6,5,5,6,6,5,5,5,5,4,4,5,5,4,5,5,4,6,6,5,7,5,5,7,7,6,5,6,5,5,4,7,7,6,4,6,6,5,5,5,5,4,5,4,5,6,6,6,7,4,5,4,5,5,3,3,5,5,5,5,5,6,3,5,5,3,4,5,3,5,4,5,5,4,5,5,5,5,2,5,4,5,5,3,4,7,7,7,7,5,6,6,6,7,6,6,6,5,5,4,6,4,4,4,5,6,6,6,5,4,3,4,5,4,7,6,6,4,3,2,2,4,4,5,5,6,6,5,7,6,5,6,6,5,6,5,5,3,4,4,5,6,6,6,6,5,6,6,6,4,4,5,5,5,5,5,5,2,3,2,2,5,6,6,7,7,5,6,7,4,6,5,5,4,5,6,6,7,6,7,5,6,5,5,6,5,6,5,5,5,5,5,6,5,5,6,6,7,6,7,7,6,5,7,6,6,6,6,6,5,5,5,6,2,4,6,6,4,4,4,4,6,4,6,6,5,5,6,4,5,4,4,5,5,5,5,5),dim=c(4,162),dimnames=list(c('Q2','Q9','Q16','Q23'),1:162)) > y <- array(NA,dim=c(4,162),dimnames=list(c('Q2','Q9','Q16','Q23'),1:162)) > 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.84 0.85 0.81 0.58 5.5 0.02 5.2 0.91 0.57 lower alpha upper 95% confidence boundaries 0.8 0.84 0.88 Reliability if an item is dropped: raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r Q2 0.81 0.82 0.76 0.60 4.5 0.026 0.0045 0.60 Q9 0.81 0.82 0.76 0.60 4.5 0.026 0.0044 0.60 Q16 0.79 0.79 0.72 0.56 3.8 0.029 0.0014 0.54 Q23 0.79 0.79 0.72 0.56 3.8 0.029 0.0014 0.54 Item statistics n raw.r std.r r.cor r.drop mean sd Q2 162 0.82 0.81 0.71 0.65 5.1 1.2 Q9 162 0.82 0.81 0.71 0.65 4.8 1.2 Q16 162 0.84 0.85 0.78 0.71 5.3 1.0 Q23 162 0.83 0.84 0.78 0.71 5.4 1.0 Non missing response frequency for each item 1 2 3 4 5 6 7 miss Q2 0.01 0.02 0.06 0.18 0.34 0.30 0.09 0 Q9 0.01 0.03 0.09 0.22 0.35 0.25 0.05 0 Q16 0.00 0.02 0.02 0.15 0.36 0.35 0.10 0 Q23 0.00 0.02 0.02 0.10 0.35 0.39 0.12 0 > > 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/162yl1604837475.tab") > > > proc.time() user system elapsed 0.298 0.017 0.296