Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
12 53 11 86 14 66 12 67 21 76 12 78 22 53 11 80 10 74 13 76 10 79 8 54 15 67 14 54 10 87 14 58 14 75 11 88 10 64 13 57 7 66 14 68 12 54 14 56 11 86 9 80 11 76 15 69 14 78 13 67 9 80 15 54 10 71 11 84 13 74 8 71 20 63 12 71 10 76 10 69 9 74 14 75 8 54 14 52 11 69 13 68 9 65 11 75 15 74 11 75 10 72 14 67 18 63 14 62 11 63 12 76 13 74 9 67 10 73 15 70 20 53 12 77 12 77 14 52 13 54 11 80 17 66 12 73 13 63 14 69 13 67 15 54 13 81 10 69 11 84 19 80 13 70 17 69 13 77 9 54 11 79 10 30 9 71 12 73 12 72 13 77 13 75 12 69 15 54 22 70 13 73 15 54 13 77 15 82 10 80 11 80 16 69 11 78 11 81 10 76 10 76 16 73 12 85 11 66 16 79 19 68 11 76 16 71 15 54 24 46 14 82 15 74 11 88 15 38 12 76 10 86 14 54 13 70 9 69 15 90 15 54 14 76 11 89 8 76 11 73 11 79 8 90 10 74 11 81 13 72 11 71 20 66 10 77 15 65 12 74 14 82 23 54 14 63 16 54 11 64 12 69 10 54 14 84 12 86 12 77 11 89 12 76 13 60 11 75 19 73 12 85 17 79 9 71 12 72 19 69 18 78 15 54 14 69 11 81 9 84 18 84 16 69
Names of X columns:
Depression Belonging
Factor 1
Factor 2
Type of test to use
(?)
Pearson Chi-Squared
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