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, 13 Dec 2016 21:42:46 +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/13/t14816618028q09eyvjq2ofuyg.htm/, Retrieved Sat, 04 May 2024 21:28:19 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=299228, Retrieved Sat, 04 May 2024 21:28:19 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact66
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Two-Way ANOVA] [ITHsum - TVDC3 - ...] [2016-12-13 20:42:46] [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	5	'vrouw'
15	5	'vrouw'
19	5	'vrouw'
15	5	'man'
15	5	'man'
19	5	'man'
20	4	'man'
18	4	'man'
15	4	'man'
14	5	'vrouw'
20	4	'man'
16	4	'vrouw'
16	5	'vrouw'
16	4	'vrouw'
10	4	'man'
19	4	'vrouw'
19	4	'vrouw'
16	5	'man'
15	5	'man'
18	4	'man'
17	4	'man'
19	5	'man'
17	5	'man'
19	5	'vrouw'
20	4	'man'
5	5	'man'
19	4	'vrouw'
16	5	'man'
15	4	'man'
16	4	'vrouw'
18	4	'man'
16	5	'man'
15	4	'vrouw'
17	5	'vrouw'
20	5	'vrouw'
19	4	'vrouw'
7	5	'vrouw'
13	5	'vrouw'
16	4	'vrouw'
16	3	'vrouw'
18	5	'vrouw'
18	5	'man'
16	4	'vrouw'
17	3	'vrouw'
19	4	'man'
16	4	'vrouw'
19	4	'man'
13	4	'man'
16	4	'vrouw'
13	4	'man'
12	5	'vrouw'
17	4	'vrouw'
17	4	'vrouw'
17	4	'vrouw'
16	4	'man'
16	4	'vrouw'
14	5	'man'
16	4	'vrouw'
13	4	'man'
16	4	'vrouw'
14	4	'vrouw'
20	4	'vrouw'
12	3	'man'
13	4	'vrouw'
18	4	'man'
14	4	'vrouw'
19	5	'man'
18	4	'vrouw'
14	4	'man'
18	5	'vrouw'
19	5	'vrouw'
15	3	'man'
14	5	'man'
17	4	'man'
19	5	'vrouw'
13	5	'vrouw'
19	5	'vrouw'
18	5	'vrouw'
20	4	'vrouw'
15	4	'man'
15	2	'vrouw'
15	4	'man'
20	5	'man'
15	5	'man'
19	5	'man'
18	4	'vrouw'
18	4	'vrouw'
15	4	'vrouw'
20	5	'man'
17	4	'vrouw'
18	5	'man'
19	4	'man'
20	4	'vrouw'
17	5	'vrouw'
15	4	'vrouw'
16	5	'man'
18	4	'man'
18	4	'man'
14	4	'vrouw'
15	3	'vrouw'
12	4	'vrouw'
17	3	'man'
14	5	'man'
18	4	'vrouw'
17	4	'man'
17	5	'man'
20	4	'vrouw'
16	4	'man'
14	4	'man'
15	4	'man'
18	4	'vrouw'
20	4	'vrouw'
17	5	'vrouw'
17	4	'vrouw'
17	4	'vrouw'
17	5	'man'
15	4	'man'
17	4	'vrouw'
18	3	'vrouw'
17	4	'vrouw'
20	4	'man'
15	4	'vrouw'
16	3	'man'
15	4	'man'
18	5	'man'
11	3	'man'
15	4	'vrouw'
18	5	'man'
20	5	'man'
19	4	'man'
14	4	'man'
16	4	'vrouw'
15	3	'man'
17	5	'vrouw'
18	4	'vrouw'
20	5	'vrouw'
17	4	'vrouw'
18	4	'man'
15	3	'man'
16	4	'man'
11	4	'man'
15	4	'vrouw'
18	3	'vrouw'
17	4	'vrouw'
16	5	'vrouw'
12	3	'man'
19	4	'vrouw'
18	5	'man'
15	4	'vrouw'
17	5	'man'
19	4	'man'
18	4	'man'
19	4	'man'
16	4	'man'
16	4	'vrouw'
16	3	'vrouw'
14	4	'man'




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

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







ANOVA Model
Response ~ Treatment_A * Treatment_B
means14.94-0.8291.4641.6670.062.4960.324NA

\begin{tabular}{lllllllll}
\hline
ANOVA Model \tabularnewline
Response ~ Treatment_A * Treatment_B \tabularnewline
means & 14.94 & -0.829 & 1.464 & 1.667 & 0.06 & 2.496 & 0.324 & NA \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=299228&T=1

[TABLE]
[ROW][C]ANOVA Model[/C][/ROW]
[ROW][C]Response ~ Treatment_A * Treatment_B[/C][/ROW]
[ROW][C]means[/C][C]14.94[/C][C]-0.829[/C][C]1.464[/C][C]1.667[/C][C]0.06[/C][C]2.496[/C][C]0.324[/C][C]NA[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=299228&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=299228&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
means14.94-0.8291.4641.6670.062.4960.324NA







ANOVA Statistics
DfSum SqMean SqF valuePr(>F)
3
Treatment_A332.39710.7991.7940.151
Treatment_B38.978.971.490.224
Treatment_A:Treatment_B318.0089.0041.4960.227
Residuals155933.0266.02

\begin{tabular}{lllllllll}
\hline
ANOVA Statistics \tabularnewline
  & Df & Sum Sq & Mean Sq & F value & Pr(>F) \tabularnewline
 & 3 &  &  &  &  \tabularnewline
Treatment_A & 3 & 32.397 & 10.799 & 1.794 & 0.151 \tabularnewline
Treatment_B & 3 & 8.97 & 8.97 & 1.49 & 0.224 \tabularnewline
Treatment_A:Treatment_B & 3 & 18.008 & 9.004 & 1.496 & 0.227 \tabularnewline
Residuals & 155 & 933.026 & 6.02 &   &   \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=299228&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]32.397[/C][C]10.799[/C][C]1.794[/C][C]0.151[/C][/ROW]
[ROW][C]Treatment_B[/C][C]3[/C][C]8.97[/C][C]8.97[/C][C]1.49[/C][C]0.224[/C][/ROW]
[ROW][C]Treatment_A:Treatment_B[/C][C]3[/C][C]18.008[/C][C]9.004[/C][C]1.496[/C][C]0.227[/C][/ROW]
[ROW][C]Residuals[/C][C]155[/C][C]933.026[/C][C]6.02[/C][C] [/C][C] [/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=299228&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=299228&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_A332.39710.7991.7940.151
Treatment_B38.978.971.490.224
Treatment_A:Treatment_B318.0089.0041.4960.227
Residuals155933.0266.02







Tukey Honest Significant Difference Comparisons
difflwruprp adj
3-20.133-6.4486.7141
4-21.617-4.7898.0230.913
5-21.635-4.7988.0680.912
4-31.484-0.2883.2550.135
5-31.501-0.3663.3690.162
5-40.018-1.0841.1191
vrouw-man0.467-0.2951.2280.228
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:man2.294-0.4765.0630.185
5:man-3:man2.496-0.3935.3850.145
2:vrouw-3:man0.889-7.0588.8361
3:vrouw-3:man2.556-1.4186.5290.501
4:vrouw-3:man2.677-0.0445.3990.057
5:vrouw-3:man2.556-0.3915.5020.142
5:man-4:man0.202-1.6372.0421
2:vrouw-4:man-1.405-9.0336.2230.999
3:vrouw-4:man0.262-3.0283.5521
4:vrouw-4:man0.384-1.181.9480.995
5:vrouw-4:man0.262-1.6672.1911
2:vrouw-5:man-1.607-9.286.0650.998
3:vrouw-5:man0.06-3.3323.4511
4:vrouw-5:man0.181-1.5861.9481
5:vrouw-5:man0.06-2.0382.1571
3:vrouw-2:vrouw1.667-6.4769.810.998
4:vrouw-2:vrouw1.788-5.8239.40.996
5:vrouw-2:vrouw1.667-6.0289.3610.998
4:vrouw-3:vrouw0.122-3.1293.3721
5:vrouw-3:vrouw0-3.4413.4411
5:vrouw-4:vrouw-0.122-1.9821.7391

\begin{tabular}{lllllllll}
\hline
Tukey Honest Significant Difference Comparisons \tabularnewline
  & diff & lwr & upr & p adj \tabularnewline
3-2 & 0.133 & -6.448 & 6.714 & 1 \tabularnewline
4-2 & 1.617 & -4.789 & 8.023 & 0.913 \tabularnewline
5-2 & 1.635 & -4.798 & 8.068 & 0.912 \tabularnewline
4-3 & 1.484 & -0.288 & 3.255 & 0.135 \tabularnewline
5-3 & 1.501 & -0.366 & 3.369 & 0.162 \tabularnewline
5-4 & 0.018 & -1.084 & 1.119 & 1 \tabularnewline
vrouw-man & 0.467 & -0.295 & 1.228 & 0.228 \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 & 2.294 & -0.476 & 5.063 & 0.185 \tabularnewline
5:man-3:man & 2.496 & -0.393 & 5.385 & 0.145 \tabularnewline
2:vrouw-3:man & 0.889 & -7.058 & 8.836 & 1 \tabularnewline
3:vrouw-3:man & 2.556 & -1.418 & 6.529 & 0.501 \tabularnewline
4:vrouw-3:man & 2.677 & -0.044 & 5.399 & 0.057 \tabularnewline
5:vrouw-3:man & 2.556 & -0.391 & 5.502 & 0.142 \tabularnewline
5:man-4:man & 0.202 & -1.637 & 2.042 & 1 \tabularnewline
2:vrouw-4:man & -1.405 & -9.033 & 6.223 & 0.999 \tabularnewline
3:vrouw-4:man & 0.262 & -3.028 & 3.552 & 1 \tabularnewline
4:vrouw-4:man & 0.384 & -1.18 & 1.948 & 0.995 \tabularnewline
5:vrouw-4:man & 0.262 & -1.667 & 2.191 & 1 \tabularnewline
2:vrouw-5:man & -1.607 & -9.28 & 6.065 & 0.998 \tabularnewline
3:vrouw-5:man & 0.06 & -3.332 & 3.451 & 1 \tabularnewline
4:vrouw-5:man & 0.181 & -1.586 & 1.948 & 1 \tabularnewline
5:vrouw-5:man & 0.06 & -2.038 & 2.157 & 1 \tabularnewline
3:vrouw-2:vrouw & 1.667 & -6.476 & 9.81 & 0.998 \tabularnewline
4:vrouw-2:vrouw & 1.788 & -5.823 & 9.4 & 0.996 \tabularnewline
5:vrouw-2:vrouw & 1.667 & -6.028 & 9.361 & 0.998 \tabularnewline
4:vrouw-3:vrouw & 0.122 & -3.129 & 3.372 & 1 \tabularnewline
5:vrouw-3:vrouw & 0 & -3.441 & 3.441 & 1 \tabularnewline
5:vrouw-4:vrouw & -0.122 & -1.982 & 1.739 & 1 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=299228&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.133[/C][C]-6.448[/C][C]6.714[/C][C]1[/C][/ROW]
[ROW][C]4-2[/C][C]1.617[/C][C]-4.789[/C][C]8.023[/C][C]0.913[/C][/ROW]
[ROW][C]5-2[/C][C]1.635[/C][C]-4.798[/C][C]8.068[/C][C]0.912[/C][/ROW]
[ROW][C]4-3[/C][C]1.484[/C][C]-0.288[/C][C]3.255[/C][C]0.135[/C][/ROW]
[ROW][C]5-3[/C][C]1.501[/C][C]-0.366[/C][C]3.369[/C][C]0.162[/C][/ROW]
[ROW][C]5-4[/C][C]0.018[/C][C]-1.084[/C][C]1.119[/C][C]1[/C][/ROW]
[ROW][C]vrouw-man[/C][C]0.467[/C][C]-0.295[/C][C]1.228[/C][C]0.228[/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]2.294[/C][C]-0.476[/C][C]5.063[/C][C]0.185[/C][/ROW]
[ROW][C]5:man-3:man[/C][C]2.496[/C][C]-0.393[/C][C]5.385[/C][C]0.145[/C][/ROW]
[ROW][C]2:vrouw-3:man[/C][C]0.889[/C][C]-7.058[/C][C]8.836[/C][C]1[/C][/ROW]
[ROW][C]3:vrouw-3:man[/C][C]2.556[/C][C]-1.418[/C][C]6.529[/C][C]0.501[/C][/ROW]
[ROW][C]4:vrouw-3:man[/C][C]2.677[/C][C]-0.044[/C][C]5.399[/C][C]0.057[/C][/ROW]
[ROW][C]5:vrouw-3:man[/C][C]2.556[/C][C]-0.391[/C][C]5.502[/C][C]0.142[/C][/ROW]
[ROW][C]5:man-4:man[/C][C]0.202[/C][C]-1.637[/C][C]2.042[/C][C]1[/C][/ROW]
[ROW][C]2:vrouw-4:man[/C][C]-1.405[/C][C]-9.033[/C][C]6.223[/C][C]0.999[/C][/ROW]
[ROW][C]3:vrouw-4:man[/C][C]0.262[/C][C]-3.028[/C][C]3.552[/C][C]1[/C][/ROW]
[ROW][C]4:vrouw-4:man[/C][C]0.384[/C][C]-1.18[/C][C]1.948[/C][C]0.995[/C][/ROW]
[ROW][C]5:vrouw-4:man[/C][C]0.262[/C][C]-1.667[/C][C]2.191[/C][C]1[/C][/ROW]
[ROW][C]2:vrouw-5:man[/C][C]-1.607[/C][C]-9.28[/C][C]6.065[/C][C]0.998[/C][/ROW]
[ROW][C]3:vrouw-5:man[/C][C]0.06[/C][C]-3.332[/C][C]3.451[/C][C]1[/C][/ROW]
[ROW][C]4:vrouw-5:man[/C][C]0.181[/C][C]-1.586[/C][C]1.948[/C][C]1[/C][/ROW]
[ROW][C]5:vrouw-5:man[/C][C]0.06[/C][C]-2.038[/C][C]2.157[/C][C]1[/C][/ROW]
[ROW][C]3:vrouw-2:vrouw[/C][C]1.667[/C][C]-6.476[/C][C]9.81[/C][C]0.998[/C][/ROW]
[ROW][C]4:vrouw-2:vrouw[/C][C]1.788[/C][C]-5.823[/C][C]9.4[/C][C]0.996[/C][/ROW]
[ROW][C]5:vrouw-2:vrouw[/C][C]1.667[/C][C]-6.028[/C][C]9.361[/C][C]0.998[/C][/ROW]
[ROW][C]4:vrouw-3:vrouw[/C][C]0.122[/C][C]-3.129[/C][C]3.372[/C][C]1[/C][/ROW]
[ROW][C]5:vrouw-3:vrouw[/C][C]0[/C][C]-3.441[/C][C]3.441[/C][C]1[/C][/ROW]
[ROW][C]5:vrouw-4:vrouw[/C][C]-0.122[/C][C]-1.982[/C][C]1.739[/C][C]1[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=299228&T=3

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=299228&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-20.133-6.4486.7141
4-21.617-4.7898.0230.913
5-21.635-4.7988.0680.912
4-31.484-0.2883.2550.135
5-31.501-0.3663.3690.162
5-40.018-1.0841.1191
vrouw-man0.467-0.2951.2280.228
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:man2.294-0.4765.0630.185
5:man-3:man2.496-0.3935.3850.145
2:vrouw-3:man0.889-7.0588.8361
3:vrouw-3:man2.556-1.4186.5290.501
4:vrouw-3:man2.677-0.0445.3990.057
5:vrouw-3:man2.556-0.3915.5020.142
5:man-4:man0.202-1.6372.0421
2:vrouw-4:man-1.405-9.0336.2230.999
3:vrouw-4:man0.262-3.0283.5521
4:vrouw-4:man0.384-1.181.9480.995
5:vrouw-4:man0.262-1.6672.1911
2:vrouw-5:man-1.607-9.286.0650.998
3:vrouw-5:man0.06-3.3323.4511
4:vrouw-5:man0.181-1.5861.9481
5:vrouw-5:man0.06-2.0382.1571
3:vrouw-2:vrouw1.667-6.4769.810.998
4:vrouw-2:vrouw1.788-5.8239.40.996
5:vrouw-2:vrouw1.667-6.0289.3610.998
4:vrouw-3:vrouw0.122-3.1293.3721
5:vrouw-3:vrouw0-3.4413.4411
5:vrouw-4:vrouw-0.122-1.9821.7391







Levenes Test for Homogeneity of Variance
DfF valuePr(>F)
Group61.370.23
155

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

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



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