Free Statistics

of Irreproducible Research!

Author's title

Author*The author of this computation has been verified*
R Software Modulerwasp_Two Factor ANOVA.wasp
Title produced by softwareTwo-Way ANOVA
Date of computationThu, 18 Dec 2014 13:20:40 +0000
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2014/Dec/18/t1418909063p7yubylrgtl8037.htm/, Retrieved Fri, 17 May 2024 18:55:18 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=270909, Retrieved Fri, 17 May 2024 18:55:18 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact67
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Two-Way ANOVA] [] [2014-12-18 13:20:40] [58179e1d3a5a39b9daf58e365d8a3352] [Current]
Feedback Forum

Post a new message
Dataseries X:
0 "'S'" 86
0 "'S'" 71
1 "'S'" 108
1 "'S'" 64
1 "'S'" 119
0 "'S'" 97
1 "'S'" 129
1 "'S'" 153
1 "'S'" 78
1 "'S'" 80
1 "'S'" 99
0 "'S'" 147
0 "'S'" 40
0 "'B'" 57
1 "'S'" 120
0 "'S'" 71
0 "'S'" 68
1 "'S'" 137
0 "'S'" 79
1 "'S'" 101
1 "'S'" 111
1 "'B'" 189
1 "'S'" 81
0 "'S'" 63
0 "'S'" 69
0 "'S'" 71
1 "'S'" 64
1 "'S'" 85
0 "'S'" 55
1 "'B'" 69
0 "'S'" 96
1 "'S'" 100
1 "'S'" 68
1 "'B'" 57
0 "'S'" 105
1 "'B'" 69
1 "'S'" 49
1 "'B'" 50
1 "'S'" 93
1 "'S'" 58
1 "'S'" 74
1 "'S'" 107
0 "'S'" 65
0 "'S'" 58
0 "'S'" 70
1 "'S'" 95
0 "'S'" 136
0 "'S'" 82
0 "'S'" 102
1 "'B'" 65
0 "'S'" 90
1 "'S'" 83
0 "'B'" 70
0 "'B'" 77
1 "'B'" 37
0 "'B'" 81
0 "'B'" 71
1 "'B'" 40
0 "'B'" 43
0 "'B'" 32
1 "'B'" 76
0 "'B'" 30
0 "'B'" 51




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Sir Ronald Aylmer Fisher' @ fisher.wessa.net

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input & view raw input (R code)  \tabularnewline
Raw Output & view raw output of R engine  \tabularnewline
Computing time & 2 seconds \tabularnewline
R Server & 'Sir Ronald Aylmer Fisher' @ fisher.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=270909&T=0

[TABLE]
[ROW][C]Summary of computational transaction[/C][/ROW]
[ROW][C]Raw Input[/C][C]view raw input (R code) [/C][/ROW]
[ROW][C]Raw Output[/C][C]view raw output of R engine [/C][/ROW]
[ROW][C]Computing time[/C][C]2 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Sir Ronald Aylmer Fisher' @ fisher.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=270909&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=270909&T=0

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Sir Ronald Aylmer Fisher' @ fisher.wessa.net







ANOVA Model
Response ~ Treatment_A * Treatment_B
means56.88915.55625.063-3.508

\begin{tabular}{lllllllll}
\hline
ANOVA Model \tabularnewline
Response ~ Treatment_A * Treatment_B \tabularnewline
means & 56.889 & 15.556 & 25.063 & -3.508 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=270909&T=1

[TABLE]
[ROW][C]ANOVA Model[/C][/ROW]
[ROW][C]Response ~ Treatment_A * Treatment_B[/C][/ROW]
[ROW][C]means[/C][C]56.889[/C][C]15.556[/C][C]25.063[/C][C]-3.508[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=270909&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=270909&T=1

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

ANOVA Model
Response ~ Treatment_A * Treatment_B
means56.88915.55625.063-3.508







ANOVA Statistics
DfSum SqMean SqF valuePr(>F)
1
Treatment_A12944.1982944.1983.5840.063
Treatment_B16959.3156959.3158.4720.005
Treatment_A:Treatment_B139.50339.5030.0480.827
Residuals5948468.063821.493

\begin{tabular}{lllllllll}
\hline
ANOVA Statistics \tabularnewline
  & Df & Sum Sq & Mean Sq & F value & Pr(>F) \tabularnewline
 & 1 &  &  &  &  \tabularnewline
Treatment_A & 1 & 2944.198 & 2944.198 & 3.584 & 0.063 \tabularnewline
Treatment_B & 1 & 6959.315 & 6959.315 & 8.472 & 0.005 \tabularnewline
Treatment_A:Treatment_B & 1 & 39.503 & 39.503 & 0.048 & 0.827 \tabularnewline
Residuals & 59 & 48468.063 & 821.493 &   &   \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=270909&T=2

[TABLE]
[ROW][C]ANOVA Statistics[/C][/ROW]
[ROW][C] [/C][C]Df[/C][C]Sum Sq[/C][C]Mean Sq[/C][C]F value[/C][C]Pr(>F)[/C][/ROW]
[ROW][C][/C][C]1[/C][C][/C][C][/C][C][/C][C][/C][/ROW]
[ROW][C]Treatment_A[/C][C]1[/C][C]2944.198[/C][C]2944.198[/C][C]3.584[/C][C]0.063[/C][/ROW]
[ROW][C]Treatment_B[/C][C]1[/C][C]6959.315[/C][C]6959.315[/C][C]8.472[/C][C]0.005[/C][/ROW]
[ROW][C]Treatment_A:Treatment_B[/C][C]1[/C][C]39.503[/C][C]39.503[/C][C]0.048[/C][C]0.827[/C][/ROW]
[ROW][C]Residuals[/C][C]59[/C][C]48468.063[/C][C]821.493[/C][C] [/C][C] [/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=270909&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=270909&T=2

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

ANOVA Statistics
DfSum SqMean SqF valuePr(>F)
1
Treatment_A12944.1982944.1983.5840.063
Treatment_B16959.3156959.3158.4720.005
Treatment_A:Treatment_B139.50339.5030.0480.827
Residuals5948468.063821.493







Tukey Honest Significant Difference Comparisons
difflwruprp adj
1-013.688-0.7828.1560.063
'S'-'B'23.2557.2639.250.005
1:'B'-0:'B'15.556-20.16551.2770.66
0:'S'-0:'B'25.063-5.12655.2530.137
1:'S'-0:'B'37.1117.49366.7290.008
0:'S'-1:'B'9.508-20.68239.6980.839
1:'S'-1:'B'21.556-8.06351.1740.229
1:'S'-0:'S'12.048-10.59534.690.5

\begin{tabular}{lllllllll}
\hline
Tukey Honest Significant Difference Comparisons \tabularnewline
  & diff & lwr & upr & p adj \tabularnewline
1-0 & 13.688 & -0.78 & 28.156 & 0.063 \tabularnewline
'S'-'B' & 23.255 & 7.26 & 39.25 & 0.005 \tabularnewline
1:'B'-0:'B' & 15.556 & -20.165 & 51.277 & 0.66 \tabularnewline
0:'S'-0:'B' & 25.063 & -5.126 & 55.253 & 0.137 \tabularnewline
1:'S'-0:'B' & 37.111 & 7.493 & 66.729 & 0.008 \tabularnewline
0:'S'-1:'B' & 9.508 & -20.682 & 39.698 & 0.839 \tabularnewline
1:'S'-1:'B' & 21.556 & -8.063 & 51.174 & 0.229 \tabularnewline
1:'S'-0:'S' & 12.048 & -10.595 & 34.69 & 0.5 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=270909&T=3

[TABLE]
[ROW][C]Tukey Honest Significant Difference Comparisons[/C][/ROW]
[ROW][C] [/C][C]diff[/C][C]lwr[/C][C]upr[/C][C]p adj[/C][/ROW]
[ROW][C]1-0[/C][C]13.688[/C][C]-0.78[/C][C]28.156[/C][C]0.063[/C][/ROW]
[ROW][C]'S'-'B'[/C][C]23.255[/C][C]7.26[/C][C]39.25[/C][C]0.005[/C][/ROW]
[ROW][C]1:'B'-0:'B'[/C][C]15.556[/C][C]-20.165[/C][C]51.277[/C][C]0.66[/C][/ROW]
[ROW][C]0:'S'-0:'B'[/C][C]25.063[/C][C]-5.126[/C][C]55.253[/C][C]0.137[/C][/ROW]
[ROW][C]1:'S'-0:'B'[/C][C]37.111[/C][C]7.493[/C][C]66.729[/C][C]0.008[/C][/ROW]
[ROW][C]0:'S'-1:'B'[/C][C]9.508[/C][C]-20.682[/C][C]39.698[/C][C]0.839[/C][/ROW]
[ROW][C]1:'S'-1:'B'[/C][C]21.556[/C][C]-8.063[/C][C]51.174[/C][C]0.229[/C][/ROW]
[ROW][C]1:'S'-0:'S'[/C][C]12.048[/C][C]-10.595[/C][C]34.69[/C][C]0.5[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=270909&T=3

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=270909&T=3

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Tukey Honest Significant Difference Comparisons
difflwruprp adj
1-013.688-0.7828.1560.063
'S'-'B'23.2557.2639.250.005
1:'B'-0:'B'15.556-20.16551.2770.66
0:'S'-0:'B'25.063-5.12655.2530.137
1:'S'-0:'B'37.1117.49366.7290.008
0:'S'-1:'B'9.508-20.68239.6980.839
1:'S'-1:'B'21.556-8.06351.1740.229
1:'S'-0:'S'12.048-10.59534.690.5







Levenes Test for Homogeneity of Variance
DfF valuePr(>F)
Group30.2890.833
59

\begin{tabular}{lllllllll}
\hline
Levenes Test for Homogeneity of Variance \tabularnewline
  & Df & F value & Pr(>F) \tabularnewline
Group & 3 & 0.289 & 0.833 \tabularnewline
  & 59 &   &   \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=270909&T=4

[TABLE]
[ROW][C]Levenes Test for Homogeneity of Variance[/C][/ROW]
[ROW][C] [/C][C]Df[/C][C]F value[/C][C]Pr(>F)[/C][/ROW]
[ROW][C]Group[/C][C]3[/C][C]0.289[/C][C]0.833[/C][/ROW]
[ROW][C] [/C][C]59[/C][C] [/C][C] [/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=270909&T=4

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=270909&T=4

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Levenes Test for Homogeneity of Variance
DfF valuePr(>F)
Group30.2890.833
59



Parameters (Session):
par1 = 3 ; par2 = 1 ; par3 = 2 ; par4 = TRUE ;
Parameters (R input):
par1 = 3 ; par2 = 1 ; par3 = 2 ; par4 = TRUE ;
R code (references can be found in the software module):
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')