Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
96 0 70 1 88 0 114 1 69 1 176 1 114 0 121 1 110 1 158 1 116 1 181 1 77 1 141 0 35 0 80 0 152 1 97 0 99 1 84 0 68 1 101 1 107 0 88 1 112 1 171 1 137 1 77 0 66 1 93 0 105 0 131 0 102 1 161 1 120 1 127 1 77 0 108 1 85 1 168 0 48 1 152 1 75 1 107 1 62 1 121 0 124 1 72 1 40 0 58 1 97 1 88 1 126 1 104 1 148 1 146 1 80 0 97 1 25 0 99 1 118 1 58 0 63 0 139 1 50 0 60 1 152 0 142 1 94 1 66 0 127 0 67 0 90 0 75 1 128 0 146 0 69 1 186 0 81 0 85 1 54 0 46 0 106 0 34 1 60 0 95 1 57 1 62 0 36 0 56 0 54 1 64 1 76 1 98 0 88 1 35 0 102 1 61 1 80 1 49 1 78 1 90 0 45 1 55 1 96 1 43 0 52 0 60 0 54 0 51 0 51 0 38 1 41 1 146 1 182 1 192 1 263 0 35 1 439 1 214 0 341 1 58 0 292 0 85 1 200 1 158 1 199 1 297 1 227 1 108 1 86 1 302 0 148 1 178 1 120 1 207 1 157 1 128 1 296 0 323 1 79 1 70 1 146 1 246 1 196 0 199 0 127 1 153 0 299 0 228 1 190 0 180 1 212 1 269 0 130 1 179 1 243 1 190 0 299 0 121 0 137 0 305 1 157 0 96 1 183 0 52 1 238 0 40 1 226 0 190 0 214 1 145 0 119 1 222 1 222 1 159 1 165 1 249 0 125 1 122 0 186 0 148 0 274 1 172 0 84 1 168 0 102 0 106 0 2 0 139 1 95 1 130 1 72 1 141 0 113 0 206 1 268 0 175 0 77 0 125 0 255 1 111 1 132 0 211 0 92 1 76 0 171 1 83 1 266 0 186 1 50 1 117 1 219 0 246 0 279 0 148 1 137 1 181 1 98 1 226 0 234 0 138 0 85 1 66 1 236 0 106 0 135 0 122 1 218 1 199 0 112 0 278 0 94 1 113 1 84 1 86 1 62 0 222 1 167 1 82 1 207 0 184 0 83 1 183 0 89 1 225 1 237 0 102 1 221 0 128 1 91 1 198 0 204 1 158 0 138 1 226 0 44 1 196 0 83 0 79 1 52 1 105 0 116 1 83 1 196 0 153 1 157 0 75 0 106 1 58 1 75 0 74 1 185 0 265 0 131 1 139 0 196 0 78 1
Names of X columns:
Response Treatment
Response Variable (column number)
Factor Variable (column number)
Include Intercept Term ?
TRUE
TRUE
FALSE
Chart options
Title:
Label y-axis:
Label x-axis:
R Code
cat1 <- as.numeric(par1) # cat2<- as.numeric(par2) # intercept<-as.logical(par3) x <- t(x) x1<-as.numeric(x[,cat1]) f1<-as.character(x[,cat2]) xdf<-data.frame(x1,f1) (V1<-dimnames(y)[[1]][cat1]) (V2<-dimnames(y)[[1]][cat2]) names(xdf)<-c('Response', 'Treatment') if(intercept == FALSE) (lmxdf<-lm(Response ~ Treatment - 1, data = xdf) ) else (lmxdf<-lm(Response ~ Treatment, data = xdf) ) (aov.xdf<-aov(lmxdf) ) (anova.xdf<-anova(lmxdf) ) load(file='createtable') a<-table.start() a<-table.row.start(a) a<-table.element(a,'ANOVA Model', length(lmxdf$coefficients)+1,TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, paste(V1, ' ~ ', V2), length(lmxdf$coefficients)+1,TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'means',,TRUE) for(i in 1:length(lmxdf$coefficients)){ a<-table.element(a, round(lmxdf$coefficients[i], digits=3),,FALSE) } a<-table.row.end(a) a<-table.end(a) table.save(a,file='mytable.tab') a<-table.start() a<-table.row.start(a) a<-table.element(a,'ANOVA Statistics', 5+1,TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, ' ',,TRUE) a<-table.element(a, 'Df',,FALSE) a<-table.element(a, 'Sum Sq',,FALSE) a<-table.element(a, 'Mean Sq',,FALSE) a<-table.element(a, 'F value',,FALSE) a<-table.element(a, 'Pr(>F)',,FALSE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, V2,,TRUE) a<-table.element(a, anova.xdf$Df[1],,FALSE) a<-table.element(a, round(anova.xdf$'Sum Sq'[1], digits=3),,FALSE) a<-table.element(a, round(anova.xdf$'Mean Sq'[1], digits=3),,FALSE) a<-table.element(a, round(anova.xdf$'F value'[1], digits=3),,FALSE) a<-table.element(a, round(anova.xdf$'Pr(>F)'[1], digits=3),,FALSE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'Residuals',,TRUE) a<-table.element(a, anova.xdf$Df[2],,FALSE) a<-table.element(a, round(anova.xdf$'Sum Sq'[2], digits=3),,FALSE) a<-table.element(a, round(anova.xdf$'Mean Sq'[2], digits=3),,FALSE) a<-table.element(a, ' ',,FALSE) a<-table.element(a, ' ',,FALSE) a<-table.row.end(a) a<-table.end(a) table.save(a,file='mytable1.tab') bitmap(file='anovaplot.png') boxplot(Response ~ Treatment, data=xdf, xlab=V2, ylab=V1) dev.off() if(intercept==TRUE){ 'Tukey Plot' thsd<-TukeyHSD(aov.xdf) bitmap(file='TukeyHSDPlot.png') plot(thsd) dev.off() } if(intercept==TRUE){ a<-table.start() a<-table.row.start(a) a<-table.element(a,'Tukey Honest Significant Difference Comparisons', 5,TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, ' ', 1, TRUE) for(i in 1:4){ a<-table.element(a,colnames(thsd[[1]])[i], 1, TRUE) } a<-table.row.end(a) for(i in 1:length(rownames(thsd[[1]]))){ a<-table.row.start(a) a<-table.element(a,rownames(thsd[[1]])[i], 1, TRUE) for(j in 1:4){ a<-table.element(a,round(thsd[[1]][i,j], digits=3), 1, FALSE) } a<-table.row.end(a) } a<-table.end(a) table.save(a,file='mytable2.tab') } if(intercept==FALSE){ a<-table.start() a<-table.row.start(a) a<-table.element(a,'TukeyHSD Message', 1,TRUE) a<-table.row.end(a) a<-table.start() a<-table.row.start(a) a<-table.element(a,'Must Include Intercept to use Tukey Test ', 1, FALSE) a<-table.row.end(a) a<-table.end(a) table.save(a,file='mytable2.tab') } library(car) lt.lmxdf<-leveneTest(lmxdf) a<-table.start() a<-table.row.start(a) a<-table.element(a,'Levenes Test for Homogeneity of Variance', 4,TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,' ', 1, TRUE) for (i in 1:3){ a<-table.element(a,names(lt.lmxdf)[i], 1, FALSE) } a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'Group', 1, TRUE) for (i in 1:3){ a<-table.element(a,round(lt.lmxdf[[i]][1], digits=3), 1, FALSE) } a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,' ', 1, TRUE) a<-table.element(a,lt.lmxdf[[1]][2], 1, FALSE) a<-table.element(a,' ', 1, FALSE) a<-table.element(a,' ', 1, FALSE) a<-table.row.end(a) a<-table.end(a) table.save(a,file='mytable3.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