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)) 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")