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 computationWed, 29 May 2013 15:55:28 -0400
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2013/May/29/t1369857449fvz5tzqxdkbf081.htm/, Retrieved Thu, 02 May 2024 23:48:38 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=210752, Retrieved Thu, 02 May 2024 23:48:38 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact200
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Two-Way ANOVA] [] [2010-11-02 14:42:14] [b98453cac15ba1066b407e146608df68]
- R PD  [Two-Way ANOVA] [Paper 17] [2012-12-10 20:26:29] [cb178d3ebce11557293640a297e0ede2]
- R  D      [Two-Way ANOVA] [Econometrie] [2013-05-29 19:55:28] [0eae5e694d1d975eb250a0af7a7338a6] [Current]
Feedback Forum

Post a new message
Dataseries X:
1	56	'J'
0	56	'GJ'
1	33	'J'
0	47	'GJ'
0	46	'J'
1	31	'J'
0	37	'J'
0	47	'GJ'
0	45	'J'
1	46	'J'
0	31	'J'
1	63	'J'
1	57	'GJ'
0	29	'GJ'
1	35	'GJ'
0	51	'J'
0	31	'J'
0	27	'GJ'
1	58	'GJ'
1	48	'J'
1	51	'GJ'
0	37	'J'
0	55	'J'
0	48	'J'
0	39	'J'
0	49	'J'
1	49	'GJ'
1	65	'GJ'
0	50	'J'
1	52	'J'
0	48	'GJ'
1	53	'GJ'
1	57	'GJ'
1	41	'J'
1	56	'J'
0	43	'J'
1	47	'J'
0	29	'GJ'
1	48	'J'
0	47	'J'
1	56	'J'
0	66	'J'
0	49	'GJ'
1	34	'J'
1	43	'GJ'
0	57	'GJ'
0	50	'J'
0	47	'GJ'
1	58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	'GJ'
0	39	'GJ'
0	45	'J'
1	53	'GJ'
0	59	'J'
1	57	'GJ'
1	57	'J'
0	52	'J'
0	47	'J'
0	57	'J'
1	32	'J'
1	33	'J'
0	62	'J'
0	43	'GJ'
0	41	'J'
0	59	'J'
1	43	'GJ'
0	58	'J'
1	43	'J'
0	50	'J'
1	48	'GJ'
0	65	'GJ'
1	47	'J'
1	51	'GJ'
0	61	'J'
0	50	'J'
0	58	'J'
0	44	'J'
0	53	'GJ'
1	59	'GJ'
0	52	'GJ'
1	46	'GJ'
0	46	'GJ'
0	39	'GJ'
0	53	'J'
0	50	'J'
0	38	'J'
1	46	'GJ'
1	45	'J'
0	42	'J'
0	46	'GJ'
0	33	'J'
1	62	'GJ'
0	24	'J'
0	48	'GJ'
0	51	'GJ'
1	47	'GJ'
1	64	'GJ'
1	39	'J'
0	61	'GJ'
1	34	'J'
0	39	'J'
0	53	'GJ'
1	48	'GJ'
0	58	'J'
1	49	'J'
0	55	'J'
0	55	'J'
1	54	'J'
1	40	'GJ'
0	38	'GJ'
1	38	'GJ'
1	47	'GJ'
0	35	'J'
0	37	'GJ'
0	47	'J'
0	54	'J'
0	64	'GJ'
1	57	'J'
1	42	'GJ'
0	55	'GJ'
0	31	'GJ'
0	43	'J'
0	55	'GJ'
0	47	'GJ'
0	48	'J'
0	20	'J'
0	46	'J'
1	49	'J'
0	49	'J'
0	45	'GJ'
0	45	'J'
0	45	'J'




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time7 seconds
R Server'Gertrude Mary Cox' @ cox.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 & 7 seconds \tabularnewline
R Server & 'Gertrude Mary Cox' @ cox.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=210752&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]7 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Gertrude Mary Cox' @ cox.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=210752&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=210752&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 time7 seconds
R Server'Gertrude Mary Cox' @ cox.wessa.net







ANOVA Model
Response ~ Treatment_A * Treatment_B
means48.4742.294-1.327-2.632

\begin{tabular}{lllllllll}
\hline
ANOVA Model \tabularnewline
Response ~ Treatment_A * Treatment_B \tabularnewline
means & 48.474 & 2.294 & -1.327 & -2.632 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=210752&T=1

[TABLE]
[ROW][C]ANOVA Model[/C][/ROW]
[ROW][C]Response ~ Treatment_A * Treatment_B[/C][/ROW]
[ROW][C]means[/C][C]48.474[/C][C]2.294[/C][C]-1.327[/C][C]-2.632[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=210752&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=210752&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
means48.4742.294-1.327-2.632







ANOVA Statistics
DfSum SqMean SqF valuePr(>F)
1
Treatment_A1114.693114.6931.30.255
Treatment_B1793.113793.1138.990.003
Treatment_A:Treatment_B1203.815203.8152.310.129
Residuals46841286.8888.22

\begin{tabular}{lllllllll}
\hline
ANOVA Statistics \tabularnewline
  & Df & Sum Sq & Mean Sq & F value & Pr(>F) \tabularnewline
 & 1 &  &  &  &  \tabularnewline
Treatment_A & 1 & 114.693 & 114.693 & 1.3 & 0.255 \tabularnewline
Treatment_B & 1 & 793.113 & 793.113 & 8.99 & 0.003 \tabularnewline
Treatment_A:Treatment_B & 1 & 203.815 & 203.815 & 2.31 & 0.129 \tabularnewline
Residuals & 468 & 41286.88 & 88.22 &   &   \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=210752&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]114.693[/C][C]114.693[/C][C]1.3[/C][C]0.255[/C][/ROW]
[ROW][C]Treatment_B[/C][C]1[/C][C]793.113[/C][C]793.113[/C][C]8.99[/C][C]0.003[/C][/ROW]
[ROW][C]Treatment_A:Treatment_B[/C][C]1[/C][C]203.815[/C][C]203.815[/C][C]2.31[/C][C]0.129[/C][/ROW]
[ROW][C]Residuals[/C][C]468[/C][C]41286.88[/C][C]88.22[/C][C] [/C][C] [/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=210752&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=210752&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_A1114.693114.6931.30.255
Treatment_B1793.113793.1138.990.003
Treatment_A:Treatment_B1203.815203.8152.310.129
Residuals46841286.8888.22







Tukey Honest Significant Difference Comparisons
difflwruprp adj
1-00.987-0.7142.6870.255
J-GJ-2.594-4.294-0.8930.003
1:GJ-0:GJ2.294-0.9145.5020.254
0:J-0:GJ-1.327-4.4261.7720.687
1:J-0:GJ-1.665-4.8521.5210.533
0:J-1:GJ-3.621-6.748-0.4930.016
1:J-1:GJ-3.959-7.174-0.7440.009
1:J-0:J-0.339-3.4442.7670.992

\begin{tabular}{lllllllll}
\hline
Tukey Honest Significant Difference Comparisons \tabularnewline
  & diff & lwr & upr & p adj \tabularnewline
1-0 & 0.987 & -0.714 & 2.687 & 0.255 \tabularnewline
J-GJ & -2.594 & -4.294 & -0.893 & 0.003 \tabularnewline
1:GJ-0:GJ & 2.294 & -0.914 & 5.502 & 0.254 \tabularnewline
0:J-0:GJ & -1.327 & -4.426 & 1.772 & 0.687 \tabularnewline
1:J-0:GJ & -1.665 & -4.852 & 1.521 & 0.533 \tabularnewline
0:J-1:GJ & -3.621 & -6.748 & -0.493 & 0.016 \tabularnewline
1:J-1:GJ & -3.959 & -7.174 & -0.744 & 0.009 \tabularnewline
1:J-0:J & -0.339 & -3.444 & 2.767 & 0.992 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=210752&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]0.987[/C][C]-0.714[/C][C]2.687[/C][C]0.255[/C][/ROW]
[ROW][C]J-GJ[/C][C]-2.594[/C][C]-4.294[/C][C]-0.893[/C][C]0.003[/C][/ROW]
[ROW][C]1:GJ-0:GJ[/C][C]2.294[/C][C]-0.914[/C][C]5.502[/C][C]0.254[/C][/ROW]
[ROW][C]0:J-0:GJ[/C][C]-1.327[/C][C]-4.426[/C][C]1.772[/C][C]0.687[/C][/ROW]
[ROW][C]1:J-0:GJ[/C][C]-1.665[/C][C]-4.852[/C][C]1.521[/C][C]0.533[/C][/ROW]
[ROW][C]0:J-1:GJ[/C][C]-3.621[/C][C]-6.748[/C][C]-0.493[/C][C]0.016[/C][/ROW]
[ROW][C]1:J-1:GJ[/C][C]-3.959[/C][C]-7.174[/C][C]-0.744[/C][C]0.009[/C][/ROW]
[ROW][C]1:J-0:J[/C][C]-0.339[/C][C]-3.444[/C][C]2.767[/C][C]0.992[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=210752&T=3

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=210752&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-00.987-0.7142.6870.255
J-GJ-2.594-4.294-0.8930.003
1:GJ-0:GJ2.294-0.9145.5020.254
0:J-0:GJ-1.327-4.4261.7720.687
1:J-0:GJ-1.665-4.8521.5210.533
0:J-1:GJ-3.621-6.748-0.4930.016
1:J-1:GJ-3.959-7.174-0.7440.009
1:J-0:J-0.339-3.4442.7670.992







Levenes Test for Homogeneity of Variance
DfF valuePr(>F)
Group30.570.635
468

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

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



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