Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
50 26 4 54 37 5 71 67 4 54 43 4 65 52 9 73 52 8 52 43 11 84 84 4 42 67 4 66 49 6 65 70 4 73 58 4 75 68 4 72 62 11 66 43 4 70 56 4 81 74 6 69 63 8 71 58 5 68 63 9 70 53 4 68 57 7 67 64 4 76 53 4 70 29 7 60 54 12 72 58 7 71 51 8 70 54 4 64 56 9 76 47 4 68 50 4 76 35 4 65 30 7 67 68 4 75 56 4 60 43 4 73 67 4 63 62 4 70 57 4 66 54 12 64 61 4 70 56 5 75 41 15 60 53 10 66 46 5 59 51 9 78 37 4 53 59 6 67 42 7 59 38 5 66 66 4 68 34 4 71 53 4 66 49 4 72 49 4 71 59 6 59 40 10 78 63 4 65 34 11 65 32 14 71 67 4 72 61 4 66 60 5 69 63 4 51 52 6 56 16 4 67 46 8 69 56 5 57 52 4 56 55 17 55 50 4 63 59 4 67 60 8 65 52 4 47 44 7 76 67 4 64 52 4 68 55 5 64 37 7 65 54 4 71 72 4 63 51 7 60 48 11 68 60 7 72 50 4 70 63 4 61 33 4 61 67 4 62 46 4 71 54 4 71 59 6 51 61 8 56 33 23 70 47 4 73 69 8 76 52 6 68 55 4 48 41 7 52 73 4 60 52 4 59 50 4 57 51 10 79 60 6 60 56 5 60 56 5 59 29 4 62 66 4 59 66 5 61 73 5 71 55 5 57 64 5 66 40 4 63 46 6 69 58 4 58 43 4 59 61 4 48 51 9 66 50 18 73 52 6 67 54 5 61 66 4 68 61 11 75 80 4 62 51 10 69 56 6 58 56 8 60 56 8 74 53 6 55 47 8 62 25 4 63 47 4 69 46 9 58 50 9 58 39 5 68 51 4 72 58 4 62 35 15 62 58 10 65 60 9 69 62 7 66 63 9 72 53 6 62 46 4 75 67 7 58 59 4 66 64 7 55 38 4 47 50 15 72 48 4 62 48 9 64 47 4 64 66 4 19 47 28 50 63 4 68 58 4 70 44 4 79 51 5 69 43 4 71 55 4 48 38 12 73 45 4 74 50 6 66 54 6 71 57 5 74 60 4 78 55 4 75 56 4 53 49 10 60 37 7 70 59 4 69 46 7 65 51 4 78 58 4 78 64 12 59 53 5 72 48 8 70 51 6 63 47 17 63 59 4 71 62 5 74 62 4 67 51 5 66 64 5 62 52 6 80 67 4 73 50 4 67 54 4 61 58 6 73 56 8 74 63 10 32 31 4 69 65 5 69 71 4 84 50 4 64 57 4 58 47 16 59 47 7 78 57 4 57 43 4 60 41 14 68 63 5 68 63 5 73 56 5 69 51 5 67 50 7 60 22 19 65 41 16 66 59 4 74 56 4 81 66 7 72 53 9 55 42 5 49 52 14 74 54 4 53 44 16 64 62 10 65 53 5 57 50 6 51 36 4 80 76 4 67 66 4 70 62 5 74 59 4 75 47 4 70 55 5 69 58 4 65 60 4 55 44 5 71 57 8 65 45 15
Names of X columns:
AMS.E AMS.I AMS.A
Response : Variable 1
Factor : Variable 2
Factor : Variable 3
Include Intercept Term ?
FALSE
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