Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
9 12 11 45 12 37 12 37 7 108 12 10 12 68 12 72 10 143 15 9 10 55 15 17 10 37 15 27 9 37 15 58 12 66 13 21 12 19 12 78 8 35 9 48 15 27 12 43 12 30 15 25 11 69 12 72 6 23 14 13 12 61 12 43 12 51 11 67 12 36 12 44 12 45 12 34 8 36 8 72 12 39 12 43 11 25 10 56 11 80 12 40 13 73 12 34 12 72 10 42 10 61 11 23 8 74 12 16 9 66 12 9 9 41 11 57 15 48 8 51 8 53 11 29 11 29 11 55 13 54 7 43 12 51 8 20 8 79 4 39 11 61 10 55 7 30 12 55 11 22 9 37 10 2 8 38 8 27 11 56 12 25 10 39 10 33 12 43 8 57 11 43 8 23 10 44 14 54 9 28 9 36 10 39 13 16 12 23 13 40 8 24 3 78 8 57 12 37 11 27 9 61 12 27 12 69 12 34 10 44 13 34 9 39 12 51 11 34 14 31 11 13 9 12 12 51 8 24 15 19 12 30 14 81 12 42 9 22 9 85 13 27 13 25 15 22 11 19 7 14 10 45 11 45 14 28 14 51 13 41 12 31 8 74 13 19 9 51 12 73 13 24 11 61 11 23 13 14 12 54 12 51 10 62 9 36 10 59 13 24 13 26 9 54 11 39 12 16 8 36 12 31 12 31 12 42 9 39 12 25 12 31 11 38 12 31 6 17 7 22 10 55 12 62 10 51 12 30 9 49
Names of X columns:
CONFSOFTTOT CH
Factor 1
Factor 2
Type of test to use
(?)
Exact Pearson Chi-Squared by Simulation
Pearson Chi-Squared
Exact Pearson Chi-Squared by Simulation
McNemar Chi-Squared
Fisher Exact Test
Chart options
Title:
R Code
library(vcd) 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,])))) (table1 <- table(z[,cat1],z[,cat2])) (V1<-dimnames(y)[[1]][cat1]) (V2<-dimnames(y)[[1]][cat2]) bitmap(file='pic1.png') assoc(ftable(z[,cat1],z[,cat2],row.vars=1,dnn=c(V1,V2)),shade=T) dev.off() load(file='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='mytable.tab') (cst<-chisq.test(table1, simulate.p.value=simulate.p.value) ) 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='mytable1.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='mytable2.tab')
Compute
Summary of computational transaction
Raw Input
view raw input (R code)
Raw Output
view raw output of R engine
Computing time
0 seconds
R Server
Big Analytics Cloud Computing Center
Click here to blog (archive) this computation