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 computationTue, 01 Dec 2015 10:44:52 +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/01/t1448966827zz43senepd7cjl7.htm/, Retrieved Thu, 16 May 2024 03:42:03 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=284671, Retrieved Thu, 16 May 2024 03:42:03 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact97
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Two-Way ANOVA] [Two way ANOVA He...] [2015-12-01 10:44:52] [8927ade6306dd0cf6cf6e656b6611c8a] [Current]
Feedback Forum

Post a new message
Dataseries X:
1 4512 1
1 3738 1
1 4261 1
1 3777 1
1 4177 1
1 3585 1
1 3785 1
1 3559 1
1 3613 1
1 3982 1
1 3443 1
1 3993 1
1 3640 1
1 4208 1
1 3832 1
1 3876 1
1 3497 1
1 3466 1
1 3095 1
1 4424 1
1 3878 1
1 4046 1
1 3804 1
1 3710 1
1 4747 1
1 4423 1
1 4036 1
1 4022 1
1 3454 1
1 4175 1
1 3787 1
1 3796 1
1 4103 1
1 4161 1
1 4158 1
1 3814 1
1 3527 1
1 3748 1
1 3334 1
1 3492 1
1 3962 1
1 3505 1
1 4315 1
1 3804 1
1 3863 1
1 4034 1
1 4308 1
1 3165 1
1 3641 1
1 3644 1
1 3891 1
1 3793 1
1 4270 1
1 4063 1
1 4012 1
1 3458 1
1 3890 1
2 4166 1
2 3935 1
2 3669 1
2 3866 1
2 3393 1
2 4442 1
2 4253 1
2 3727 1
2 3329 1
2 3415 1
2 3372 1
2 4430 1
2 4381 1
2 4008 1
2 3858 1
2 4121 1
2 4057 1
2 3824 1
2 3394 1
2 3558 1
2 3362 1
2 3930 1
2 3835 1
2 3830 1
2 3856 1
2 3249 1
2 3577 1
2 3933 1
2 3850 1
2 3309 1
2 3406 1
2 3506 1
2 3907 1
2 4160 1
2 3318 1
2 3662 1
2 3899 1
2 3700 1
2 3779 1
2 3473 1
2 3490 1
2 3654 1
2 3478 1
2 3495 1
2 3834 1
2 3876 1
2 3661 1
2 3618 1
2 3648 1
2 4032 1
2 3399 1
2 3916 1
2 4430 1
2 3695 1
2 3524 1
2 3571 1
2 3594 1
2 3383 1
2 3499 1
2 3589 1
2 3900 1
2 4114 1
2 3937 1
2 3399 1
2 4200 1
2 4488 1
2 3614 1
2 4051 1
2 3782 1
2 3391 1
2 3124 1
2 4053 1
2 3582 1
2 3666 1
2 3532 1
2 4046 1
2 3667 1
1 2857 2
1 3436 2
1 3791 2
1 3302 2
1 3104 2
1 3171 2
1 3572 2
1 3530 2
1 3175 2
1 3438 2
1 3903 2
1 3899 2
1 3401 2
1 3267 2
1 3451 2
1 3090 2
1 3413 2
1 3323 2
1 3680 2
1 3439 2
1 3853 2
1 3156 2
1 3279 2
1 3707 2
1 4006 2
1 3269 2
1 3071 2
1 3779 2
1 3548 2
1 3292 2
1 3497 2
1 3082 2
1 3248 2
1 3358 2
1 3803 2
1 3566 2
1 3145 2
1 3503 2
1 3571 2
1 3724 2
1 3615 2
1 3203 2
1 3609 2
1 3561 2
1 3979 2
1 3533 2
1 3689 2
1 3158 2
1 4005 2
1 3181 2
1 3479 2
1 3642 2
1 3632 2
2 3069 2
2 3394 2
2 3703 2
2 3165 2
2 3354 2
2 3000 2
2 3687 2
2 3556 2
2 2773 2
2 3058 2
2 3344 2
2 3493 2
2 3297 2
2 3360 2
2 3228 2
2 3277 2
2 3851 2
2 3067 2
2 3692 2
2 3402 2
2 3995 2
2 3318 2
2 2720 2
2 2937 2
2 3580 2
2 2939 2
2 2989 2
2 3586 2
2 3156 2
2 3246 2
2 3170 2
2 3268 2
2 3389 2
2 3381 2
2 2864 2
2 3740 2
2 3479 2
2 3647 2
2 3716 2
2 3284 2
2 4204 2
2 3735 2
2 3218 2
2 3685 2
2 3704 2
2 3214 2
2 3394 2
2 3233 2
2 3352 2
2 3391 2




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

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







ANOVA Model
Response ~ Treatment_A * Treatment_B
means3864.842-115.868-393.42710.533

\begin{tabular}{lllllllll}
\hline
ANOVA Model \tabularnewline
Response ~ Treatment_A * Treatment_B \tabularnewline
means & 3864.842 & -115.868 & -393.427 & 10.533 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=284671&T=1

[TABLE]
[ROW][C]ANOVA Model[/C][/ROW]
[ROW][C]Response ~ Treatment_A * Treatment_B[/C][/ROW]
[ROW][C]means[/C][C]3864.842[/C][C]-115.868[/C][C]-393.427[/C][C]10.533[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=284671&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=284671&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
means3864.842-115.868-393.42710.533







ANOVA Statistics
DfSum SqMean SqF valuePr(>F)
1
Treatment_A1349971.342349971.3423.6340.058
Treatment_B18693765.9268693765.92690.2660
Treatment_A:Treatment_B11598.6411598.6410.0170.898
Residuals23322440818.07596312.524

\begin{tabular}{lllllllll}
\hline
ANOVA Statistics \tabularnewline
  & Df & Sum Sq & Mean Sq & F value & Pr(>F) \tabularnewline
 & 1 &  &  &  &  \tabularnewline
Treatment_A & 1 & 349971.342 & 349971.342 & 3.634 & 0.058 \tabularnewline
Treatment_B & 1 & 8693765.926 & 8693765.926 & 90.266 & 0 \tabularnewline
Treatment_A:Treatment_B & 1 & 1598.641 & 1598.641 & 0.017 & 0.898 \tabularnewline
Residuals & 233 & 22440818.075 & 96312.524 &   &   \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=284671&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]349971.342[/C][C]349971.342[/C][C]3.634[/C][C]0.058[/C][/ROW]
[ROW][C]Treatment_B[/C][C]1[/C][C]8693765.926[/C][C]8693765.926[/C][C]90.266[/C][C]0[/C][/ROW]
[ROW][C]Treatment_A:Treatment_B[/C][C]1[/C][C]1598.641[/C][C]1598.641[/C][C]0.017[/C][C]0.898[/C][/ROW]
[ROW][C]Residuals[/C][C]233[/C][C]22440818.075[/C][C]96312.524[/C][C] [/C][C] [/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=284671&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=284671&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_A1349971.342349971.3423.6340.058
Treatment_B18693765.9268693765.92690.2660
Treatment_A:Treatment_B11598.6411598.6410.0170.898
Residuals23322440818.07596312.524







Tukey Honest Significant Difference Comparisons
difflwruprp adj
2-1-77.053-156.6932.5860.058
2-1-384.852-464.975-304.730
2:1-1:1-115.868-256.18824.4520.145
1:2-1:1-393.427-546.667-240.1870
2:2-1:1-498.762-654.366-343.1590
1:2-2:1-277.559-420.889-134.2290
2:2-2:1-382.894-528.749-237.0390
2:2-1:2-105.335-263.65952.9880.315

\begin{tabular}{lllllllll}
\hline
Tukey Honest Significant Difference Comparisons \tabularnewline
  & diff & lwr & upr & p adj \tabularnewline
2-1 & -77.053 & -156.693 & 2.586 & 0.058 \tabularnewline
2-1 & -384.852 & -464.975 & -304.73 & 0 \tabularnewline
2:1-1:1 & -115.868 & -256.188 & 24.452 & 0.145 \tabularnewline
1:2-1:1 & -393.427 & -546.667 & -240.187 & 0 \tabularnewline
2:2-1:1 & -498.762 & -654.366 & -343.159 & 0 \tabularnewline
1:2-2:1 & -277.559 & -420.889 & -134.229 & 0 \tabularnewline
2:2-2:1 & -382.894 & -528.749 & -237.039 & 0 \tabularnewline
2:2-1:2 & -105.335 & -263.659 & 52.988 & 0.315 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=284671&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]-77.053[/C][C]-156.693[/C][C]2.586[/C][C]0.058[/C][/ROW]
[ROW][C]2-1[/C][C]-384.852[/C][C]-464.975[/C][C]-304.73[/C][C]0[/C][/ROW]
[ROW][C]2:1-1:1[/C][C]-115.868[/C][C]-256.188[/C][C]24.452[/C][C]0.145[/C][/ROW]
[ROW][C]1:2-1:1[/C][C]-393.427[/C][C]-546.667[/C][C]-240.187[/C][C]0[/C][/ROW]
[ROW][C]2:2-1:1[/C][C]-498.762[/C][C]-654.366[/C][C]-343.159[/C][C]0[/C][/ROW]
[ROW][C]1:2-2:1[/C][C]-277.559[/C][C]-420.889[/C][C]-134.229[/C][C]0[/C][/ROW]
[ROW][C]2:2-2:1[/C][C]-382.894[/C][C]-528.749[/C][C]-237.039[/C][C]0[/C][/ROW]
[ROW][C]2:2-1:2[/C][C]-105.335[/C][C]-263.659[/C][C]52.988[/C][C]0.315[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=284671&T=3

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=284671&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-77.053-156.6932.5860.058
2-1-384.852-464.975-304.730
2:1-1:1-115.868-256.18824.4520.145
1:2-1:1-393.427-546.667-240.1870
2:2-1:1-498.762-654.366-343.1590
1:2-2:1-277.559-420.889-134.2290
2:2-2:1-382.894-528.749-237.0390
2:2-1:2-105.335-263.65952.9880.315







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

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

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



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