R version 2.13.0 (2011-04-13) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-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(83,96,79,91,92,108,83,95,92,105,103,117,82,94,86,98,106,120,79,91,86,100,76,90,108,123,82,97,108,120,118,133,127,141,123,138,72,85,105,121,63,74,86,100,58,67,59,73,100,116,100,115,78,92,94,109,105,120,89,105,101,115,92,105,105,122,76,87,80,94,66,78,117,135,94,113,107,123,110,126,110,127,106,120,94,108,71,83,101,117,84,96,89,103,119,134,97,112,82,93,89,103,70,84,101,116,81,97,74,87,107,122,97,111,83,101,95,109,82,96,88,100,74,90,104,120,73,86,73,85,81,96,79,93,83,95,111,127,138,156,81,94,107,123,66,80,81,98,74,88,96,109,86,98,69,83,73,85,71,85,64,76,79,96,60,72,111,125,107,121,90,103,98,113,77,89,93,108,68,80,74,87,70,84,80,93,81,94,72,87,81,95,92,106,81,94),dim=c(2,98),dimnames=list(c('Gewicht','Cholesterol'),1:98)) > y <- array(NA,dim=c(2,98),dimnames=list(c('Gewicht','Cholesterol'),1:98)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Dr. Ian E. Holliday > #To cite this work: Ian E. Holliday, 2009, YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: > #Technical description: > library(psych) > z <- t(y) > (r <- alpha(z)) Reliability analysis Call: alpha(x = z) raw_alpha std.alpha G6(smc) average_r mean sd 1 1 1 1 96 17 Reliability if an item is dropped: raw_alpha std.alpha G6(smc) average_r Gewicht 1 1 0.99 1 Cholesterol 1 1 0.99 1 Item statistics n r r.cor r.drop mean sd Gewicht 98 1 1 1 89 16 Cholesterol 98 1 1 1 103 17 > > #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/1wtnq1324047882.tab") > > > > proc.time() user system elapsed 0.256 0.031 0.279