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 computationFri, 11 Dec 2015 11:09:13 +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/2015/Dec/11/t14498322036ulalf8ce5n1x0g.htm/, Retrieved Thu, 16 May 2024 14:19:34 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=285882, Retrieved Thu, 16 May 2024 14:19:34 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact121
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Two-Way ANOVA] [Two Way Anova: br...] [2015-12-11 11:09:13] [a05da232bd4bc389022edd498fae0565] [Current]
Feedback Forum

Post a new message
Dataseries X:
1530 1 1
1297 1 1
1335 1 1
1282 1 1
1590 1 1
1300 1 1
1400 1 1
1255 1 1
1355 1 1
1375 1 1
1340 1 1
1380 1 1
1355 1 1
1522 1 1
1208 1 1
1405 1 1
1358 1 1
1292 1 1
1340 1 1
1400 1 1
1357 1 1
1287 1 1
1275 1 1
1270 1 1
1635 1 1
1505 1 1
1490 1 1
1485 1 1
1310 1 1
1420 1 1
1318 1 1
1432 1 1
1364 1 1
1405 1 1
1432 1 1
1207 1 1
1375 1 1
1350 1 1
1236 1 1
1250 1 1
1350 1 1
1320 1 1
1525 1 1
1570 1 1
1340 1 1
1422 1 1
1506 1 1
1215 1 1
1311 1 1
1300 1 1
1224 1 1
1350 1 1
1335 1 1
1390 1 1
1400 1 1
1225 1 1
1310 1 1
1560 1 2
1330 1 2
1222 1 2
1415 1 2
1175 1 2
1330 1 2
1485 1 2
1470 1 2
1135 1 2
1310 1 2
1154 1 2
1510 1 2
1415 1 2
1468 1 2
1390 1 2
1380 1 2
1432 1 2
1240 1 2
1195 1 2
1225 1 2
1188 1 2
1252 1 2
1315 1 2
1245 1 2
1430 1 2
1279 1 2
1245 1 2
1309 1 2
1412 1 2
1120 1 2
1220 1 2
1280 1 2
1440 1 2
1370 1 2
1192 1 2
1230 1 2
1346 1 2
1290 1 2
1165 1 2
1240 1 2
1132 1 2
1242 1 2
1270 1 2
1218 1 2
1430 1 2
1588 1 2
1320 1 2
1290 1 2
1260 1 2
1425 1 2
1226 1 2
1360 1 2
1620 1 2
1310 1 2
1250 1 2
1295 1 2
1290 1 2
1290 1 2
1275 1 2
1250 1 2
1270 1 2
1362 1 2
1300 1 2
1173 1 2
1256 1 2
1440 1 2
1180 1 2
1306 1 2
1350 1 2
1125 1 2
1165 1 2
1312 1 2
1300 1 2
1270 1 2
1335 1 2
1450 1 2
1310 1 2
1027 2 1
1235 2 1
1260 2 1
1165 2 1
1080 2 1
1127 2 1
1270 2 1
1252 2 1
1200 2 1
1290 2 1
1334 2 1
1380 2 1
1140 2 1
1243 2 1
1340 2 1
1168 2 1
1322 2 1
1249 2 1
1321 2 1
1192 2 1
1373 2 1
1170 2 1
1265 2 1
1235 2 1
1302 2 1
1241 2 1
1078 2 1
1520 2 1
1460 2 1
1075 2 1
1280 2 1
1180 2 1
1250 2 1
1190 2 1
1374 2 1
1306 2 1
1202 2 1
1240 2 1
1316 2 1
1280 2 1
1350 2 1
1180 2 1
1210 2 1
1127 2 1
1324 2 1
1210 2 1
1290 2 1
1100 2 1
1280 2 1
1175 2 1
1160 2 1
1205 2 1
1163 2 1
1022 2 2
1243 2 2
1350 2 2
1237 2 2
1204 2 2
1090 2 2
1355 2 2
1250 2 2
1076 2 2
1120 2 2
1220 2 2
1240 2 2
1220 2 2
1095 2 2
1235 2 2
1105 2 2
1405 2 2
1150 2 2
1305 2 2
1220 2 2
1296 2 2
1175 2 2
955 2 2
1070 2 2
1320 2 2
1060 2 2
1130 2 2
1250 2 2
1225 2 2
1180 2 2
1178 2 2
1142 2 2
1130 2 2
1185 2 2
1012 2 2
1280 2 2
1103 2 2
1408 2 2
1300 2 2
1246 2 2
1380 2 2
1350 2 2
1060 2 2
1350 2 2
1220 2 2
1110 2 2
1215 2 2
1104 2 2
1170 2 2
1120 2 2




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=285882&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'Herman Ole Andreas Wold' @ wold.wessa.net







ANOVA Model
Response ~ Treatment_A * Treatment_B
means1365.175-125.44-57.98115.565

\begin{tabular}{lllllllll}
\hline
ANOVA Model \tabularnewline
Response ~ Treatment_A * Treatment_B \tabularnewline
means & 1365.175 & -125.44 & -57.981 & 15.565 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=285882&T=1

[TABLE]
[ROW][C]ANOVA Model[/C][/ROW]
[ROW][C]Response ~ Treatment_A * Treatment_B[/C][/ROW]
[ROW][C]means[/C][C]1365.175[/C][C]-125.44[/C][C]-57.981[/C][C]15.565[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=285882&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=285882&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
means1365.175-125.44-57.98115.565







ANOVA Statistics
DfSum SqMean SqF valuePr(>F)
1
Treatment_A1739841.081739841.08168.3660
Treatment_B1152906.741152906.74114.130
Treatment_A:Treatment_B13490.8753490.8750.3230.571
Residuals2332521471.50510821.766

\begin{tabular}{lllllllll}
\hline
ANOVA Statistics \tabularnewline
  & Df & Sum Sq & Mean Sq & F value & Pr(>F) \tabularnewline
 & 1 &  &  &  &  \tabularnewline
Treatment_A & 1 & 739841.081 & 739841.081 & 68.366 & 0 \tabularnewline
Treatment_B & 1 & 152906.741 & 152906.741 & 14.13 & 0 \tabularnewline
Treatment_A:Treatment_B & 1 & 3490.875 & 3490.875 & 0.323 & 0.571 \tabularnewline
Residuals & 233 & 2521471.505 & 10821.766 &   &   \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=285882&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]739841.081[/C][C]739841.081[/C][C]68.366[/C][C]0[/C][/ROW]
[ROW][C]Treatment_B[/C][C]1[/C][C]152906.741[/C][C]152906.741[/C][C]14.13[/C][C]0[/C][/ROW]
[ROW][C]Treatment_A:Treatment_B[/C][C]1[/C][C]3490.875[/C][C]3490.875[/C][C]0.323[/C][C]0.571[/C][/ROW]
[ROW][C]Residuals[/C][C]233[/C][C]2521471.505[/C][C]10821.766[/C][C] [/C][C] [/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=285882&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=285882&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_A1739841.081739841.08168.3660
Treatment_B1152906.741152906.74114.130
Treatment_A:Treatment_B13490.8753490.8750.3230.571
Residuals2332521471.50510821.766







Tukey Honest Significant Difference Comparisons
difflwruprp adj
2-1-112.713-139.57-85.8550
2-1-50.731-77.427-24.0360
2:1-1:1-125.44-176.806-74.0730
1:2-1:1-57.981-105.016-10.9450.009
2:2-1:1-167.855-220.014-115.6970
1:2-2:167.45919.414115.5040.002
2:2-2:1-42.416-95.48610.6550.167
2:2-1:2-109.875-158.766-60.9840

\begin{tabular}{lllllllll}
\hline
Tukey Honest Significant Difference Comparisons \tabularnewline
  & diff & lwr & upr & p adj \tabularnewline
2-1 & -112.713 & -139.57 & -85.855 & 0 \tabularnewline
2-1 & -50.731 & -77.427 & -24.036 & 0 \tabularnewline
2:1-1:1 & -125.44 & -176.806 & -74.073 & 0 \tabularnewline
1:2-1:1 & -57.981 & -105.016 & -10.945 & 0.009 \tabularnewline
2:2-1:1 & -167.855 & -220.014 & -115.697 & 0 \tabularnewline
1:2-2:1 & 67.459 & 19.414 & 115.504 & 0.002 \tabularnewline
2:2-2:1 & -42.416 & -95.486 & 10.655 & 0.167 \tabularnewline
2:2-1:2 & -109.875 & -158.766 & -60.984 & 0 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=285882&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]2-1[/C][C]-112.713[/C][C]-139.57[/C][C]-85.855[/C][C]0[/C][/ROW]
[ROW][C]2-1[/C][C]-50.731[/C][C]-77.427[/C][C]-24.036[/C][C]0[/C][/ROW]
[ROW][C]2:1-1:1[/C][C]-125.44[/C][C]-176.806[/C][C]-74.073[/C][C]0[/C][/ROW]
[ROW][C]1:2-1:1[/C][C]-57.981[/C][C]-105.016[/C][C]-10.945[/C][C]0.009[/C][/ROW]
[ROW][C]2:2-1:1[/C][C]-167.855[/C][C]-220.014[/C][C]-115.697[/C][C]0[/C][/ROW]
[ROW][C]1:2-2:1[/C][C]67.459[/C][C]19.414[/C][C]115.504[/C][C]0.002[/C][/ROW]
[ROW][C]2:2-2:1[/C][C]-42.416[/C][C]-95.486[/C][C]10.655[/C][C]0.167[/C][/ROW]
[ROW][C]2:2-1:2[/C][C]-109.875[/C][C]-158.766[/C][C]-60.984[/C][C]0[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=285882&T=3

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=285882&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
2-1-112.713-139.57-85.8550
2-1-50.731-77.427-24.0360
2:1-1:1-125.44-176.806-74.0730
1:2-1:1-57.981-105.016-10.9450.009
2:2-1:1-167.855-220.014-115.6970
1:2-2:167.45919.414115.5040.002
2:2-2:1-42.416-95.48610.6550.167
2:2-1:2-109.875-158.766-60.9840







Levenes Test for Homogeneity of Variance
DfF valuePr(>F)
Group30.4910.689
233

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

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



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')