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, 12 Dec 2014 12:42:47 +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/2014/Dec/12/t1418388210yqy84g80z3ryzqx.htm/, Retrieved Thu, 16 May 2024 23:23:29 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=266620, Retrieved Thu, 16 May 2024 23:23:29 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact77
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Two-Way ANOVA] [] [2014-12-12 12:42:47] [25032714cc1544fa8afe1ed03205f94e] [Current]
Feedback Forum

Post a new message
Dataseries X:
4 0 2011
9 0 2011
4 0 2011
5 0 2011
4 0 2011
4 0 2011
9 0 2011
8 0 2011
11 0 2011
4 0 2011
4 0 2011
6 0 2011
4 0 2011
8 0 2011
4 0 2011
4 0 2011
11 1 2011
4 0 2011
4 0 2011
6 1 2011
6 0 2011
4 0 2011
8 0 2011
5 0 2011
4 0 2011
9 0 2011
4 0 2011
7 1 2011
10 1 2011
4 0 2011
4 0 2011
7 0 2011
12 0 2011
4 0 2011
7 0 2011
5 0 2011
8 0 2011
5 0 2011
4 0 2011
9 1 2011
7 0 2011
4 0 2011
4 0 2011
4 0 2011
4 0 2011
4 0 2011
7 1 2011
4 0 2011
7 0 2011
4 1 2011
4 0 2011
4 1 2011
4 1 2011
8 1 2011
4 0 2011
4 1 2011
4 0 2011
4 0 2011
7 1 2011
12 0 2011
4 1 2011
4 1 2011
4 0 2011
5 0 2011
15 0 2011
5 0 2011
10 0 2011
9 1 2011
8 0 2011
4 0 2011
5 0 2011
4 1 2011
9 0 2011
4 0 2011
10 1 2011
4 1 2011
7 0 2011
4 0 2011
6 0 2011
7 0 2011
5 1 2011
4 0 2011
4 1 2011
4 0 2011
4 1 2011
4 1 2011
4 1 2011
6 1 2011
10 1 2011
7 1 2011
4 1 2011
4 1 2011
7 1 2011
4 1 2011
8 1 2011
11 1 2011
6 1 2011
14 1 2011
5 1 2011
4 1 2011
8 1 2011
9 1 2011
4 1 2011
4 1 2011
5 1 2011
4 1 2011
5 1 2011
4 1 2011
4 1 2011
7 1 2011
10 1 2011
4 1 2011
5 1 2011
4 1 2011
4 1 2011
4 1 2011
6 0 2012
4 0 2012
8 0 2012
5 0 2012
4 1 2012
17 1 2012
4 0 2012
4 0 2012
8 0 2012
4 0 2012
7 0 2012
4 0 2012
4 0 2012
5 0 2012
7 0 2012
4 0 2012
4 1 2012
7 0 2012
11 0 2012
7 0 2012
4 0 2012
4 0 2012
4 0 2012
4 0 2012
4 0 2012
4 0 2012
6 0 2012
8 0 2012
23 1 2012
4 0 2012
8 0 2012
6 0 2012
4 0 2012
4 0 2012
7 0 2012
4 0 2012
4 0 2012
4 0 2012
4 0 2012
10 0 2012
6 0 2012
5 0 2012
5 0 2012
4 0 2012
4 1 2012
5 1 2012
5 0 2012
5 0 2012
5 1 2012
4 1 2012
6 1 2012
4 1 2012
4 0 2012
4 0 2012
9 1 2012
18 1 2012
6 1 2012
5 1 2012
4 1 2012
11 1 2012
4 1 2012
10 1 2012
6 1 2012
8 0 2012
8 0 2012
6 1 2012
8 0 2012
4 0 2012
4 1 2012
9 0 2012
9 1 2012
5 1 2012
4 0 2012
4 1 2012
15 1 2012
10 1 2012
9 1 2012
7 1 2012
9 1 2012
6 1 2012
4 1 2012
7 1 2012
4 1 2012
7 1 2012
4 1 2012
15 1 2012
4 0 2012
9 1 2012
4 1 2012
4 1 2012
28 0 2012
4 1 2012
4 0 2012
4 1 2012
5 0 2012
4 1 2012
4 0 2012
12 1 2012
5 1 2012
4 1 2012
6 1 2012
6 1 2012
5 0 2012
4 0 2012
4 1 2012
4 0 2012
10 0 2012
7 1 2012
4 0 2012
4 0 2012
7 1 2012
4 1 2012
4 0 2012
12 1 2012
5 0 2012
8 0 2012
6 0 2012
17 1 2012
4 0 2012
5 1 2012
4 0 2012
5 0 2012
5 0 2012
6 0 2012
4 1 2012
4 0 2012
4 0 2012
6 0 2012
8 1 2012
10 0 2012
4 0 2012
5 1 2012
4 0 2012
4 1 2012
4 1 2012
16 1 2012
4 0 2012
7 1 2012
4 1 2012
4 0 2012
14 0 2012
5 0 2012
5 0 2012
5 0 2012
5 0 2012
7 1 2012
19 1 2012
16 0 2012
4 1 2012
4 1 2012
7 0 2012
9 1 2012
5 1 2012
14 1 2012
4 1 2012
16 1 2012
10 1 2012
5 1 2012
6 1 2012
4 1 2012
4 1 2012
4 1 2012
5 1 2012
4 1 2012
4 1 2012
5 1 2012
4 1 2012
4 1 2012
5 0 2012
8 1 2012
15 1 2012
7 0 2014
5 0 2014
8 0 2014
8 0 2014
5 0 2014
4 0 2014
4 0 2014
11 0 2014
5 0 2014
22 0 2014
4 0 2014
4 0 2014
4 1 2014
5 0 2014
4 1 2014
16 0 2014
5 0 2014
4 1 2014
6 0 2014
5 0 2014
4 0 2014
4 0 2014
4 0 2014
7 0 2014
4 0 2014
8 0 2014
7 0 2014
4 0 2014
6 0 2014
5 0 2014
8 0 2014
8 0 2014
4 0 2014
7 0 2014
4 0 2014
13 0 2014
4 0 2014
4 0 2014
4 0 2014
4 0 2014
7 0 2014
5 0 2014
4 0 2014
5 0 2014
12 0 2014
8 1 2014
4 0 2014
4 1 2014
8 1 2014
5 1 2014
4 0 2014
4 0 2014
7 0 2014
5 1 2014
13 0 2014
4 0 2014
4 0 2014
4 0 2014
6 1 2014
4 0 2014
4 1 2014
4 0 2014
4 0 2014
4 0 2014
5 1 2014
6 1 2014
4 1 2014
4 0 2014
4 0 2014
6 0 2014
9 1 2014
5 0 2014
6 0 2014
13 0 2014
4 0 2014
7 0 2014
5 0 2014
4 1 2014
4 0 2014
4 0 2014
6 1 2014
6 1 2014
8 1 2014
6 0 2014
5 0 2014
9 1 2014
6 1 2014
4 1 2014
9 1 2014
4 0 2014
4 1 2014
4 1 2014
5 0 2014
4 1 2014
4 0 2014
4 1 2014
5 0 2014
5 1 2014
8 0 2014
4 0 2014
4 1 2014
9 1 2014
4 1 2014
4 0 2014
4 1 2014
4 0 2014
4 1 2014
4 0 2014
4 1 2014
4 1 2014
4 1 2014
4 0 2014
4 1 2014
4 0 2014
4 0 2014
5 1 2014
8 0 2014
7 1 2014
4 0 2014
4 1 2014
4 1 2014
5 1 2014
5 1 2014
6 0 2014
12 0 2014
5 0 2014
9 0 2014
12 0 2014
4 0 2014
16 0 2014
4 1 2014
5 1 2014
4 1 2014
4 0 2014
6 0 2014
4 1 2014
4 0 2014
5 0 2014
6 1 2014
5 0 2014
6 1 2014
4 0 2014
4 0 2014
7 1 2014
9 0 2014
5 1 2014
5 1 2014
4 0 2014
4 0 2014
12 0 2014
4 1 2014
6 1 2014
9 1 2014
4 0 2014
5 0 2014
4 1 2014
4 1 2014
4 1 2014
4 1 2014
4 1 2014
11 1 2014
4 0 2014
6 0 2014
4 1 2014
5 0 2014
4 1 2014
4 0 2014
6 0 2014
4 0 2014
7 1 2014
9 1 2014
5 0 2014
14 0 2014
4 0 2014
4 0 2014
4 1 2014
5 1 2014
4 1 2014
4 1 2014
9 1 2014
4 1 2014
4 1 2014
10 1 2014
4 0 2014
4 1 2014
6 0 2014
4 0 2014
9 1 2014
5 0 2014
4 0 2014
5 0 2014
14 1 2014
9 1 2014
4 1 2014
4 1 2014
17 0 2014
4 0 2014
5 0 2014
9 1 2014
7 1 2014
4 1 2014
5 1 2014
7 1 2014
10 0 2014
5 0 2014
4 0 2014
8 1 2014
4 1 2014
4 1 2014
6 1 2014




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

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







ANOVA Model
Response ~ Treatment_A * Treatment_B
means5.7340.2660.080.2171.073-0.677

\begin{tabular}{lllllllll}
\hline
ANOVA Model \tabularnewline
Response ~ Treatment_A * Treatment_B \tabularnewline
means & 5.734 & 0.266 & 0.08 & 0.217 & 1.073 & -0.677 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=266620&T=1

[TABLE]
[ROW][C]ANOVA Model[/C][/ROW]
[ROW][C]Response ~ Treatment_A * Treatment_B[/C][/ROW]
[ROW][C]means[/C][C]5.734[/C][C]0.266[/C][C]0.08[/C][C]0.217[/C][C]1.073[/C][C]-0.677[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=266620&T=1

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







ANOVA Statistics
DfSum SqMean SqF valuePr(>F)
1
Treatment_A119.86319.8631.9750.161
Treatment_B147.05823.5292.340.097
Treatment_A:Treatment_B171.51635.7583.5560.029
Residuals4914937.83610.057

\begin{tabular}{lllllllll}
\hline
ANOVA Statistics \tabularnewline
  & Df & Sum Sq & Mean Sq & F value & Pr(>F) \tabularnewline
 & 1 &  &  &  &  \tabularnewline
Treatment_A & 1 & 19.863 & 19.863 & 1.975 & 0.161 \tabularnewline
Treatment_B & 1 & 47.058 & 23.529 & 2.34 & 0.097 \tabularnewline
Treatment_A:Treatment_B & 1 & 71.516 & 35.758 & 3.556 & 0.029 \tabularnewline
Residuals & 491 & 4937.836 & 10.057 &   &   \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=266620&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]19.863[/C][C]19.863[/C][C]1.975[/C][C]0.161[/C][/ROW]
[ROW][C]Treatment_B[/C][C]1[/C][C]47.058[/C][C]23.529[/C][C]2.34[/C][C]0.097[/C][/ROW]
[ROW][C]Treatment_A:Treatment_B[/C][C]1[/C][C]71.516[/C][C]35.758[/C][C]3.556[/C][C]0.029[/C][/ROW]
[ROW][C]Residuals[/C][C]491[/C][C]4937.836[/C][C]10.057[/C][C] [/C][C] [/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=266620&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=266620&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_A119.86319.8631.9750.161
Treatment_B147.05823.5292.340.097
Treatment_A:Treatment_B171.51635.7583.5560.029
Residuals4914937.83610.057







Tukey Honest Significant Difference Comparisons
difflwruprp adj
1-00.402-0.160.9640.161
2012-20110.606-0.291.5030.251
2014-2011-0.059-0.9210.8040.986
2014-2012-0.665-1.4330.1030.105
1:2011-0:20110.266-1.4281.960.998
0:2012-0:20110.08-1.4181.5771
1:2012-0:20111.419-0.0832.920.076
0:2014-0:20110.217-1.1821.6150.998
1:2014-0:2011-0.194-1.6881.30.999
0:2012-1:2011-0.186-1.781.4080.999
1:2012-1:20111.153-0.4442.750.307
0:2014-1:2011-0.049-1.551.4521
1:2014-1:2011-0.46-2.051.1310.962
1:2012-0:20121.339-0.0492.7270.066
0:2014-0:20120.137-1.1381.4131
1:2014-0:2012-0.274-1.6531.1060.993
0:2014-1:2012-1.202-2.4810.0780.08
1:2014-1:2012-1.613-2.996-0.2290.012
1:2014-0:2014-0.411-1.6820.860.94

\begin{tabular}{lllllllll}
\hline
Tukey Honest Significant Difference Comparisons \tabularnewline
  & diff & lwr & upr & p adj \tabularnewline
1-0 & 0.402 & -0.16 & 0.964 & 0.161 \tabularnewline
2012-2011 & 0.606 & -0.29 & 1.503 & 0.251 \tabularnewline
2014-2011 & -0.059 & -0.921 & 0.804 & 0.986 \tabularnewline
2014-2012 & -0.665 & -1.433 & 0.103 & 0.105 \tabularnewline
1:2011-0:2011 & 0.266 & -1.428 & 1.96 & 0.998 \tabularnewline
0:2012-0:2011 & 0.08 & -1.418 & 1.577 & 1 \tabularnewline
1:2012-0:2011 & 1.419 & -0.083 & 2.92 & 0.076 \tabularnewline
0:2014-0:2011 & 0.217 & -1.182 & 1.615 & 0.998 \tabularnewline
1:2014-0:2011 & -0.194 & -1.688 & 1.3 & 0.999 \tabularnewline
0:2012-1:2011 & -0.186 & -1.78 & 1.408 & 0.999 \tabularnewline
1:2012-1:2011 & 1.153 & -0.444 & 2.75 & 0.307 \tabularnewline
0:2014-1:2011 & -0.049 & -1.55 & 1.452 & 1 \tabularnewline
1:2014-1:2011 & -0.46 & -2.05 & 1.131 & 0.962 \tabularnewline
1:2012-0:2012 & 1.339 & -0.049 & 2.727 & 0.066 \tabularnewline
0:2014-0:2012 & 0.137 & -1.138 & 1.413 & 1 \tabularnewline
1:2014-0:2012 & -0.274 & -1.653 & 1.106 & 0.993 \tabularnewline
0:2014-1:2012 & -1.202 & -2.481 & 0.078 & 0.08 \tabularnewline
1:2014-1:2012 & -1.613 & -2.996 & -0.229 & 0.012 \tabularnewline
1:2014-0:2014 & -0.411 & -1.682 & 0.86 & 0.94 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=266620&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.402[/C][C]-0.16[/C][C]0.964[/C][C]0.161[/C][/ROW]
[ROW][C]2012-2011[/C][C]0.606[/C][C]-0.29[/C][C]1.503[/C][C]0.251[/C][/ROW]
[ROW][C]2014-2011[/C][C]-0.059[/C][C]-0.921[/C][C]0.804[/C][C]0.986[/C][/ROW]
[ROW][C]2014-2012[/C][C]-0.665[/C][C]-1.433[/C][C]0.103[/C][C]0.105[/C][/ROW]
[ROW][C]1:2011-0:2011[/C][C]0.266[/C][C]-1.428[/C][C]1.96[/C][C]0.998[/C][/ROW]
[ROW][C]0:2012-0:2011[/C][C]0.08[/C][C]-1.418[/C][C]1.577[/C][C]1[/C][/ROW]
[ROW][C]1:2012-0:2011[/C][C]1.419[/C][C]-0.083[/C][C]2.92[/C][C]0.076[/C][/ROW]
[ROW][C]0:2014-0:2011[/C][C]0.217[/C][C]-1.182[/C][C]1.615[/C][C]0.998[/C][/ROW]
[ROW][C]1:2014-0:2011[/C][C]-0.194[/C][C]-1.688[/C][C]1.3[/C][C]0.999[/C][/ROW]
[ROW][C]0:2012-1:2011[/C][C]-0.186[/C][C]-1.78[/C][C]1.408[/C][C]0.999[/C][/ROW]
[ROW][C]1:2012-1:2011[/C][C]1.153[/C][C]-0.444[/C][C]2.75[/C][C]0.307[/C][/ROW]
[ROW][C]0:2014-1:2011[/C][C]-0.049[/C][C]-1.55[/C][C]1.452[/C][C]1[/C][/ROW]
[ROW][C]1:2014-1:2011[/C][C]-0.46[/C][C]-2.05[/C][C]1.131[/C][C]0.962[/C][/ROW]
[ROW][C]1:2012-0:2012[/C][C]1.339[/C][C]-0.049[/C][C]2.727[/C][C]0.066[/C][/ROW]
[ROW][C]0:2014-0:2012[/C][C]0.137[/C][C]-1.138[/C][C]1.413[/C][C]1[/C][/ROW]
[ROW][C]1:2014-0:2012[/C][C]-0.274[/C][C]-1.653[/C][C]1.106[/C][C]0.993[/C][/ROW]
[ROW][C]0:2014-1:2012[/C][C]-1.202[/C][C]-2.481[/C][C]0.078[/C][C]0.08[/C][/ROW]
[ROW][C]1:2014-1:2012[/C][C]-1.613[/C][C]-2.996[/C][C]-0.229[/C][C]0.012[/C][/ROW]
[ROW][C]1:2014-0:2014[/C][C]-0.411[/C][C]-1.682[/C][C]0.86[/C][C]0.94[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=266620&T=3

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=266620&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.402-0.160.9640.161
2012-20110.606-0.291.5030.251
2014-2011-0.059-0.9210.8040.986
2014-2012-0.665-1.4330.1030.105
1:2011-0:20110.266-1.4281.960.998
0:2012-0:20110.08-1.4181.5771
1:2012-0:20111.419-0.0832.920.076
0:2014-0:20110.217-1.1821.6150.998
1:2014-0:2011-0.194-1.6881.30.999
0:2012-1:2011-0.186-1.781.4080.999
1:2012-1:20111.153-0.4442.750.307
0:2014-1:2011-0.049-1.551.4521
1:2014-1:2011-0.46-2.051.1310.962
1:2012-0:20121.339-0.0492.7270.066
0:2014-0:20120.137-1.1381.4131
1:2014-0:2012-0.274-1.6531.1060.993
0:2014-1:2012-1.202-2.4810.0780.08
1:2014-1:2012-1.613-2.996-0.2290.012
1:2014-0:2014-0.411-1.6820.860.94







Levenes Test for Homogeneity of Variance
DfF valuePr(>F)
Group52.6650.022
491

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

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



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