Free Statistics

of Irreproducible Research!

Author's title

Author*The author of this computation has been verified*
R Software ModuleIan.Hollidayrwasp_Two Factor ANOVA.wasp
Title produced by softwareAnalysis of Variance Free Statistics Software (Calculator)
Date of computationSun, 13 Dec 2009 07:31:09 -0700
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2009/Dec/13/t1260714730rofm53brvb2qh1e.htm/, Retrieved Sun, 28 Apr 2024 15:19:31 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=67299, Retrieved Sun, 28 Apr 2024 15:19:31 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact152
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Analysis of Variance Free Statistics Software (Calculator)] [TWO WAY ANOVA TES...] [2009-12-13 11:19:27] [98fd0e87c3eb04e0cc2efde01dbafab6]
- R P     [Analysis of Variance Free Statistics Software (Calculator)] [TWO WAY ANOVA TES...] [2009-12-13 14:31:09] [a9208f4f8d3b118336aae915785f2bd9] [Current]
Feedback Forum

Post a new message
Dataseries X:
0.18	'C'	'M'
-0.45	'C'	'M'
1.19	'C'	'M'
0.63	'C'	'M'
0.80	'C'	'F'
-1.09	'C'	'F'
-1.24	'C'	'F'
1.17	'C'	'F'
-0.11	'A'	'M'
1.68	'A'	'M'
2.44	'A'	'M'
0.30	'A'	'M'
2.59	'A'	'F'
2.01	'A'	'F'
1.01	'A'	'F'
1.95	'A'	'F'
-0.23	'B'	'M'
1.87	'B'	'M'
-0.23	'B'	'M'
-0.42	'B'	'M'
3.09	'B'	'F'
0.79	'B'	'F'
-0.82	'B'	'F'
3.23	'B'	'F'




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135

\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 & 4 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=67299&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]4 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Gwilym Jenkins' @ 72.249.127.135[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=67299&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=67299&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 time4 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135







ANOVA Model
Response ~ Treatment_A * Treatment_B
means1.89-0.318-1.98-0.813-0.5121.29

\begin{tabular}{lllllllll}
\hline
ANOVA Model \tabularnewline
Response ~ Treatment_A * Treatment_B \tabularnewline
means & 1.89 & -0.318 & -1.98 & -0.813 & -0.512 & 1.29 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=67299&T=1

[TABLE]
[ROW][C]ANOVA Model[/C][/ROW]
[ROW][C]Response ~ Treatment_A * Treatment_B[/C][/ROW]
[ROW][C]means[/C][C]1.89[/C][C]-0.318[/C][C]-1.98[/C][C]-0.813[/C][C]-0.512[/C][C]1.29[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=67299&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=67299&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
means1.89-0.318-1.98-0.813-0.5121.29







ANOVA Statistics
DfSum SqMean SqF valuePr(>F)
2
Treatment_A27.1763.5882.4290.116
Treatment_B21.8371.8371.2440.279
Treatment_A:Treatment_B23.4511.7251.1680.333
Residuals1826.5861.477

\begin{tabular}{lllllllll}
\hline
ANOVA Statistics \tabularnewline
  & Df & Sum Sq & Mean Sq & F value & Pr(>F) \tabularnewline
 & 2 &  &  &  &  \tabularnewline
Treatment_A & 2 & 7.176 & 3.588 & 2.429 & 0.116 \tabularnewline
Treatment_B & 2 & 1.837 & 1.837 & 1.244 & 0.279 \tabularnewline
Treatment_A:Treatment_B & 2 & 3.451 & 1.725 & 1.168 & 0.333 \tabularnewline
Residuals & 18 & 26.586 & 1.477 &   &   \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=67299&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]2[/C][C][/C][C][/C][C][/C][C][/C][/ROW]
[ROW][C]Treatment_A[/C][C]2[/C][C]7.176[/C][C]3.588[/C][C]2.429[/C][C]0.116[/C][/ROW]
[ROW][C]Treatment_B[/C][C]2[/C][C]1.837[/C][C]1.837[/C][C]1.244[/C][C]0.279[/C][/ROW]
[ROW][C]Treatment_A:Treatment_B[/C][C]2[/C][C]3.451[/C][C]1.725[/C][C]1.168[/C][C]0.333[/C][/ROW]
[ROW][C]Residuals[/C][C]18[/C][C]26.586[/C][C]1.477[/C][C] [/C][C] [/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=67299&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=67299&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)
2
Treatment_A27.1763.5882.4290.116
Treatment_B21.8371.8371.2440.279
Treatment_A:Treatment_B23.4511.7251.1680.333
Residuals1826.5861.477







Tukey Honest Significant Difference Comparisons
difflwruprp adj
B-A-0.574-2.1250.9770.62
C-A-1.335-2.8860.2160.099
C-B-0.761-2.3120.790.439
M-F-0.553-1.5960.4890.279
B:F-A:F-0.318-3.0492.4140.999
C:F-A:F-1.98-4.7110.7510.243
A:M-A:F-0.813-3.5441.9190.929
B:M-A:F-1.643-4.3741.0890.427
C:M-A:F-1.503-4.2341.2290.52
C:F-B:F-1.663-4.3941.0690.414
A:M-B:F-0.495-3.2262.2360.991
B:M-B:F-1.325-4.0561.4060.644
C:M-B:F-1.185-3.9161.5460.738
A:M-C:F1.168-1.5643.8990.75
B:M-C:F0.338-2.3943.0690.999
C:M-C:F0.478-2.2543.2090.993
B:M-A:M-0.83-3.5611.9010.923
C:M-A:M-0.69-3.4212.0410.963
C:M-B:M0.14-2.5912.8711

\begin{tabular}{lllllllll}
\hline
Tukey Honest Significant Difference Comparisons \tabularnewline
  & diff & lwr & upr & p adj \tabularnewline
B-A & -0.574 & -2.125 & 0.977 & 0.62 \tabularnewline
C-A & -1.335 & -2.886 & 0.216 & 0.099 \tabularnewline
C-B & -0.761 & -2.312 & 0.79 & 0.439 \tabularnewline
M-F & -0.553 & -1.596 & 0.489 & 0.279 \tabularnewline
B:F-A:F & -0.318 & -3.049 & 2.414 & 0.999 \tabularnewline
C:F-A:F & -1.98 & -4.711 & 0.751 & 0.243 \tabularnewline
A:M-A:F & -0.813 & -3.544 & 1.919 & 0.929 \tabularnewline
B:M-A:F & -1.643 & -4.374 & 1.089 & 0.427 \tabularnewline
C:M-A:F & -1.503 & -4.234 & 1.229 & 0.52 \tabularnewline
C:F-B:F & -1.663 & -4.394 & 1.069 & 0.414 \tabularnewline
A:M-B:F & -0.495 & -3.226 & 2.236 & 0.991 \tabularnewline
B:M-B:F & -1.325 & -4.056 & 1.406 & 0.644 \tabularnewline
C:M-B:F & -1.185 & -3.916 & 1.546 & 0.738 \tabularnewline
A:M-C:F & 1.168 & -1.564 & 3.899 & 0.75 \tabularnewline
B:M-C:F & 0.338 & -2.394 & 3.069 & 0.999 \tabularnewline
C:M-C:F & 0.478 & -2.254 & 3.209 & 0.993 \tabularnewline
B:M-A:M & -0.83 & -3.561 & 1.901 & 0.923 \tabularnewline
C:M-A:M & -0.69 & -3.421 & 2.041 & 0.963 \tabularnewline
C:M-B:M & 0.14 & -2.591 & 2.871 & 1 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=67299&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]B-A[/C][C]-0.574[/C][C]-2.125[/C][C]0.977[/C][C]0.62[/C][/ROW]
[ROW][C]C-A[/C][C]-1.335[/C][C]-2.886[/C][C]0.216[/C][C]0.099[/C][/ROW]
[ROW][C]C-B[/C][C]-0.761[/C][C]-2.312[/C][C]0.79[/C][C]0.439[/C][/ROW]
[ROW][C]M-F[/C][C]-0.553[/C][C]-1.596[/C][C]0.489[/C][C]0.279[/C][/ROW]
[ROW][C]B:F-A:F[/C][C]-0.318[/C][C]-3.049[/C][C]2.414[/C][C]0.999[/C][/ROW]
[ROW][C]C:F-A:F[/C][C]-1.98[/C][C]-4.711[/C][C]0.751[/C][C]0.243[/C][/ROW]
[ROW][C]A:M-A:F[/C][C]-0.813[/C][C]-3.544[/C][C]1.919[/C][C]0.929[/C][/ROW]
[ROW][C]B:M-A:F[/C][C]-1.643[/C][C]-4.374[/C][C]1.089[/C][C]0.427[/C][/ROW]
[ROW][C]C:M-A:F[/C][C]-1.503[/C][C]-4.234[/C][C]1.229[/C][C]0.52[/C][/ROW]
[ROW][C]C:F-B:F[/C][C]-1.663[/C][C]-4.394[/C][C]1.069[/C][C]0.414[/C][/ROW]
[ROW][C]A:M-B:F[/C][C]-0.495[/C][C]-3.226[/C][C]2.236[/C][C]0.991[/C][/ROW]
[ROW][C]B:M-B:F[/C][C]-1.325[/C][C]-4.056[/C][C]1.406[/C][C]0.644[/C][/ROW]
[ROW][C]C:M-B:F[/C][C]-1.185[/C][C]-3.916[/C][C]1.546[/C][C]0.738[/C][/ROW]
[ROW][C]A:M-C:F[/C][C]1.168[/C][C]-1.564[/C][C]3.899[/C][C]0.75[/C][/ROW]
[ROW][C]B:M-C:F[/C][C]0.338[/C][C]-2.394[/C][C]3.069[/C][C]0.999[/C][/ROW]
[ROW][C]C:M-C:F[/C][C]0.478[/C][C]-2.254[/C][C]3.209[/C][C]0.993[/C][/ROW]
[ROW][C]B:M-A:M[/C][C]-0.83[/C][C]-3.561[/C][C]1.901[/C][C]0.923[/C][/ROW]
[ROW][C]C:M-A:M[/C][C]-0.69[/C][C]-3.421[/C][C]2.041[/C][C]0.963[/C][/ROW]
[ROW][C]C:M-B:M[/C][C]0.14[/C][C]-2.591[/C][C]2.871[/C][C]1[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=67299&T=3

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=67299&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
B-A-0.574-2.1250.9770.62
C-A-1.335-2.8860.2160.099
C-B-0.761-2.3120.790.439
M-F-0.553-1.5960.4890.279
B:F-A:F-0.318-3.0492.4140.999
C:F-A:F-1.98-4.7110.7510.243
A:M-A:F-0.813-3.5441.9190.929
B:M-A:F-1.643-4.3741.0890.427
C:M-A:F-1.503-4.2341.2290.52
C:F-B:F-1.663-4.3941.0690.414
A:M-B:F-0.495-3.2262.2360.991
B:M-B:F-1.325-4.0561.4060.644
C:M-B:F-1.185-3.9161.5460.738
A:M-C:F1.168-1.5643.8990.75
B:M-C:F0.338-2.3943.0690.999
C:M-C:F0.478-2.2543.2090.993
B:M-A:M-0.83-3.5611.9010.923
C:M-A:M-0.69-3.4212.0410.963
C:M-B:M0.14-2.5912.8711







Levenes Test for Homogeneity of Variance
DfF valuePr(>F)
Group52.2010.099
18

\begin{tabular}{lllllllll}
\hline
Levenes Test for Homogeneity of Variance \tabularnewline
  & Df & F value & Pr(>F) \tabularnewline
Group & 5 & 2.201 & 0.099 \tabularnewline
  & 18 &   &   \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=67299&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]5[/C][C]2.201[/C][C]0.099[/C][/ROW]
[ROW][C] [/C][C]18[/C][C] [/C][C] [/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=67299&T=4

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=67299&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)
Group52.2010.099
18



Parameters (Session):
Parameters (R input):
par1 = 1 ; par2 = 2 ; par3 = 3 ; 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')
plot.design(xdf, 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){
bitmap(file='TukeyHSDPlot.png')
thsd<-TukeyHSD(aov.xdf)
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')