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 computationSun, 23 Dec 2018 16:23:51 +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/2018/Dec/23/t1545579515ry9xmtmz6ywh1dz.htm/, Retrieved Fri, 17 May 2024 10:10:36 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=316230, Retrieved Fri, 17 May 2024 10:10:36 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact92
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Two-Way ANOVA] [Pb 2 : Ov 4] [2018-12-23 15:23:51] [96a3b24b75e7284ce894536897ad7134] [Current]
Feedback Forum

Post a new message
Dataseries X:
33 "'Vrouw'" "'Ja'"
14 "'Man'" "'Ja'"
33 "'Man'" "'Ja'"
53 "'Man'" "'Ja'"
32 "'Man'" "'Nee'"
17 "'Man'" "'Nee'"
39 "'Vrouw'" "'Nee'"
53 "'Man'" "'Nee'"
12 "'Man'" "'Ja'"
10 "'Vrouw'" "'Nee'"
34 "'Man'" "'Ja'"
51 "'Vrouw'" "'Nee'"
22 "'Vrouw'" "'Nee'"
24 "'Man'" "'Ja'"
7 "'Man'" "'Nee'"
22 "'Vrouw'" "'Ja'"
7 "'Vrouw'" "'Ja'"
16 "'Vrouw'" "'Ja'"
47 "'Vrouw'" "'Nee'"
7 "'Vrouw'" "'Nee'"
31 "'Vrouw'" "'Nee'"
26 "'Vrouw'" "'Ja'"
8 "'Vrouw'" "'Nee'"
10 "'Vrouw'" "'Ja'"
30 "'Vrouw'" "'Nee'"
45 "'Vrouw'" "'Ja'"
11 "'Vrouw'" "'Nee'"
24 "'Vrouw'" "'Ja'"
30 "'Man'" "'Nee'"
31 "'Vrouw'" "'Nee'"
23 "'Vrouw'" "'Nee'"
37 "'Vrouw'" "'Ja'"
31 "'Man'" "'Ja'"
23 "'Man'" "'Nee'"
17 "'Vrouw'" "'Ja'"
47 "'Vrouw'" "'Ja'"
39 "'Vrouw'" "'Nee'"
9 "'Man'" "'Nee'"
48 "'Man'" "'Ja'"
28 "'Vrouw'" "'Nee'"
12 "'Man'" "'Ja'"
31 "'Vrouw'" "'Nee'"
30 "'Vrouw'" "'Nee'"
44 "'Man'" "'Ja'"
25 "'Man'" "'Ja'"
34 "'Vrouw'" "'Ja'"
34 "'Vrouw'" "'Nee'"
34 "'Vrouw'" "'Nee'"
30 "'Man'" "'Ja'"
30 "'Vrouw'" "'Nee'"
19 "'Vrouw'" "'Ja'"
46 "'Man'" "'Nee'"
48 "'Vrouw'" "'Ja'"
24 "'Vrouw'" "'Nee'"
39 "'Man'" "'Ja'"
22 "'Man'" "'Ja'"
28 "'Vrouw'" "'Ja'"
21 "'Man'" "'Ja'"
18 "'Man'" "'Ja'"
36 "'Man'" "'Ja'"
29 "'Vrouw'" "'Ja'"
24 "'Vrouw'" "'Ja'"
31 "'Man'" "'Nee'"
28 "'Vrouw'" "'Ja'"
37 "'Vrouw'" "'Nee'"
33 "'Man'" "'Ja'"
31 "'Man'" "'Nee'"
49 "'Vrouw'" "'Nee'"
42 "'Vrouw'" "'Nee'"
29 "'Man'" "'Nee'"
31 "'Man'" "'Ja'"
33 "'Vrouw'" "'Nee'"
32 "'Man'" "'Ja'"
25 "'Man'" "'Ja'"
16 "'Vrouw'" "'Nee'"
35 "'Man'" "'Ja'"
44 "'Vrouw'" "'Nee'"
30 "'Man'" "'Ja'"
52 "'Vrouw'" "'Ja'"
35 "'Vrouw'" "'Nee'"
11 "'Man'" "'Ja'"
36 "'Vrouw'" "'Nee'"
32 "'Vrouw'" "'Ja'"
42 "'Vrouw'" "'Nee'"
11 "'Vrouw'" "'Nee'"
47 "'Vrouw'" "'Nee'"
32 "'Vrouw'" "'Ja'"
30 "'Vrouw'" "'Nee'"
51 "'Vrouw'" "'Nee'"
10 "'Vrouw'" "'Ja'"
22 "'Man'" "'Nee'"
32 "'Vrouw'" "'Nee'"
52 "'Man'" "'Ja'"
52 "'Vrouw'" "'Ja'"
11 "'Vrouw'" "'Ja'"
27 "'Man'" "'Ja'"
42 "'Vrouw'" "'Nee'"
30 "'Man'" "'Nee'"
6 "'Man'" "'Ja'"
1 "'Man'" "'Nee'"
26 "'Vrouw'" "'Nee'"
32 "'Vrouw'" "'Nee'"
36 "'Man'" "'Ja'"
26 "'Man'" "'Ja'"
49 "'Vrouw'" "'Ja'"
39 "'Man'" "'Ja'"
14 "'Man'" "'Ja'"
35 "'Vrouw'" "'Nee'"
2 "'Vrouw'" "'Nee'"
21 "'Man'" "'Nee'"
32 "'Vrouw'" "'Nee'"
14 "'Vrouw'" "'Ja'"
33 "'Man'" "'Nee'"
16 "'Vrouw'" "'Ja'"
15 "'Man'" "'Nee'"
30 "'Man'" "'Nee'"
2 "'Man'" "'Nee'"
24 "'Man'" "'Ja'"
27 "'Vrouw'" "'Nee'"
38 "'Vrouw'" "'Nee'"
14 "'Man'" "'Nee'"
38 "'Man'" "'Ja'"
26 "'Man'" "'Nee'"
8 "'Vrouw'" "'Ja'"
21 "'Man'" "'Ja'"
22 "'Vrouw'" "'Nee'"
19 "'Man'" "'Ja'"
40 "'Man'" "'Ja'"
22 "'Vrouw'" "'Ja'"
25 "'Man'" "'Ja'"
47 "'Man'" "'Nee'"
46 "'Man'" "'Nee'"
25 "'Vrouw'" "'Nee'"
26 "'Vrouw'" "'Ja'"
56 "'Vrouw'" "'Ja'"
58 "'Vrouw'" "'Ja'"
11 "'Man'" "'Ja'"
8 "'Vrouw'" "'Ja'"
36 "'Vrouw'" "'Nee'"
28 "'Man'" "'Ja'"




Summary of computational transaction
Raw Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time5 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 time5 seconds \tabularnewline
R ServerBig Analytics Cloud Computing Center \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=316230&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]5 seconds[/C][/ROW] [ROW]R Server[/C]Big Analytics Cloud Computing Center[/C][/ROW] [/TABLE] Source: https://freestatistics.org/blog/index.php?pk=316230&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=316230&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 time5 seconds
R ServerBig Analytics Cloud Computing Center







ANOVA Model
Response ~ Treatment_A * Treatment_B - 1
means28.17928.485-2.314.536

\begin{tabular}{lllllllll}
\hline
ANOVA Model \tabularnewline
Response ~ Treatment_A * Treatment_B - 1 \tabularnewline
means & 28.179 & 28.485 & -2.31 & 4.536 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=316230&T=1

[TABLE]
[ROW][C]ANOVA Model[/C][/ROW]
[ROW][C]Response ~ Treatment_A * Treatment_B - 1[/C][/ROW]
[ROW][C]means[/C][C]28.179[/C][C]28.485[/C][C]-2.31[/C][C]4.536[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=316230&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=316230&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 - 1
means28.17928.485-2.314.536







ANOVA Statistics
DfSum SqMean SqF valuePr(>F)
2
Treatment_A2115408.60557704.303339.2630
Treatment_B22.3992.3990.0140.906
Treatment_A:Treatment_B2169.157169.1570.9950.32
Residuals13623131.839170.087

\begin{tabular}{lllllllll}
\hline
ANOVA Statistics \tabularnewline
  & Df & Sum Sq & Mean Sq & F value & Pr(>F) \tabularnewline
 & 2 &  &  &  &  \tabularnewline
Treatment_A & 2 & 115408.605 & 57704.303 & 339.263 & 0 \tabularnewline
Treatment_B & 2 & 2.399 & 2.399 & 0.014 & 0.906 \tabularnewline
Treatment_A:Treatment_B & 2 & 169.157 & 169.157 & 0.995 & 0.32 \tabularnewline
Residuals & 136 & 23131.839 & 170.087 &   &   \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=316230&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]115408.605[/C][C]57704.303[/C][C]339.263[/C][C]0[/C][/ROW]
[ROW][C]Treatment_B[/C][C]2[/C][C]2.399[/C][C]2.399[/C][C]0.014[/C][C]0.906[/C][/ROW]
[ROW][C]Treatment_A:Treatment_B[/C][C]2[/C][C]169.157[/C][C]169.157[/C][C]0.995[/C][C]0.32[/C][/ROW]
[ROW][C]Residuals[/C][C]136[/C][C]23131.839[/C][C]170.087[/C][C] [/C][C] [/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=316230&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=316230&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_A2115408.60557704.303339.2630
Treatment_B22.3992.3990.0140.906
Treatment_A:Treatment_B2169.157169.1570.9950.32
Residuals13623131.839170.087







Must Include Intercept to use Tukey Test

\begin{tabular}{lllllllll}
\hline
Must Include Intercept to use Tukey Test  \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=316230&T=3

[TABLE]
[ROW][C]Must Include Intercept to use Tukey Test [/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=316230&T=3

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

As an alternative you can also use a QR Code:  

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

Must Include Intercept to use Tukey Test







Levenes Test for Homogeneity of Variance
DfF valuePr(>F)
Group31.3910.248
136

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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=316230&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)
Group31.3910.248
136



Parameters (Session):
par1 = 1 ; par2 = 2 ; par3 = 3 ; par4 = FALSE ;
Parameters (R input):
par1 = 1 ; par2 = 2 ; par3 = 3 ; par4 = FALSE ;
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')