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(1 + ,2 + ,2 + ,3 + ,4 + ,3 + ,1 + ,2 + ,2 + ,2 + ,3 + ,2 + ,1 + ,2 + ,2 + ,3 + ,4 + ,1 + ,1 + ,1 + ,2 + ,3 + ,4 + ,1 + ,1 + ,1 + ,1 + ,1 + ,4 + ,2 + ,1 + ,1 + ,1 + ,1 + ,3 + ,1 + ,1 + ,1 + ,1 + ,2 + ,4 + ,2 + ,1 + ,1 + ,1 + ,1 + ,4 + ,1 + ,1 + ,1 + ,4 + ,1 + ,4 + ,1 + ,1 + ,1 + ,1 + ,1 + ,3 + ,1 + ,1 + ,1 + ,3 + ,3 + ,3 + ,2 + ,1 + ,1 + ,2 + ,2 + ,3 + ,2 + ,1 + ,1 + ,1 + ,1 + ,4 + ,2 + ,1 + ,1 + ,2 + ,1 + ,4 + ,2 + ,1 + ,1 + ,1 + ,2 + ,1 + ,2 + ,1 + ,2 + ,2 + ,2 + ,3 + ,3 + ,1 + ,2 + ,2 + ,3 + ,3 + ,2 + ,1 + ,2 + ,2 + ,2 + ,3 + ,3 + ,1 + ,1 + ,2 + ,1 + ,1 + ,1 + ,1 + ,1 + ,3 + ,1 + ,4 + ,1 + ,1 + ,1 + ,1 + ,2 + ,4 + ,1 + ,1 + ,1 + ,2 + ,2 + ,4 + ,1 + ,1 + ,2 + ,2 + ,3 + ,4 + ,2 + ,1 + ,1 + ,2 + ,2 + ,4 + ,1 + ,1 + ,2 + ,1 + ,1 + ,4 + ,1 + ,1 + ,1 + ,3 + ,3 + ,4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,3 + ,3 + ,3 + ,2 + ,4 + ,3 + ,3 + ,3 + ,2 + ,3 + ,2 + ,3 + ,3 + ,3 + ,2 + ,3 + ,3 + ,3 + ,2 + ,2 + ,2 + ,1 + ,1 + ,3 + ,3 + ,4 + ,4 + ,2 + ,3 + ,3 + ,3 + ,4 + ,2 + ,2 + ,1 + ,3 + ,3 + ,2 + ,3 + ,1 + ,4 + ,3 + ,3 + ,2 + ,3 + ,2 + ,3 + ,3 + ,3 + ,2 + ,4 + ,1 + ,3 + ,3 + ,4 + ,3 + ,3 + ,2 + ,1 + ,3 + ,3 + ,3 + ,3 + ,2 + ,3 + ,3 + ,3 + ,1 + ,1 + ,3 + ,1 + ,3 + ,2 + ,2 + ,1 + ,4 + ,3 + ,4 + ,4 + ,4 + ,3 + ,2 + ,4 + ,4 + ,4 + ,4 + ,3 + ,3 + ,4 + ,4 + ,4 + ,2 + ,4 + ,2 + ,4 + ,4 + ,4 + ,4 + ,4 + ,3 + ,4 + ,4 + ,3 + ,3 + ,4 + ,1 + ,4) + ,dim=c(6 + ,146) + ,dimnames=list(c('I_felt_depressed' + ,'I_felt_sad' + ,'everything_was_effort' + ,'trouble_mind' + ,'I_enjoyed_life' + ,'sleep_restless') + ,1:146)) > y <- array(NA,dim=c(6,146),dimnames=list(c('I_felt_depressed','I_felt_sad','everything_was_effort','trouble_mind','I_enjoyed_life','sleep_restless'),1:146)) > 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 0.5 0.49 0.62 0.14 2.2 0.47 Reliability if an item is dropped: raw_alpha std.alpha G6(smc) average_r I_felt_depressed 0.33 0.30 0.43 0.077 I_felt_sad 0.29 0.25 0.40 0.063 everything_was_effort 0.34 0.33 0.53 0.089 trouble_mind 0.37 0.37 0.56 0.104 I_enjoyed_life 0.75 0.76 0.75 0.391 sleep_restless 0.38 0.38 0.57 0.109 Item statistics n r r.cor r.drop mean sd I_felt_depressed 146 0.73 0.76 0.50 1.5 0.81 I_felt_sad 146 0.77 0.81 0.58 1.9 0.78 everything_was_effort 146 0.69 0.59 0.46 2.1 0.85 trouble_mind 146 0.64 0.50 0.39 2.3 0.95 I_enjoyed_life 146 -0.26 -0.61 -0.50 3.2 0.82 sleep_restless 146 0.62 0.46 0.37 2.1 1.01 Non missing response frequency for each item 1 2 3 4 miss I_felt_depressed 0.66 0.21 0.10 0.03 0 I_felt_sad 0.34 0.49 0.14 0.03 0 everything_was_effort 0.23 0.46 0.24 0.07 0 trouble_mind 0.25 0.35 0.30 0.10 0 I_enjoyed_life 0.05 0.13 0.45 0.38 0 sleep_restless 0.34 0.29 0.26 0.11 0 > > #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/1id0t1324130857.tab") > > > > proc.time() user system elapsed 0.442 0.040 0.530