Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
1 24 1 24.5 1 25 1 25.5 1 26 1 26.5 1 27 1 27.5 1 28 1 28.5 1 29 1 29.5 1 30 1 30.5 1 31 1 31.5 1 32 1 32.5 1 33 1 33.5 1 34 1 34.5 1 35 1 35.5 1 36 1 36.5 1 37 1 37.5 1 38 1 38.5 1 39 1 39.5 1 40 1 40.5 1 41 1 41.5 1 42 1 42.5 1 43 1 43.5 1 44 1 44.5 1 45 1 45.5 1 46 1 46.5 1 47 1 47.5 1 48 1 48.5 1 49 1 49.5 1 50 1 50.5 1 51 1 51.5 1 52 1 52.5 1 53 1 53.5 1 54 1 54.5 1 55 1 55.5 1 56 1 56.5 1 57 1 57.5 1 58 1 58.5 1 59 1 59.5 1 60 1 60.5 1 61 1 61.5 1 62 1 62.5 1 63 1 63.5 1 64 1 64.5 1 65 1 65.5 1 66 1 66.5 1 67 1 67.5 1 68 1 68.5 1 69 1 69.5 1 70 1 70.5 1 71 1 71.5 1 72 1 72.5 1 73 1 73.5 1 74 1 74.5 1 75 1 75.5 1 76 1 76.5 1 77 1 77.5 1 78 1 78.5 1 79 1 79.5 1 80 1 80.5 1 81 1 81.5 1 82 1 82.5 1 83 1 83.5 1 84 1 84.5 1 85 1 85.5 1 86 1 86.5 1 87 1 87.5 1 88 1 88.5 1 89 1 89.5 1 90 1 90.5 1 91 1 91.5 1 92 1 92.5 1 93 1 93.5 1 94 1 94.5 1 95 1 95.5 1 96 1 96.5 1 97 1 97.5 1 98 1 98.5 1 99 1 99.5 1 100 1 100.5 1 101 1 101.5 1 102 1 102.5 1 103 1 103.5 1 104 1 104.5 1 105 1 105.5 1 106 1 106.5 1 107 1 107.5 1 108 1 108.5 1 109 1 109.5 1 110 1 110.5 1 111 1 111.5 1 112 1 112.5 1 113 1 113.5 1 114 1 114.5 1 115 1 115.5 1 116 1 116.5 1 117 1 117.5 1 118 1 118.5 1 119 1 119.5 1 120 1 120.5 1 121 1 121.5 1 122 1 122.5 1 123 1 123.5 1 124 1 124.5 1 125 1 125.5 1 126 1 126.5 1 127 1 127.5 1 128 1 128.5 1 129 1 129.5 1 130 1 130.5 1 131 1 131.5 1 132 1 132.5 1 133 1 133.5 1 134 1 134.5 1 135 1 135.5 1 136 1 136.5 1 137 1 137.5 1 138 1 138.5 1 139 1 139.5 1 140 1 140.5 1 141 1 141.5 1 142 1 142.5 1 143 1 143.5 1 144 1 144.5 1 145 1 145.5 1 146 1 146.5 1 147 1 147.5 1 148 1 148.5 1 149 1 149.5 1 150 1 150.5 1 151 1 151.5 1 152 1 152.5 1 153 1 153.5 1 154 1 154.5 1 155 1 155.5 1 156 1 156.5 1 157 1 157.5 1 158 1 158.5 1 159 1 159.5 1 160 1 160.5 1 161 1 161.5 1 162 1 162.5 1 163 1 163.5 1 164 1 164.5 1 165 1 165.5 1 166 1 166.5 1 167 1 167.5 1 168 1 168.5 1 169 1 169.5 1 170 1 170.5 1 171 1 171.5 1 172 1 172.5 1 173 1 173.5 1 174 1 174.5 1 175 1 175.5 1 176 1 176.5 1 177 1 177.5 1 178 1 178.5 1 179 1 179.5 1 180 1 180.5 1 181 1 181.5 1 182 1 182.5 1 183 1 183.5 1 184 1 184.5 1 185 1 185.5 1 186 1 186.5 1 187 1 187.5 1 188 1 188.5 1 189 1 189.5 1 190 1 190.5 1 191 1 191.5 1 192 1 192.5 1 193 1 193.5 1 194 1 194.5 1 195 1 195.5 1 196 1 196.5 1 197 1 197.5 1 198 1 198.5 1 199 1 199.5 1 200 1 200.5 1 201 1 201.5 1 202 1 202.5 1 203 1 203.5 1 204 1 204.5 1 205 1 205.5 1 206 1 206.5 1 207 1 207.5 1 208 1 208.5 1 209 1 209.5 1 210 1 210.5 1 211 1 211.5 1 212 1 212.5 1 213 1 213.5 1 214 1 214.5 1 215 1 215.5 1 216 1 216.5 1 217 1 217.5 1 218 1 218.5 1 219 1 219.5 1 220 1 220.5 1 221 1 221.5 1 222 1 222.5 1 223 1 223.5 1 224 1 224.5 1 225 1 225.5 1 226 1 226.5 1 227 1 227.5 1 228 1 228.5 1 229 1 229.5 1 230 1 230.5 1 231 1 231.5 1 232 1 232.5 1 233 1 233.5 1 234 1 234.5 1 235 1 235.5 1 236 1 236.5 1 237 1 237.5 1 238 1 238.5 1 239 1 239.5 1 240 1 240.5 0 24 0 24.5 0 25 0 25.5 0 26 0 26.5 0 27 0 27.5 0 28 0 28.5 0 29 0 29.5 0 30 0 30.5 0 31 0 31.5 0 32 0 32.5 0 33 0 33.5 0 34 0 34.5 0 35 0 35.5 0 36 0 36.5 0 37 0 37.5 0 38 0 38.5 0 39 0 39.5 0 40 0 40.5 0 41 0 41.5 0 42 0 42.5 0 43 0 43.5 0 44 0 44.5 0 45 0 45.5 0 46 0 46.5 0 47 0 47.5 0 48 0 48.5 0 49 0 49.5 0 50 0 50.5 0 51 0 51.5 0 52 0 52.5 0 53 0 53.5 0 54 0 54.5 0 55 0 55.5 0 56 0 56.5 0 57 0 57.5 0 58 0 58.5 0 59 0 59.5 0 60 0 60.5 0 61 0 61.5 0 62 0 62.5 0 63 0 63.5 0 64 0 64.5 0 65 0 65.5 0 66 0 66.5 0 67 0 67.5 0 68 0 68.5 0 69 0 69.5 0 70 0 70.5 0 71 0 71.5 0 72 0 72.5 0 73 0 73.5 0 74 0 74.5 0 75 0 75.5 0 76 0 76.5 0 77 0 77.5 0 78 0 78.5 0 79 0 79.5 0 80 0 80.5 0 81 0 81.5 0 82 0 82.5 0 83 0 83.5 0 84 0 84.5 0 85 0 85.5 0 86 0 86.5 0 87 0 87.5 0 88 0 88.5 0 89 0 89.5 0 90 0 90.5 0 91 0 91.5 0 92 0 92.5 0 93 0 93.5 0 94 0 94.5 0 95 0 95.5 0 96 0 96.5 0 97 0 97.5 0 98 0 98.5 0 99 0 99.5 0 100 0 100.5 0 101 0 101.5 0 102 0 102.5 0 103 0 103.5 0 104 0 104.5 0 105 0 105.5 0 106 0 106.5 0 107 0 107.5 0 108 0 108.5 0 109 0 109.5 0 110 0 110.5 0 111 0 111.5 0 112 0 112.5 0 113 0 113.5 0 114 0 114.5 0 115 0 115.5 0 116 0 116.5 0 117 0 117.5 0 118 0 118.5 0 119 0 119.5 0 120 0 120.5 0 121 0 121.5 0 122 0 122.5 0 123 0 123.5 0 124 0 124.5 0 125 0 125.5 0 126 0 126.5 0 127 0 127.5 0 128 0 128.5 0 129 0 129.5 0 130 0 130.5 0 131 0 131.5 0 132 0 132.5 0 133 0 133.5 0 134 0 134.5 0 135 0 135.5 0 136 0 136.5 0 137 0 137.5 0 138 0 138.5 0 139 0 139.5 0 140 0 140.5 0 141 0 141.5 0 142 0 142.5 0 143 0 143.5 0 144 0 144.5 0 145 0 145.5 0 146 0 146.5 0 147 0 147.5 0 148 0 148.5 0 149 0 149.5 0 150 0 150.5 0 151 0 151.5 0 152 0 152.5 0 153 0 153.5 0 154 0 154.5 0 155 0 155.5 0 156 0 156.5 0 157 0 157.5 0 158 0 158.5 0 159 0 159.5 0 160 0 160.5 0 161 0 161.5 0 162 0 162.5 0 163 0 163.5 0 164 0 164.5 0 165 0 165.5 0 166 0 166.5 0 167 0 167.5 0 168 0 168.5 0 169 0 169.5 0 170 0 170.5 0 171 0 171.5 0 172 0 172.5 0 173 0 173.5 0 174 0 174.5 0 175 0 175.5 0 176 0 176.5 0 177 0 177.5 0 178 0 178.5 0 179 0 179.5 0 180 0 180.5 0 181 0 181.5 0 182 0 182.5 0 183 0 183.5 0 184 0 184.5 0 185 0 185.5 0 186 0 186.5 0 187 0 187.5 0 188 0 188.5 0 189 0 189.5 0 190 0 190.5 0 191 0 191.5 0 192 0 192.5 0 193 0 193.5 0 194 0 194.5 0 195 0 195.5 0 196 0 196.5 0 197 0 197.5 0 198 0 198.5 0 199 0 199.5 0 200 0 200.5 0 201 0 201.5 0 202 0 202.5 0 203 0 203.5 0 204 0 204.5 0 205 0 205.5 0 206 0 206.5 0 207 0 207.5 0 208 0 208.5 0 209 0 209.5 0 210 0 210.5 0 211 0 211.5 0 212 0 212.5 0 213 0 213.5 0 214 0 214.5 0 215 0 215.5 0 216 0 216.5 0 217 0 217.5 0 218 0 218.5 0 219 0 219.5 0 220 0 220.5 0 221 0 221.5 0 222 0 222.5 0 223 0 223.5 0 224 0 224.5 0 225 0 225.5 0 226 0 226.5 0 227 0 227.5 0 228 0 228.5 0 229 0 229.5 0 230 0 230.5 0 231 0 231.5 0 232 0 232.5 0 233 0 233.5 0 234 0 234.5 0 235 0 235.5 0 236 0 236.5 0 237 0 237.5 0 238 0 238.5 0 239 0 239.5 0 240 0 240.5
Names of X columns:
gender age
Response : Variable 1
Factor : Variable 2
Factor : Variable 3
Include Intercept Term ?
0
TRUE
FALSE
Chart options
Title:
Label y-axis:
Label x-axis:
R Code
par4 <- 'TRUE' par3 <- '' par2 <- '' par1 <- '' cat1 <- as.numeric(par1) # cat2<- as.numeric(par2) # cat3 <- as.numeric(par3) intercept<-as.logical(par4) x <- t(x) x1<-as.numeric(x[,cat1]) f1<-as.character(x[,cat2]) f2 <- as.character(x[,cat3]) xdf<-data.frame(x1,f1, f2) (V1<-dimnames(y)[[1]][cat1]) (V2<-dimnames(y)[[1]][cat2]) (V3 <-dimnames(y)[[1]][cat3]) names(xdf)<-c('Response', 'Treatment_A', 'Treatment_B') if(intercept == FALSE) (lmxdf<-lm(Response ~ Treatment_A * Treatment_B- 1, data = xdf) ) else (lmxdf<-lm(Response ~ Treatment_A * Treatment_B, 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, lmxdf$call['formula'],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) for(i in 1 : length(rownames(anova.xdf))-1){ a<-table.row.start(a) a<-table.element(a,rownames(anova.xdf)[i] ,,TRUE) a<-table.element(a, anova.xdf$Df[1],,FALSE) a<-table.element(a, round(anova.xdf$'Sum Sq'[i], digits=3),,FALSE) a<-table.element(a, round(anova.xdf$'Mean Sq'[i], digits=3),,FALSE) a<-table.element(a, round(anova.xdf$'F value'[i], digits=3),,FALSE) a<-table.element(a, round(anova.xdf$'Pr(>F)'[i], 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'[i+1],,FALSE) a<-table.element(a, round(anova.xdf$'Sum Sq'[i+1], digits=3),,FALSE) a<-table.element(a, round(anova.xdf$'Mean Sq'[i+1], 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_A + Treatment_B, data=xdf, xlab=V2, ylab=V1, main='Boxplots of ANOVA Groups') dev.off() bitmap(file='designplot.png') xdf2 <- xdf # to preserve xdf make copy for function names(xdf2) <- c(V1, V2, V3) plot.design(xdf2, main='Design Plot of Group Means') dev.off() bitmap(file='interactionplot.png') interaction.plot(xdf$Treatment_A, xdf$Treatment_B, xdf$Response, xlab=V2, ylab=V1, trace.label=V3, main='Possible Interactions Between Anova Groups') dev.off() if(intercept==TRUE){ thsd<-TukeyHSD(aov.xdf) names(thsd) <- c(V2, V3, paste(V2, ':', V3, sep='')) bitmap(file='TukeyHSDPlot.png') layout(matrix(c(1,2,3,3), 2,2)) plot(thsd, las=1) dev.off() } if(intercept==TRUE){ ntables<-length(names(thsd)) 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(nt in 1:ntables){ for(i in 1:length(rownames(thsd[[nt]]))){ a<-table.row.start(a) a<-table.element(a,rownames(thsd[[nt]])[i], 1, TRUE) for(j in 1:4){ a<-table.element(a,round(thsd[[nt]][i,j], digits=3), 1, FALSE) } a<-table.row.end(a) } } # end nt a<-table.end(a) table.save(a,file='hsdtable.tab') }#end if hsd tables 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<-levene.test(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
1 seconds
R Server
Big Analytics Cloud Computing Center
Click here to blog (archive) this computation