R version 2.15.2 (2012-10-26) -- "Trick or Treat" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i686-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(-6.6,-11.7,-4.3,-11.6,-2.7,-11.4,-2.2,-11.1,-2.5,-10.5,-3.7,-9.8,-5.5,-9.5,-7.5,-9.8,-8.8,-10.3,-8.7,-10.5,-7.6,-10.2,-5.9,-9.3,-3.2,-6.9,-0.5,-3.5,2.5,-1.3,6.1,0.2,9.1,2.7,11.4,5.1,12.5,5.5,12.3,4.5,11.5,2.9,10,0.5,8.4,-2,7.2,-3.6,6.6,-5,6.8,-6.1,7.6,-6.2,8.1,-5,8.4,-3.9,7.8,-4.5,5.8,-6.2,3,-7.2,-1,-7.9,-6.2,-9.9,-11.9,-13.8,-17.7,-17,-23.3,-19.3,-27.1,-21.9,-29.6,-24.4,-32,-27.1,-34.6,-29.5,-37.5,-30.9,-40.2,-30.8,-41.4,-29.2,-38.3,-26.5,-31.2,-21.3,-22.6,-14.4,-13.6,-8.3,-6.8,-4.4,-2.6,-2.6,1,-1.7,4.1,-0.9,6.8,0.4,8.9,1.5,10.1,1.8,11,1.8,11.6,2,12.6,2.2,14.5,3,16.5,4.2,18.3,5.5,19.1,6.7,18.9,7.1,18.2,6.7,17.8,5.8,17.7,5.1,18.1,5.1,18.9,5.8,19.6,6.3),dim=c(2,69),dimnames=list(c('Vervoer','Algemeen'),1:69)) > y <- array(NA,dim=c(2,69),dimnames=list(c('Vervoer','Algemeen'),1:69)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = 'Pearson Chi-Squared' > par2 = '2' > par1 = '1' > main = 'Association Plot' > par3 <- 'Pearson Chi-Squared' > par2 <- '2' > par1 <- '1' > #'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(vcd) Loading required package: MASS Loading required package: grid Loading required package: colorspace > cat1 <- as.numeric(par1) # > cat2<- as.numeric(par2) # > simulate.p.value=FALSE > if (par3 == 'Exact Pearson Chi-Squared by Simulation') simulate.p.value=TRUE > x <- t(x) > (z <- array(unlist(x),dim=c(length(x[,1]),length(x[1,])))) [,1] [,2] [1,] -6.6 -11.7 [2,] -4.3 -11.6 [3,] -2.7 -11.4 [4,] -2.2 -11.1 [5,] -2.5 -10.5 [6,] -3.7 -9.8 [7,] -5.5 -9.5 [8,] -7.5 -9.8 [9,] -8.8 -10.3 [10,] -8.7 -10.5 [11,] -7.6 -10.2 [12,] -5.9 -9.3 [13,] -3.2 -6.9 [14,] -0.5 -3.5 [15,] 2.5 -1.3 [16,] 6.1 0.2 [17,] 9.1 2.7 [18,] 11.4 5.1 [19,] 12.5 5.5 [20,] 12.3 4.5 [21,] 11.5 2.9 [22,] 10.0 0.5 [23,] 8.4 -2.0 [24,] 7.2 -3.6 [25,] 6.6 -5.0 [26,] 6.8 -6.1 [27,] 7.6 -6.2 [28,] 8.1 -5.0 [29,] 8.4 -3.9 [30,] 7.8 -4.5 [31,] 5.8 -6.2 [32,] 3.0 -7.2 [33,] -1.0 -7.9 [34,] -6.2 -9.9 [35,] -11.9 -13.8 [36,] -17.7 -17.0 [37,] -23.3 -19.3 [38,] -27.1 -21.9 [39,] -29.6 -24.4 [40,] -32.0 -27.1 [41,] -34.6 -29.5 [42,] -37.5 -30.9 [43,] -40.2 -30.8 [44,] -41.4 -29.2 [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 0 0 0 0 0 0 0 0 0 19.6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 6.7 7.1 -41.4 0 0 -40.2 0 0 -38.3 0 0 -37.5 0 0 -34.6 0 0 -32 0 0 -31.2 0 0 -29.6 0 0 -27.1 0 0 -23.3 0 0 -22.6 0 0 -17.7 0 0 -13.6 0 0 -11.9 0 0 -8.8 0 0 -8.7 0 0 -7.6 0 0 -7.5 0 0 -6.8 0 0 -6.6 0 0 -6.2 0 0 -5.9 0 0 -5.5 0 0 -4.3 0 0 -3.7 0 0 -3.2 0 0 -2.7 0 0 -2.6 0 0 -2.5 0 0 -2.2 0 0 -1 0 0 -0.5 0 0 1 0 0 2.5 0 0 3 0 0 4.1 0 0 5.8 0 0 6.1 0 0 6.6 0 0 6.8 0 0 7.2 0 0 7.6 0 0 7.8 0 0 8.1 0 0 8.4 0 0 8.9 0 0 9.1 0 0 10 0 0 10.1 0 0 11 0 0 11.4 0 0 11.5 0 0 11.6 0 0 12.3 0 0 12.5 0 0 12.6 0 0 14.5 0 0 16.5 0 0 17.7 0 0 17.8 0 0 18.1 0 0 18.2 1 0 18.3 0 0 18.9 0 1 19.1 1 0 19.6 0 0 > (V1<-dimnames(y)[[1]][cat1]) [1] "Vervoer" > (V2<-dimnames(y)[[1]][cat2]) [1] "Algemeen" > postscript(file="/var/wessaorg/rcomp/tmp/1mah11357214570.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > assoc(ftable(z[,cat1],z[,cat2],row.vars=1,dnn=c(V1,V2)),shade=T) > dev.off() null device 1 > > #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,'Tabulation of Results',ncol(table1)+1,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,paste(V1,' x ', V2),ncol(table1)+1,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, ' ', 1,TRUE) > for(nc in 1:ncol(table1)){ + a<-table.element(a, colnames(table1)[nc], 1, TRUE) + } > a<-table.row.end(a) > for(nr in 1:nrow(table1) ){ + a<-table.element(a, rownames(table1)[nr], 1, TRUE) + for(nc in 1:ncol(table1) ){ + a<-table.element(a, table1[nr, nc], 1, FALSE) + } + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/27vqa1357214570.tab") > (cst<-chisq.test(table1, simulate.p.value=simulate.p.value) ) Pearson's Chi-squared test data: table1 X-squared = 3812.25, df = 3770, p-value = 0.3112 Warning message: In chisq.test(table1, simulate.p.value = simulate.p.value) : Chi-squared approximation may be incorrect > if (par3 == 'McNemar Chi-Squared') { + (cst <- mcnemar.test(table1)) + } > if (par3=='Fisher Exact Test') { + (cst <- fisher.test(table1)) + } > if ((par3 != 'McNemar Chi-Squared') & (par3 != 'Fisher Exact Test')) { + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Tabulation of Expected Results',ncol(table1)+1,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,paste(V1,' x ', V2),ncol(table1)+1,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a, ' ', 1,TRUE) + for(nc in 1:ncol(table1)){ + a<-table.element(a, colnames(table1)[nc], 1, TRUE) + } + a<-table.row.end(a) + for(nr in 1:nrow(table1) ){ + a<-table.element(a, rownames(table1)[nr], 1, TRUE) + for(nc in 1:ncol(table1) ){ + a<-table.element(a, round(cst$expected[nr, nc], digits=2), 1, FALSE) + } + a<-table.row.end(a) + } + a<-table.end(a) + table.save(a,file="/var/wessaorg/rcomp/tmp/3ntu31357214570.tab") + } > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Statistical Results',2,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, cst$method, 2,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > if (par3=='Pearson Chi-Squared') a<-table.element(a, 'Pearson Chi Square Statistic', 1, TRUE) > if (par3=='Exact Pearson Chi-Squared by Simulation') a<-table.element(a, 'Exact Pearson Chi Square Statistic', 1, TRUE) > if (par3=='McNemar Chi-Squared') a<-table.element(a, 'McNemar Chi Square Statistic', 1, TRUE) > if (par3=='Fisher Exact Test') a<-table.element(a, 'Odds Ratio', 1, TRUE) > if (par3=='Fisher Exact Test') { + if ((ncol(table1) == 2) & (nrow(table1) == 2)) { + a<-table.element(a, round(cst$estimate, digits=2), 1,FALSE) + } else { + a<-table.element(a, '--', 1,FALSE) + } + } else { + a<-table.element(a, round(cst$statistic, digits=2), 1,FALSE) + } > a<-table.row.end(a) > if(!simulate.p.value){ + if(par3!='Fisher Exact Test') { + a<-table.row.start(a) + a<-table.element(a, 'Degrees of Freedom', 1, TRUE) + a<-table.element(a, cst$parameter, 1,FALSE) + a<-table.row.end(a) + } + } > a<-table.row.start(a) > a<-table.element(a, 'P value', 1, TRUE) > a<-table.element(a, round(cst$p.value, digits=2), 1,FALSE) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/42sec1357214570.tab") > > try(system("convert tmp/1mah11357214570.ps tmp/1mah11357214570.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 59.265 0.396 60.174