Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
'S' "'Female'" 149 'S' "'Male'" 139 'S' "'Female'" 148 'S' "'Male'" 158 'S' "'Male'" 128 'S' "'Male'" 224 'S' "'Female'" 159 'S' "'Male'" 105 'S' "'Male'" 159 'S' "'Male'" 167 'S' "'Male'" 165 'S' "'Male'" 159 'S' "'Male'" 119 'S' "'Female'" 176 'S' "'Female'" 54 'B' "'Female'" 91 'S' "'Male'" 163 'S' "'Female'" 124 'B' "'Male'" 137 'S' "'Female'" 121 'S' "'Male'" 153 'S' "'Male'" 148 'S' "'Female'" 221 'S' "'Male'" 188 'S' "'Male'" 149 'S' "'Male'" 244 'B' "'Male'" 148 'B' "'Female'" 92 'S' "'Male'" 150 'S' "'Female'" 153 'S' "'Female'" 94 'S' "'Female'" 156 'S' "'Male'" 132 'S' "'Male'" 161 'S' "'Male'" 105 'S' "'Male'" 97 'S' "'Female'" 151 'B' "'Male'" 131 'S' "'Male'" 166 'S' "'Female'" 157 'S' "'Male'" 111 'S' "'Male'" 145 'S' "'Male'" 162 'S' "'Male'" 163 'B' "'Male'" 59 'S' "'Female'" 187 'S' "'Male'" 109 'B' "'Male'" 90 'S' "'Female'" 105 'B' "'Male'" 83 'B' "'Male'" 116 'B' "'Male'" 42 'S' "'Male'" 148 'B' "'Male'" 155 'S' "'Male'" 125 'S' "'Male'" 116 'B' "'Female'" 128 'S' "'Male'" 138 'B' "'Female'" 49 'B' "'Male'" 96 'S' "'Male'" 164 'S' "'Female'" 162 'S' "'Female'" 99 'S' "'Male'" 202 'S' "'Female'" 186 'B' "'Male'" 66 'S' "'Female'" 183 'S' "'Male'" 214 'S' "'Male'" 188 'B' "'Female'" 104 'S' "'Female'" 177 'S' "'Female'" 126 'B' "'Female'" 76 'B' "'Male'" 99 'S' "'Female'" 139 'S' "'Male'" 78 'S' "'Female'" 162 'B' "'Male'" 108 'S' "'Female'" 159 'B' "'Female'" 74 'S' "'Male'" 110 'B' "'Female'" 96 'B' "'Female'" 116 'B' "'Female'" 87 'B' "'Male'" 97 'B' "'Female'" 127 'B' "'Male'" 106 'B' "'Male'" 80 'B' "'Female'" 74 'B' "'Female'" 91 'B' "'Female'" 133 'B' "'Male'" 74 'B' "'Male'" 114 'B' "'Male'" 140 'B' "'Female'" 95 'B' "'Male'" 98 'B' "'Female'" 121 'B' "'Male'" 126 'B' "'Male'" 98 'B' "'Male'" 95 'B' "'Male'" 110 'B' "'Male'" 70 'B' "'Female'" 102 'B' "'Male'" 86 'B' "'Male'" 130 'B' "'Male'" 96 'B' "'Female'" 102 'B' "'Female'" 100 'B' "'Female'" 94 'B' "'Female'" 52 'B' "'Female'" 98 'B' "'Female'" 118 'B' "'Male'" 99 'S' "'Male'" 48 'S' "'Male'" 50 'S' "'Male'" 150 'S' "'Male'" 154 'B' "'Female'" 109 'B' "'Male'" 68 'S' "'Male'" 194 'S' "'Female'" 158 'S' "'Male'" 159 'S' "'Female'" 67 'S' "'Female'" 147 'S' "'Male'" 39 'S' "'Male'" 100 'S' "'Male'" 111 'S' "'Male'" 138 'S' "'Male'" 101 'B' "'Male'" 131 'S' "'Male'" 101 'S' "'Male'" 114 'S' "'Female'" 165 'S' "'Male'" 114 'S' "'Male'" 111 'S' "'Male'" 75 'S' "'Male'" 82 'S' "'Male'" 121 'S' "'Male'" 32 'S' "'Female'" 150 'S' "'Male'" 117 'B' "'Male'" 71 'S' "'Male'" 165 'S' "'Male'" 154 'S' "'Male'" 126 'S' "'Female'" 149 'S' "'Female'" 145 'S' "'Male'" 120 'S' "'Female'" 109 'S' "'Female'" 132 'S' "'Male'" 172 'S' "'Female'" 169 'S' "'Male'" 114 'S' "'Male'" 156 'S' "'Female'" 172 'B' "'Male'" 68 'B' "'Male'" 89 'S' "'Male'" 167 'S' "'Female'" 113 'B' "'Female'" 115 'B' "'Female'" 78 'B' "'Female'" 118 'B' "'Male'" 87 'S' "'Female'" 173 'S' "'Male'" 2 'B' "'Female'" 162 'B' "'Male'" 49 'B' "'Female'" 122 'B' "'Male'" 96 'B' "'Female'" 100 'B' "'Female'" 82 'B' "'Male'" 100 'B' "'Female'" 115 'B' "'Male'" 141 'S' "'Male'" 165 'S' "'Male'" 165 'B' "'Male'" 110 'S' "'Male'" 118 'S' "'Female'" 158 'B' "'Male'" 146 'S' "'Female'" 49 'B' "'Female'" 90 'B' "'Female'" 121 'S' "'Male'" 155 'B' "'Female'" 104 'B' "'Male'" 147 'B' "'Female'" 110 'B' "'Female'" 108 'B' "'Female'" 113 'B' "'Female'" 115 'B' "'Male'" 61 'B' "'Male'" 60 'B' "'Male'" 109 'B' "'Male'" 68 'B' "'Female'" 111 'B' "'Female'" 77 'B' "'Male'" 73 'S' "'Female'" 151 'B' "'Female'" 89 'B' "'Female'" 78 'B' "'Female'" 110 'S' "'Male'" 220 'B' "'Male'" 65 'S' "'Female'" 141 'B' "'Female'" 117 'S' "'Male'" 122 'B' "'Female'" 63 'S' "'Male'" 44 'B' "'Male'" 52 'B' "'Female'" 131 'B' "'Male'" 101 'B' "'Male'" 42 'S' "'Male'" 152 'S' "'Female'" 107 'B' "'Female'" 77 'S' "'Female'" 154 'S' "'Male'" 103 'B' "'Male'" 96 'S' "'Male'" 175 'B' "'Male'" 57 'B' "'Female'" 112 'S' "'Female'" 143 'B' "'Female'" 49 'S' "'Male'" 110 'S' "'Male'" 131 'S' "'Female'" 167 'B' "'Female'" 56 'S' "'Female'" 137 'B' "'Male'" 86 'S' "'Male'" 121 'S' "'Female'" 149 'S' "'Female'" 168 'S' "'Female'" 140 'B' "'Male'" 88 'S' "'Male'" 168 'S' "'Male'" 94 'S' "'Male'" 51 'B' "'Female'" 48 'S' "'Male'" 145 'S' "'Male'" 66 'B' "'Male'" 85 'S' "'Female'" 109 'B' "'Female'" 63 'B' "'Male'" 102 'B' "'Female'" 162 'B' "'Male'" 86 'B' "'Male'" 114 'S' "'Female'" 164 'S' "'Male'" 119 'S' "'Female'" 126 'S' "'Male'" 132 'S' "'Male'" 142 'S' "'Female'" 83 'B' "'Male'" 94 'B' "'Female'" 81 'S' "'Male'" 166 'B' "'Female'" 110 'B' "'Male'" 64 'S' "'Female'" 93 'B' "'Female'" 104 'B' "'Male'" 105 'B' "'Male'" 49 'B' "'Female'" 88 'B' "'Male'" 95 'B' "'Male'" 102 'B' "'Female'" 99 'B' "'Male'" 63 'B' "'Female'" 76 'B' "'Female'" 109 'B' "'Male'" 117 'B' "'Male'" 57 'B' "'Female'" 120 'B' "'Male'" 73 'B' "'Female'" 91 'B' "'Female'" 108 'B' "'Male'" 105 'S' "'Female'" 117 'B' "'Female'" 119 'B' "'Male'" 31
Names of X columns:
Course gender LFM
Response : Variable 1
Factor : Variable 2
Factor : Variable 3
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) # 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
0 seconds
R Server
Big Analytics Cloud Computing Center
Click here to blog (archive) this computation