Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
2011 0 12.9 2011 1 12.2 2011 0 12.8 2011 1 7.4 2011 1 6.7 2011 1 12.6 2011 0 14.8 2011 1 13.3 2011 1 11.1 2011 1 8.2 2011 1 11.4 2011 1 6.4 2011 1 10.6 2011 0 12 2011 0 6.3 2011 0 11.3 2011 1 11.9 2011 0 9.3 2011 1 9.6 2011 0 10 2011 1 6.4 2011 1 13.8 2011 0 10.8 2011 1 13.8 2011 1 11.7 2011 1 10.9 2011 1 16.1 2011 0 13.4 2011 1 9.9 2011 0 11.5 2011 0 8.3 2011 0 11.7 2011 1 9 2011 1 9.7 2011 1 10.8 2011 1 10.3 2011 0 10.4 2011 1 12.7 2011 1 9.3 2011 0 11.8 2011 1 5.9 2011 1 11.4 2011 1 13 2011 1 10.8 2011 1 12.3 2011 0 11.3 2011 1 11.8 2011 1 7.9 2011 0 12.7 2011 1 12.3 2011 1 11.6 2011 1 6.7 2011 1 10.9 2011 1 12.1 2011 1 13.3 2011 1 10.1 2011 0 5.7 2011 1 14.3 2011 0 8 2011 1 13.3 2011 1 9.3 2011 0 12.5 2011 0 7.6 2011 1 15.9 2011 0 9.2 2011 1 9.1 2011 0 11.1 2011 1 13 2011 1 14.5 2011 0 12.2 2011 0 12.3 2011 0 11.4 2011 0 8.8 2011 1 14.6 2011 0 12.6 2011 0 13 2011 1 12.6 2011 0 13.2 2011 0 9.9 2011 1 7.7 2011 0 10.5 2011 0 13.4 2011 0 10.9 2011 1 4.3 2011 0 10.3 2011 1 11.8 2011 1 11.2 2011 0 11.4 2011 0 8.6 2011 0 13.2 2011 1 12.6 2011 1 5.6 2011 1 9.9 2011 0 8.8 2011 1 7.7 2011 0 9 2011 1 7.3 2011 1 11.4 2011 1 13.6 2011 1 7.9 2011 1 10.7 2011 0 10.3 2011 1 8.3 2011 1 9.6 2011 1 14.2 2011 0 8.5 2011 0 13.5 2011 0 4.9 2011 0 6.4 2011 0 9.6 2011 0 11.6 2011 1 11.1 2012 1 4.35 2012 1 12.7 2012 1 18.1 2012 1 17.85 2012 0 16.6 2012 1 12.6 2012 1 17.1 2012 0 19.1 2012 1 16.1 2012 0 13.35 2012 0 18.4 2012 1 14.7 2012 1 10.6 2012 1 12.6 2012 1 16.2 2012 1 13.6 2012 1 18.9 2012 1 14.1 2012 1 14.5 2012 0 16.15 2012 1 14.75 2012 1 14.8 2012 1 12.45 2012 1 12.65 2012 1 17.35 2012 1 8.6 2012 0 18.4 2012 1 16.1 2012 1 11.6 2012 1 17.75 2012 1 15.25 2012 1 17.65 2012 0 16.35 2012 0 17.65 2012 1 13.6 2012 0 14.35 2012 0 14.75 2012 1 18.25 2012 0 9.9 2012 1 16 2012 1 18.25 2012 0 16.85 2012 1 14.6 2012 1 13.85 2012 1 18.95 2012 0 15.6 2012 0 14.85 2012 0 11.75 2012 0 18.45 2012 1 15.9 2012 0 17.1 2012 1 16.1 2012 0 19.9 2012 1 10.95 2012 0 18.45 2012 1 15.1 2012 0 15 2012 0 11.35 2012 1 15.95 2012 0 18.1 2012 1 14.6 2012 1 15.4 2012 1 15.4 2012 1 17.6 2012 1 13.35 2012 0 19.1 2012 1 15.35 2012 0 7.6 2012 0 13.4 2012 0 13.9 2012 1 19.1 2012 0 15.25 2012 1 12.9 2012 0 16.1 2012 0 17.35 2012 0 13.15 2012 0 12.15 2012 1 12.6 2012 1 10.35 2012 1 15.4 2012 1 9.6 2012 0 18.2 2012 0 13.6 2012 1 14.85 2012 0 14.75 2012 0 14.1 2012 0 14.9 2012 0 16.25 2012 1 19.25 2012 1 13.6 2012 0 13.6 2012 0 15.65 2012 1 12.75 2012 0 14.6 2012 1 9.85 2012 1 12.65 2012 0 19.2 2012 1 16.6 2012 1 11.2 2012 1 15.25 2012 0 11.9 2012 0 13.2 2012 0 16.35 2012 1 12.4 2012 1 15.85 2012 1 18.15 2012 1 11.15 2012 0 15.65 2012 0 17.75 2012 0 7.65 2012 1 12.35 2012 1 15.6 2012 0 19.3 2012 0 15.2 2012 0 17.1 2012 1 15.6 2012 1 18.4 2012 0 19.05 2012 0 18.55 2012 0 19.1 2012 1 13.1 2012 1 12.85 2012 1 9.5 2012 1 4.5 2012 0 11.85 2012 1 13.6 2012 1 11.7 2012 1 12.4 2012 0 13.35 2012 0 11.4 2012 1 14.9 2012 0 19.9 2012 1 11.2 2012 1 14.6 2012 0 17.6 2012 1 14.05 2012 0 16.1 2012 1 13.35 2012 1 11.85 2012 0 11.95 2012 1 14.75 2012 0 15.15 2012 1 13.2 2012 0 16.85 2012 1 7.85 2012 0 7.7 2012 0 12.6 2012 1 7.85 2012 1 10.95 2012 0 12.35 2012 1 9.95 2012 1 14.9 2012 0 16.65 2012 1 13.4 2012 0 13.95 2012 0 15.7 2012 1 16.85 2012 1 10.95 2012 0 15.35 2012 1 12.2 2012 0 15.1 2012 0 17.75 2012 1 15.2 2012 0 14.6 2012 0 16.65 2012 1 8.1
Names of X columns:
year gender TOT
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
1 seconds
R Server
Big Analytics Cloud Computing Center
Click here to blog (archive) this computation