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, 14 Dec 2017 14:09:17 +0100
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2017/Dec/14/t1513257016tg4k034bxwp7sj6.htm/, Retrieved Tue, 14 May 2024 07:56:53 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=309497, Retrieved Tue, 14 May 2024 07:56:53 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact82
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Two-Way ANOVA] [Two-way ANOVA] [2017-12-14 13:09:17] [28da80bef000008dbbf38143ad125f81] [Current]
Feedback Forum

Post a new message
Dataseries X:
6	'No'	'S3'
8	'No'	'S3'
5	'No'	'S3'
0	'No'	'S3'
10	'No'	'S1'
14	'Yes'	'S2'
8	'No'	'S3'
6	'No'	'S1'
5	'No'	'S3'
12	'Yes'	'S2'
1	'No'	'S1'
9	'Yes'	'S2'
7	'No'	'S3'
13	'Yes'	'S2'
3	'No'	'S1'
2	'Yes'	'S1'
12	'Yes'	'S2'
13	'Yes'	'S2'
7	'No'	'S3'
3	'No'	'S3'
10	'No'	'S3'
5	'Yes'	'S3'
13	'Yes'	'S2'
11	'Yes'	'S1'
7	'Yes'	'S2'
10	'No'	'S3'
12	'No'	'S3'
12	'Yes'	'S2'
15	'Yes'	'S1'
9	'No'	'S2'
5	'No'	'S3'
3	'No'	'S3'
4	'No'	'S3'
11	'Yes'	'S2'
10	'Yes'	'S1'
11	'Yes'	'S1'
6	'No'	'S3'
9	'No'	'S3'
3	'Yes'	'S2'
6	'No'	'S2'
12	'Yes'	'S2'
3	'Yes'	'S2'
11	'No'	'S3'
11	'No'	'S3'
13	'No'	'S3'
6	'No'	'S1'
9	'Yes'	'S2'
7	'No'	'S3'
2	'No'	'S3'
10	'No'	'S3'
14	'Yes'	'S3'
3	'No'	'S3'
0	'No'	'S3'
0	'No'	'S3'
6	'No'	'S3'
12	'No'	'S2'
8	'No'	'S3'
6	'No'	'S3'
2	'Yes'	'S1'
3	'Yes'	'S1'
0	'No'	'S1'
0	'No'	'S1'
0	'No'	'S1'
15	'Yes'	'S2'
3	'No'	'S1'
5	'Yes'	'S2'
3	'No'	'S3'
14	'No'	'S3'
3	'No'	'S3'
3	'Yes'	'S3'
12	'Yes'	'S2'
3	'Yes'	'S1'
3	'No'	'S1'
8	'No'	'S1'




Summary of computational transaction
Raw Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R ServerBig Analytics Cloud Computing Center

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input view raw input (R code)  \tabularnewline
Raw Outputview raw output of R engine  \tabularnewline
Computing time4 seconds \tabularnewline
R ServerBig Analytics Cloud Computing Center \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=309497&T=0

[TABLE]
[ROW]
Summary of computational transaction[/C][/ROW] [ROW]Raw Input[/C] view raw input (R code) [/C][/ROW] [ROW]Raw Output[/C]view raw output of R engine [/C][/ROW] [ROW]Computing time[/C]4 seconds[/C][/ROW] [ROW]R Server[/C]Big Analytics Cloud Computing Center[/C][/ROW] [/TABLE] Source: https://freestatistics.org/blog/index.php?pk=309497&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=309497&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 Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R ServerBig Analytics Cloud Computing Center







ANOVA Model
Response ~ Treatment_A * Treatment_B
means3.6363.4895.3642.77-2.195-2.562

\begin{tabular}{lllllllll}
\hline
ANOVA Model \tabularnewline
Response ~ Treatment_A * Treatment_B \tabularnewline
means & 3.636 & 3.489 & 5.364 & 2.77 & -2.195 & -2.562 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=309497&T=1

[TABLE]
[ROW][C]ANOVA Model[/C][/ROW]
[ROW][C]Response ~ Treatment_A * Treatment_B[/C][/ROW]
[ROW][C]means[/C][C]3.636[/C][C]3.489[/C][C]5.364[/C][C]2.77[/C][C]-2.195[/C][C]-2.562[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=309497&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=309497&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
means3.6363.4895.3642.77-2.195-2.562







ANOVA Statistics
DfSum SqMean SqF valuePr(>F)
1
Treatment_A1173.626173.62611.1870.001
Treatment_B1143.94971.9744.6380.013
Treatment_A:Treatment_B114.2257.1130.4580.634
Residuals681055.33515.52

\begin{tabular}{lllllllll}
\hline
ANOVA Statistics \tabularnewline
  & Df & Sum Sq & Mean Sq & F value & Pr(>F) \tabularnewline
 & 1 &  &  &  &  \tabularnewline
Treatment_A & 1 & 173.626 & 173.626 & 11.187 & 0.001 \tabularnewline
Treatment_B & 1 & 143.949 & 71.974 & 4.638 & 0.013 \tabularnewline
Treatment_A:Treatment_B & 1 & 14.225 & 7.113 & 0.458 & 0.634 \tabularnewline
Residuals & 68 & 1055.335 & 15.52 &   &   \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=309497&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]173.626[/C][C]173.626[/C][C]11.187[/C][C]0.001[/C][/ROW]
[ROW][C]Treatment_B[/C][C]1[/C][C]143.949[/C][C]71.974[/C][C]4.638[/C][C]0.013[/C][/ROW]
[ROW][C]Treatment_A:Treatment_B[/C][C]1[/C][C]14.225[/C][C]7.113[/C][C]0.458[/C][C]0.634[/C][/ROW]
[ROW][C]Residuals[/C][C]68[/C][C]1055.335[/C][C]15.52[/C][C] [/C][C] [/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=309497&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=309497&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_A1173.626173.62611.1870.001
Treatment_B1143.94971.9744.6380.013
Treatment_A:Treatment_B114.2257.1130.4580.634
Residuals681055.33515.52







Tukey Honest Significant Difference Comparisons
difflwruprp adj
Yes-No3.1581.2745.0430.001
S2-S13.640.6166.6640.014
S3-S12.44-0.255.1290.083
S3-S2-1.2-3.8461.4460.525
Yes:S1-No:S13.489-1.8798.8570.408
No:S2-No:S15.364-2.16112.8880.305
Yes:S2-No:S16.6582.18711.1280.001
No:S3-No:S12.77-1.2686.8080.347
Yes:S3-No:S13.697-3.82811.2220.702
No:S2-Yes:S11.875-5.9469.6960.981
Yes:S2-Yes:S13.169-1.7848.1220.425
No:S3-Yes:S1-0.719-5.2853.8480.997
Yes:S3-Yes:S10.208-7.6138.031
Yes:S2-No:S21.294-5.948.5290.995
No:S3-No:S2-2.594-9.5694.3820.884
Yes:S3-No:S2-1.667-11.0997.7660.995
No:S3-Yes:S2-3.888-7.355-0.4210.019
Yes:S3-Yes:S2-2.961-10.1954.2740.835
Yes:S3-No:S30.927-6.0497.9030.999

\begin{tabular}{lllllllll}
\hline
Tukey Honest Significant Difference Comparisons \tabularnewline
  & diff & lwr & upr & p adj \tabularnewline
Yes-No & 3.158 & 1.274 & 5.043 & 0.001 \tabularnewline
S2-S1 & 3.64 & 0.616 & 6.664 & 0.014 \tabularnewline
S3-S1 & 2.44 & -0.25 & 5.129 & 0.083 \tabularnewline
S3-S2 & -1.2 & -3.846 & 1.446 & 0.525 \tabularnewline
Yes:S1-No:S1 & 3.489 & -1.879 & 8.857 & 0.408 \tabularnewline
No:S2-No:S1 & 5.364 & -2.161 & 12.888 & 0.305 \tabularnewline
Yes:S2-No:S1 & 6.658 & 2.187 & 11.128 & 0.001 \tabularnewline
No:S3-No:S1 & 2.77 & -1.268 & 6.808 & 0.347 \tabularnewline
Yes:S3-No:S1 & 3.697 & -3.828 & 11.222 & 0.702 \tabularnewline
No:S2-Yes:S1 & 1.875 & -5.946 & 9.696 & 0.981 \tabularnewline
Yes:S2-Yes:S1 & 3.169 & -1.784 & 8.122 & 0.425 \tabularnewline
No:S3-Yes:S1 & -0.719 & -5.285 & 3.848 & 0.997 \tabularnewline
Yes:S3-Yes:S1 & 0.208 & -7.613 & 8.03 & 1 \tabularnewline
Yes:S2-No:S2 & 1.294 & -5.94 & 8.529 & 0.995 \tabularnewline
No:S3-No:S2 & -2.594 & -9.569 & 4.382 & 0.884 \tabularnewline
Yes:S3-No:S2 & -1.667 & -11.099 & 7.766 & 0.995 \tabularnewline
No:S3-Yes:S2 & -3.888 & -7.355 & -0.421 & 0.019 \tabularnewline
Yes:S3-Yes:S2 & -2.961 & -10.195 & 4.274 & 0.835 \tabularnewline
Yes:S3-No:S3 & 0.927 & -6.049 & 7.903 & 0.999 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=309497&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]Yes-No[/C][C]3.158[/C][C]1.274[/C][C]5.043[/C][C]0.001[/C][/ROW]
[ROW][C]S2-S1[/C][C]3.64[/C][C]0.616[/C][C]6.664[/C][C]0.014[/C][/ROW]
[ROW][C]S3-S1[/C][C]2.44[/C][C]-0.25[/C][C]5.129[/C][C]0.083[/C][/ROW]
[ROW][C]S3-S2[/C][C]-1.2[/C][C]-3.846[/C][C]1.446[/C][C]0.525[/C][/ROW]
[ROW][C]Yes:S1-No:S1[/C][C]3.489[/C][C]-1.879[/C][C]8.857[/C][C]0.408[/C][/ROW]
[ROW][C]No:S2-No:S1[/C][C]5.364[/C][C]-2.161[/C][C]12.888[/C][C]0.305[/C][/ROW]
[ROW][C]Yes:S2-No:S1[/C][C]6.658[/C][C]2.187[/C][C]11.128[/C][C]0.001[/C][/ROW]
[ROW][C]No:S3-No:S1[/C][C]2.77[/C][C]-1.268[/C][C]6.808[/C][C]0.347[/C][/ROW]
[ROW][C]Yes:S3-No:S1[/C][C]3.697[/C][C]-3.828[/C][C]11.222[/C][C]0.702[/C][/ROW]
[ROW][C]No:S2-Yes:S1[/C][C]1.875[/C][C]-5.946[/C][C]9.696[/C][C]0.981[/C][/ROW]
[ROW][C]Yes:S2-Yes:S1[/C][C]3.169[/C][C]-1.784[/C][C]8.122[/C][C]0.425[/C][/ROW]
[ROW][C]No:S3-Yes:S1[/C][C]-0.719[/C][C]-5.285[/C][C]3.848[/C][C]0.997[/C][/ROW]
[ROW][C]Yes:S3-Yes:S1[/C][C]0.208[/C][C]-7.613[/C][C]8.03[/C][C]1[/C][/ROW]
[ROW][C]Yes:S2-No:S2[/C][C]1.294[/C][C]-5.94[/C][C]8.529[/C][C]0.995[/C][/ROW]
[ROW][C]No:S3-No:S2[/C][C]-2.594[/C][C]-9.569[/C][C]4.382[/C][C]0.884[/C][/ROW]
[ROW][C]Yes:S3-No:S2[/C][C]-1.667[/C][C]-11.099[/C][C]7.766[/C][C]0.995[/C][/ROW]
[ROW][C]No:S3-Yes:S2[/C][C]-3.888[/C][C]-7.355[/C][C]-0.421[/C][C]0.019[/C][/ROW]
[ROW][C]Yes:S3-Yes:S2[/C][C]-2.961[/C][C]-10.195[/C][C]4.274[/C][C]0.835[/C][/ROW]
[ROW][C]Yes:S3-No:S3[/C][C]0.927[/C][C]-6.049[/C][C]7.903[/C][C]0.999[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=309497&T=3

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=309497&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
Yes-No3.1581.2745.0430.001
S2-S13.640.6166.6640.014
S3-S12.44-0.255.1290.083
S3-S2-1.2-3.8461.4460.525
Yes:S1-No:S13.489-1.8798.8570.408
No:S2-No:S15.364-2.16112.8880.305
Yes:S2-No:S16.6582.18711.1280.001
No:S3-No:S12.77-1.2686.8080.347
Yes:S3-No:S13.697-3.82811.2220.702
No:S2-Yes:S11.875-5.9469.6960.981
Yes:S2-Yes:S13.169-1.7848.1220.425
No:S3-Yes:S1-0.719-5.2853.8480.997
Yes:S3-Yes:S10.208-7.6138.031
Yes:S2-No:S21.294-5.948.5290.995
No:S3-No:S2-2.594-9.5694.3820.884
Yes:S3-No:S2-1.667-11.0997.7660.995
No:S3-Yes:S2-3.888-7.355-0.4210.019
Yes:S3-Yes:S2-2.961-10.1954.2740.835
Yes:S3-No:S30.927-6.0497.9030.999







Levenes Test for Homogeneity of Variance
DfF valuePr(>F)
Group50.9350.464
68

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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=309497&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)
Group50.9350.464
68



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