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 computationMon, 12 Dec 2016 23:14: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/2016/Dec/12/t14815809283ycn8yqnkz38czf.htm/, Retrieved Sat, 04 May 2024 03:22:40 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=299005, Retrieved Sat, 04 May 2024 03:22:40 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact75
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Two-Way ANOVA] [Two Way Anova ITH...] [2016-12-12 22:14:51] [86c9a777e8dbb7ef3face68c75fc8376] [Current]
Feedback Forum

Post a new message
Dataseries X:
14	3	'man'
19	4	'vrouw'
17	5	'vrouw'
17	4	'vrouw'
15	4	'man'
20	3	'vrouw'
15	3	'vrouw'
19	4	'vrouw'
15	4	'man'
15	4	'man'
19	4	'man'
20	4	'man'
18	3	'man'
15	4	'man'
14	4	'vrouw'
20	4	'man'
16	4	'vrouw'
16	4	'vrouw'
16	4	'vrouw'
10	4	'man'
19	4	'vrouw'
19	4	'vrouw'
16	4	'man'
15	3	'man'
18	4	'man'
17	4	'man'
19	4	'man'
17	4	'man'
19	3	'vrouw'
20	4	'man'
5	4	'man'
19	2	'vrouw'
16	4	'man'
15	4	'man'
16	3	'vrouw'
18	4	'man'
16	4	'man'
15	4	'vrouw'
17	4	'vrouw'
20	4	'vrouw'
19	4	'vrouw'
7	4	'vrouw'
13	4	'vrouw'
16	4	'vrouw'
16	4	'vrouw'
18	4	'vrouw'
18	5	'man'
16	5	'vrouw'
17	3	'vrouw'
19	4	'man'
16	4	'vrouw'
19	4	'man'
13	5	'man'
16	4	'vrouw'
13	4	'man'
12	4	'vrouw'
17	4	'vrouw'
17	5	'vrouw'
17	4	'vrouw'
16	4	'man'
16	2	'vrouw'
14	4	'man'
16	4	'vrouw'
13	4	'man'
16	4	'vrouw'
14	4	'vrouw'
20	4	'vrouw'
12	4	'man'
13	3	'vrouw'
18	5	'man'
14	4	'vrouw'
19	3	'man'
18	4	'vrouw'
14	4	'man'
18	4	'vrouw'
19	4	'vrouw'
15	3	'man'
14	4	'man'
17	4	'man'
19	4	'vrouw'
13	5	'vrouw'
19	4	'vrouw'
18	4	'vrouw'
20	4	'vrouw'
15	4	'man'
15	4	'vrouw'
15	4	'man'
20	5	'man'
15	4	'man'
19	5	'man'
18	4	'vrouw'
18	4	'vrouw'
15	5	'vrouw'
20	4	'man'
17	4	'vrouw'
12	4	'vrouw'
18	4	'man'
19	4	'man'
20	4	'vrouw'
17	4	'vrouw'
15	4	'vrouw'
16	4	'man'
18	4	'man'
18	4	'man'
14	4	'vrouw'
15	4	'vrouw'
12	4	'vrouw'
17	3	'man'
14	4	'man'
18	4	'vrouw'
17	4	'man'
17	4	'man'
20	4	'vrouw'
16	4	'man'
14	4	'man'
15	4	'man'
18	4	'vrouw'
20	4	'vrouw'
17	4	'vrouw'
17	4	'vrouw'
17	4	'vrouw'
17	4	'man'
15	4	'man'
17	4	'vrouw'
18	3	'vrouw'
17	4	'vrouw'
20	5	'man'
15	3	'vrouw'
16	3	'man'
15	4	'man'
18	4	'man'
15	4	'vrouw'
18	5	'man'
20	5	'man'
19	3	'man'
14	4	'man'
16	4	'vrouw'
15	4	'man'
17	5	'vrouw'
18	4	'vrouw'
20	5	'vrouw'
17	3	'vrouw'
18	4	'man'
15	3	'man'
16	4	'man'
11	4	'man'
15	4	'vrouw'
18	4	'vrouw'
17	4	'vrouw'
16	4	'vrouw'
12	4	'man'
19	4	'vrouw'
18	4	'man'
15	4	'vrouw'
17	5	'man'
19	4	'man'
18	4	'man'
16	3	'man'
16	4	'vrouw'
16	4	'vrouw'
14	4	'man'




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

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







ANOVA Model
Response ~ Treatment_A * Treatment_B
means19.183-2.783-3.252-1.071-1.6831.9492.418NA

\begin{tabular}{lllllllll}
\hline
ANOVA Model \tabularnewline
Response ~ Treatment_A * Treatment_B \tabularnewline
means & 19.183 & -2.783 & -3.252 & -1.071 & -1.683 & 1.949 & 2.418 & NA \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=299005&T=1

[TABLE]
[ROW][C]ANOVA Model[/C][/ROW]
[ROW][C]Response ~ Treatment_A * Treatment_B[/C][/ROW]
[ROW][C]means[/C][C]19.183[/C][C]-2.783[/C][C]-3.252[/C][C]-1.071[/C][C]-1.683[/C][C]1.949[/C][C]2.418[/C][C]NA[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=299005&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=299005&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
means19.183-2.783-3.252-1.071-1.6831.9492.418NA







ANOVA Statistics
DfSum SqMean SqF valuePr(>F)
3
Treatment_A317.9785.9930.9920.398
Treatment_B37.617.611.260.263
Treatment_A:Treatment_B320.57910.291.7040.185
Residuals154929.8946.038

\begin{tabular}{lllllllll}
\hline
ANOVA Statistics \tabularnewline
  & Df & Sum Sq & Mean Sq & F value & Pr(>F) \tabularnewline
 & 3 &  &  &  &  \tabularnewline
Treatment_A & 3 & 17.978 & 5.993 & 0.992 & 0.398 \tabularnewline
Treatment_B & 3 & 7.61 & 7.61 & 1.26 & 0.263 \tabularnewline
Treatment_A:Treatment_B & 3 & 20.579 & 10.29 & 1.704 & 0.185 \tabularnewline
Residuals & 154 & 929.894 & 6.038 &   &   \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=299005&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]3[/C][C][/C][C][/C][C][/C][C][/C][/ROW]
[ROW][C]Treatment_A[/C][C]3[/C][C]17.978[/C][C]5.993[/C][C]0.992[/C][C]0.398[/C][/ROW]
[ROW][C]Treatment_B[/C][C]3[/C][C]7.61[/C][C]7.61[/C][C]1.26[/C][C]0.263[/C][/ROW]
[ROW][C]Treatment_A:Treatment_B[/C][C]3[/C][C]20.579[/C][C]10.29[/C][C]1.704[/C][C]0.185[/C][/ROW]
[ROW][C]Residuals[/C][C]154[/C][C]929.894[/C][C]6.038[/C][C] [/C][C] [/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=299005&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=299005&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)
3
Treatment_A317.9785.9930.9920.398
Treatment_B37.617.611.260.263
Treatment_A:Treatment_B320.57910.291.7040.185
Residuals154929.8946.038







Tukey Honest Significant Difference Comparisons
difflwruprp adj
3-2-0.974-5.7183.7710.951
4-2-1.177-5.7273.3720.907
5-2-0.125-4.9124.6621
4-3-0.204-1.7761.3690.987
5-30.849-1.3173.0140.739
5-41.052-0.6432.7480.375
vrouw-man0.432-0.3341.1980.267
3:man-2:manNANANANA
4:man-2:manNANANANA
5:man-2:manNANANANA
2:vrouw-2:manNANANANA
3:vrouw-2:manNANANANA
4:vrouw-2:manNANANANA
5:vrouw-2:manNANANANA
4:man-3:man-0.469-3.0552.1170.999
5:man-3:man1.711-1.7595.1810.798
2:vrouw-3:man1.1-4.7496.9490.999
3:vrouw-3:man0.267-3.2033.7361
4:vrouw-3:man0.267-2.2962.8291
5:vrouw-3:man0.029-3.6933.751
5:man-4:man2.18-0.5254.8850.214
2:vrouw-4:man1.569-3.86270.987
3:vrouw-4:man0.736-1.973.4410.991
4:vrouw-4:man0.736-0.6232.0950.711
5:vrouw-4:man0.498-2.5243.5191
2:vrouw-5:man-0.611-6.5145.2921
3:vrouw-5:man-1.444-5.0042.1150.916
4:vrouw-5:man-1.444-4.1281.2390.716
5:vrouw-5:man-1.683-5.4882.1230.874
3:vrouw-2:vrouw-0.833-6.7375.071
4:vrouw-2:vrouw-0.833-6.2534.5871
5:vrouw-2:vrouw-1.071-7.1264.9830.999
4:vrouw-3:vrouw0-2.6832.6831
5:vrouw-3:vrouw-0.238-4.0443.5671
5:vrouw-4:vrouw-0.238-3.242.7641

\begin{tabular}{lllllllll}
\hline
Tukey Honest Significant Difference Comparisons \tabularnewline
  & diff & lwr & upr & p adj \tabularnewline
3-2 & -0.974 & -5.718 & 3.771 & 0.951 \tabularnewline
4-2 & -1.177 & -5.727 & 3.372 & 0.907 \tabularnewline
5-2 & -0.125 & -4.912 & 4.662 & 1 \tabularnewline
4-3 & -0.204 & -1.776 & 1.369 & 0.987 \tabularnewline
5-3 & 0.849 & -1.317 & 3.014 & 0.739 \tabularnewline
5-4 & 1.052 & -0.643 & 2.748 & 0.375 \tabularnewline
vrouw-man & 0.432 & -0.334 & 1.198 & 0.267 \tabularnewline
3:man-2:man & NA & NA & NA & NA \tabularnewline
4:man-2:man & NA & NA & NA & NA \tabularnewline
5:man-2:man & NA & NA & NA & NA \tabularnewline
2:vrouw-2:man & NA & NA & NA & NA \tabularnewline
3:vrouw-2:man & NA & NA & NA & NA \tabularnewline
4:vrouw-2:man & NA & NA & NA & NA \tabularnewline
5:vrouw-2:man & NA & NA & NA & NA \tabularnewline
4:man-3:man & -0.469 & -3.055 & 2.117 & 0.999 \tabularnewline
5:man-3:man & 1.711 & -1.759 & 5.181 & 0.798 \tabularnewline
2:vrouw-3:man & 1.1 & -4.749 & 6.949 & 0.999 \tabularnewline
3:vrouw-3:man & 0.267 & -3.203 & 3.736 & 1 \tabularnewline
4:vrouw-3:man & 0.267 & -2.296 & 2.829 & 1 \tabularnewline
5:vrouw-3:man & 0.029 & -3.693 & 3.75 & 1 \tabularnewline
5:man-4:man & 2.18 & -0.525 & 4.885 & 0.214 \tabularnewline
2:vrouw-4:man & 1.569 & -3.862 & 7 & 0.987 \tabularnewline
3:vrouw-4:man & 0.736 & -1.97 & 3.441 & 0.991 \tabularnewline
4:vrouw-4:man & 0.736 & -0.623 & 2.095 & 0.711 \tabularnewline
5:vrouw-4:man & 0.498 & -2.524 & 3.519 & 1 \tabularnewline
2:vrouw-5:man & -0.611 & -6.514 & 5.292 & 1 \tabularnewline
3:vrouw-5:man & -1.444 & -5.004 & 2.115 & 0.916 \tabularnewline
4:vrouw-5:man & -1.444 & -4.128 & 1.239 & 0.716 \tabularnewline
5:vrouw-5:man & -1.683 & -5.488 & 2.123 & 0.874 \tabularnewline
3:vrouw-2:vrouw & -0.833 & -6.737 & 5.07 & 1 \tabularnewline
4:vrouw-2:vrouw & -0.833 & -6.253 & 4.587 & 1 \tabularnewline
5:vrouw-2:vrouw & -1.071 & -7.126 & 4.983 & 0.999 \tabularnewline
4:vrouw-3:vrouw & 0 & -2.683 & 2.683 & 1 \tabularnewline
5:vrouw-3:vrouw & -0.238 & -4.044 & 3.567 & 1 \tabularnewline
5:vrouw-4:vrouw & -0.238 & -3.24 & 2.764 & 1 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=299005&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]3-2[/C][C]-0.974[/C][C]-5.718[/C][C]3.771[/C][C]0.951[/C][/ROW]
[ROW][C]4-2[/C][C]-1.177[/C][C]-5.727[/C][C]3.372[/C][C]0.907[/C][/ROW]
[ROW][C]5-2[/C][C]-0.125[/C][C]-4.912[/C][C]4.662[/C][C]1[/C][/ROW]
[ROW][C]4-3[/C][C]-0.204[/C][C]-1.776[/C][C]1.369[/C][C]0.987[/C][/ROW]
[ROW][C]5-3[/C][C]0.849[/C][C]-1.317[/C][C]3.014[/C][C]0.739[/C][/ROW]
[ROW][C]5-4[/C][C]1.052[/C][C]-0.643[/C][C]2.748[/C][C]0.375[/C][/ROW]
[ROW][C]vrouw-man[/C][C]0.432[/C][C]-0.334[/C][C]1.198[/C][C]0.267[/C][/ROW]
[ROW][C]3:man-2:man[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]4:man-2:man[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]5:man-2:man[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]2:vrouw-2:man[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]3:vrouw-2:man[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]4:vrouw-2:man[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]5:vrouw-2:man[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]4:man-3:man[/C][C]-0.469[/C][C]-3.055[/C][C]2.117[/C][C]0.999[/C][/ROW]
[ROW][C]5:man-3:man[/C][C]1.711[/C][C]-1.759[/C][C]5.181[/C][C]0.798[/C][/ROW]
[ROW][C]2:vrouw-3:man[/C][C]1.1[/C][C]-4.749[/C][C]6.949[/C][C]0.999[/C][/ROW]
[ROW][C]3:vrouw-3:man[/C][C]0.267[/C][C]-3.203[/C][C]3.736[/C][C]1[/C][/ROW]
[ROW][C]4:vrouw-3:man[/C][C]0.267[/C][C]-2.296[/C][C]2.829[/C][C]1[/C][/ROW]
[ROW][C]5:vrouw-3:man[/C][C]0.029[/C][C]-3.693[/C][C]3.75[/C][C]1[/C][/ROW]
[ROW][C]5:man-4:man[/C][C]2.18[/C][C]-0.525[/C][C]4.885[/C][C]0.214[/C][/ROW]
[ROW][C]2:vrouw-4:man[/C][C]1.569[/C][C]-3.862[/C][C]7[/C][C]0.987[/C][/ROW]
[ROW][C]3:vrouw-4:man[/C][C]0.736[/C][C]-1.97[/C][C]3.441[/C][C]0.991[/C][/ROW]
[ROW][C]4:vrouw-4:man[/C][C]0.736[/C][C]-0.623[/C][C]2.095[/C][C]0.711[/C][/ROW]
[ROW][C]5:vrouw-4:man[/C][C]0.498[/C][C]-2.524[/C][C]3.519[/C][C]1[/C][/ROW]
[ROW][C]2:vrouw-5:man[/C][C]-0.611[/C][C]-6.514[/C][C]5.292[/C][C]1[/C][/ROW]
[ROW][C]3:vrouw-5:man[/C][C]-1.444[/C][C]-5.004[/C][C]2.115[/C][C]0.916[/C][/ROW]
[ROW][C]4:vrouw-5:man[/C][C]-1.444[/C][C]-4.128[/C][C]1.239[/C][C]0.716[/C][/ROW]
[ROW][C]5:vrouw-5:man[/C][C]-1.683[/C][C]-5.488[/C][C]2.123[/C][C]0.874[/C][/ROW]
[ROW][C]3:vrouw-2:vrouw[/C][C]-0.833[/C][C]-6.737[/C][C]5.07[/C][C]1[/C][/ROW]
[ROW][C]4:vrouw-2:vrouw[/C][C]-0.833[/C][C]-6.253[/C][C]4.587[/C][C]1[/C][/ROW]
[ROW][C]5:vrouw-2:vrouw[/C][C]-1.071[/C][C]-7.126[/C][C]4.983[/C][C]0.999[/C][/ROW]
[ROW][C]4:vrouw-3:vrouw[/C][C]0[/C][C]-2.683[/C][C]2.683[/C][C]1[/C][/ROW]
[ROW][C]5:vrouw-3:vrouw[/C][C]-0.238[/C][C]-4.044[/C][C]3.567[/C][C]1[/C][/ROW]
[ROW][C]5:vrouw-4:vrouw[/C][C]-0.238[/C][C]-3.24[/C][C]2.764[/C][C]1[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=299005&T=3

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=299005&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
3-2-0.974-5.7183.7710.951
4-2-1.177-5.7273.3720.907
5-2-0.125-4.9124.6621
4-3-0.204-1.7761.3690.987
5-30.849-1.3173.0140.739
5-41.052-0.6432.7480.375
vrouw-man0.432-0.3341.1980.267
3:man-2:manNANANANA
4:man-2:manNANANANA
5:man-2:manNANANANA
2:vrouw-2:manNANANANA
3:vrouw-2:manNANANANA
4:vrouw-2:manNANANANA
5:vrouw-2:manNANANANA
4:man-3:man-0.469-3.0552.1170.999
5:man-3:man1.711-1.7595.1810.798
2:vrouw-3:man1.1-4.7496.9490.999
3:vrouw-3:man0.267-3.2033.7361
4:vrouw-3:man0.267-2.2962.8291
5:vrouw-3:man0.029-3.6933.751
5:man-4:man2.18-0.5254.8850.214
2:vrouw-4:man1.569-3.86270.987
3:vrouw-4:man0.736-1.973.4410.991
4:vrouw-4:man0.736-0.6232.0950.711
5:vrouw-4:man0.498-2.5243.5191
2:vrouw-5:man-0.611-6.5145.2921
3:vrouw-5:man-1.444-5.0042.1150.916
4:vrouw-5:man-1.444-4.1281.2390.716
5:vrouw-5:man-1.683-5.4882.1230.874
3:vrouw-2:vrouw-0.833-6.7375.071
4:vrouw-2:vrouw-0.833-6.2534.5871
5:vrouw-2:vrouw-1.071-7.1264.9830.999
4:vrouw-3:vrouw0-2.6832.6831
5:vrouw-3:vrouw-0.238-4.0443.5671
5:vrouw-4:vrouw-0.238-3.242.7641







Levenes Test for Homogeneity of Variance
DfF valuePr(>F)
Group60.5310.784
154

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

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



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