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:44:24 +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/t1481661961fe3tn0402nbipvh.htm/, Retrieved Sun, 05 May 2024 07:22:09 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=299229, Retrieved Sun, 05 May 2024 07:22:09 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact68
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Two-Way ANOVA] [ITHsum - TVDC4 - ...] [2016-12-13 20:44:24] [86c9a777e8dbb7ef3face68c75fc8376] [Current]
Feedback Forum

Post a new message
Dataseries X:
14	3	'man'
19	3	'vrouw'
17	3	'vrouw'
17	3	'vrouw'
15	4	'man'
20	3	'vrouw'
19	3	'vrouw'
15	4	'man'
15	3	'man'
19	3	'man'
20	4	'man'
18	3	'man'
15	4	'man'
14	3	'vrouw'
20	4	'man'
16	4	'vrouw'
16	3	'vrouw'
10	3	'man'
19	3	'vrouw'
19	3	'vrouw'
16	4	'man'
15	3	'man'
18	4	'man'
17	3	'man'
19	3	'man'
17	3	'man'
19	3	'vrouw'
20	4	'man'
5	2	'man'
19	3	'vrouw'
16	3	'man'
15	3	'man'
16	4	'vrouw'
18	4	'man'
16	4	'man'
15	3	'vrouw'
17	3	'vrouw'
20	3	'vrouw'
19	3	'vrouw'
7	3	'vrouw'
13	3	'vrouw'
16	3	'vrouw'
16	3	'vrouw'
18	3	'vrouw'
18	3	'man'
16	4	'vrouw'
17	3	'vrouw'
19	3	'man'
16	3	'vrouw'
19	3	'man'
13	3	'man'
16	4	'vrouw'
13	3	'man'
12	3	'vrouw'
17	3	'vrouw'
17	3	'vrouw'
17	3	'vrouw'
16	3	'man'
16	2	'vrouw'
14	3	'man'
16	3	'vrouw'
13	4	'man'
16	3	'vrouw'
14	3	'vrouw'
20	3	'vrouw'
12	3	'man'
13	3	'vrouw'
18	4	'man'
14	3	'vrouw'
19	3	'man'
18	3	'vrouw'
14	5	'man'
18	3	'vrouw'
19	3	'vrouw'
15	3	'man'
14	3	'man'
17	4	'man'
19	4	'vrouw'
13	5	'vrouw'
19	4	'vrouw'
18	4	'vrouw'
20	3	'vrouw'
15	4	'man'
15	3	'vrouw'
15	3	'man'
20	3	'man'
15	3	'man'
19	3	'man'
18	3	'vrouw'
18	4	'vrouw'
15	5	'vrouw'
20	4	'man'
17	3	'vrouw'
18	4	'man'
19	3	'man'
20	3	'vrouw'
17	4	'vrouw'
15	4	'vrouw'
16	3	'man'
18	3	'man'
18	4	'man'
14	4	'vrouw'
15	3	'vrouw'
12	3	'vrouw'
17	3	'man'
18	4	'vrouw'
17	3	'man'
17	4	'man'
20	3	'vrouw'
16	3	'man'
14	3	'man'
15	3	'man'
18	4	'vrouw'
20	3	'vrouw'
17	4	'vrouw'
17	3	'vrouw'
17	3	'vrouw'
17	3	'man'
15	3	'man'
17	3	'vrouw'
18	3	'vrouw'
20	5	'man'
15	3	'vrouw'
16	3	'man'
18	5	'man'
15	3	'vrouw'
18	4	'man'
20	3	'man'
19	3	'man'
14	3	'man'
15	3	'man'
17	3	'vrouw'
18	4	'vrouw'
20	4	'vrouw'
17	3	'vrouw'
18	4	'man'
15	3	'man'
16	4	'man'
11	3	'man'
15	3	'vrouw'
18	3	'vrouw'
17	3	'vrouw'
16	3	'vrouw'
12	3	'man'
19	3	'vrouw'
18	4	'man'
15	3	'vrouw'
17	3	'man'
19	4	'man'
18	3	'man'
19	4	'man'
16	3	'man'
16	4	'vrouw'
16	3	'vrouw'
14	5	'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=299229&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=299229&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=299229&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
means511.02112.37511.511-10.259-11.257-13.5

\begin{tabular}{lllllllll}
\hline
ANOVA Model \tabularnewline
Response ~ Treatment_A * Treatment_B \tabularnewline
means & 5 & 11.021 & 12.375 & 11.5 & 11 & -10.259 & -11.257 & -13.5 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=299229&T=1

[TABLE]
[ROW][C]ANOVA Model[/C][/ROW]
[ROW][C]Response ~ Treatment_A * Treatment_B[/C][/ROW]
[ROW][C]means[/C][C]5[/C][C]11.021[/C][C]12.375[/C][C]11.5[/C][C]11[/C][C]-10.259[/C][C]-11.257[/C][C]-13.5[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=299229&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=299229&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
means511.02112.37511.511-10.259-11.257-13.5







ANOVA Statistics
DfSum SqMean SqF valuePr(>F)
3
Treatment_A3100.46733.4896.4260
Treatment_B39.5169.5161.8260.179
Treatment_A:Treatment_B374.35824.7864.7560.003
Residuals147766.0465.211

\begin{tabular}{lllllllll}
\hline
ANOVA Statistics \tabularnewline
  & Df & Sum Sq & Mean Sq & F value & Pr(>F) \tabularnewline
 & 3 &  &  &  &  \tabularnewline
Treatment_A & 3 & 100.467 & 33.489 & 6.426 & 0 \tabularnewline
Treatment_B & 3 & 9.516 & 9.516 & 1.826 & 0.179 \tabularnewline
Treatment_A:Treatment_B & 3 & 74.358 & 24.786 & 4.756 & 0.003 \tabularnewline
Residuals & 147 & 766.046 & 5.211 &   &   \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=299229&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]100.467[/C][C]33.489[/C][C]6.426[/C][C]0[/C][/ROW]
[ROW][C]Treatment_B[/C][C]3[/C][C]9.516[/C][C]9.516[/C][C]1.826[/C][C]0.179[/C][/ROW]
[ROW][C]Treatment_A:Treatment_B[/C][C]3[/C][C]74.358[/C][C]24.786[/C][C]4.756[/C][C]0.003[/C][/ROW]
[ROW][C]Residuals[/C][C]147[/C][C]766.046[/C][C]5.211[/C][C] [/C][C] [/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=299229&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=299229&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_A3100.46733.4896.4260
Treatment_B39.5169.5161.8260.179
Treatment_A:Treatment_B374.35824.7864.7560.003
Residuals147766.0465.211







Tukey Honest Significant Difference Comparisons
difflwruprp adj
3-25.9341.710.1680.002
4-26.7682.47211.0640
5-25.1670.32310.010.032
4-30.834-0.2571.9250.197
5-3-0.767-3.2571.7220.854
5-4-1.602-4.1950.9910.379
vrouw-man0.491-0.2341.2150.183
3:man-2:man11.0213.92718.1150
4:man-2:man12.3755.2119.540
5:man-2:man11.53.65219.3480
2:vrouw-2:man111.07220.9280.019
3:vrouw-2:man11.7634.68418.8420
4:vrouw-2:man12.1184.89419.3410
5:vrouw-2:man90.40317.5970.033
4:man-3:man1.354-0.4073.1150.267
5:man-3:man0.479-3.1774.1351
2:vrouw-3:man-0.021-7.1157.0731
3:vrouw-3:man0.741-0.6312.1140.712
4:vrouw-3:man1.096-0.893.0830.689
5:vrouw-3:man-2.021-7.093.0470.923
5:man-4:man-0.875-4.6662.9160.997
2:vrouw-4:man-1.375-8.545.790.999
3:vrouw-4:man-0.612-2.3121.0870.954
4:vrouw-4:man-0.257-2.4831.9681
5:vrouw-4:man-3.375-8.5411.7910.48
2:vrouw-5:man-0.5-8.3487.3481
3:vrouw-5:man0.263-3.3643.891
4:vrouw-5:man0.618-3.2834.5191
5:vrouw-5:man-2.5-8.5793.5790.91
3:vrouw-2:vrouw0.763-6.3167.8421
4:vrouw-2:vrouw1.118-6.1068.3411
5:vrouw-2:vrouw-2-10.5976.5970.996
4:vrouw-3:vrouw0.355-1.5772.2870.999
5:vrouw-3:vrouw-2.763-7.812.2840.698
5:vrouw-4:vrouw-3.118-8.3652.130.603

\begin{tabular}{lllllllll}
\hline
Tukey Honest Significant Difference Comparisons \tabularnewline
  & diff & lwr & upr & p adj \tabularnewline
3-2 & 5.934 & 1.7 & 10.168 & 0.002 \tabularnewline
4-2 & 6.768 & 2.472 & 11.064 & 0 \tabularnewline
5-2 & 5.167 & 0.323 & 10.01 & 0.032 \tabularnewline
4-3 & 0.834 & -0.257 & 1.925 & 0.197 \tabularnewline
5-3 & -0.767 & -3.257 & 1.722 & 0.854 \tabularnewline
5-4 & -1.602 & -4.195 & 0.991 & 0.379 \tabularnewline
vrouw-man & 0.491 & -0.234 & 1.215 & 0.183 \tabularnewline
3:man-2:man & 11.021 & 3.927 & 18.115 & 0 \tabularnewline
4:man-2:man & 12.375 & 5.21 & 19.54 & 0 \tabularnewline
5:man-2:man & 11.5 & 3.652 & 19.348 & 0 \tabularnewline
2:vrouw-2:man & 11 & 1.072 & 20.928 & 0.019 \tabularnewline
3:vrouw-2:man & 11.763 & 4.684 & 18.842 & 0 \tabularnewline
4:vrouw-2:man & 12.118 & 4.894 & 19.341 & 0 \tabularnewline
5:vrouw-2:man & 9 & 0.403 & 17.597 & 0.033 \tabularnewline
4:man-3:man & 1.354 & -0.407 & 3.115 & 0.267 \tabularnewline
5:man-3:man & 0.479 & -3.177 & 4.135 & 1 \tabularnewline
2:vrouw-3:man & -0.021 & -7.115 & 7.073 & 1 \tabularnewline
3:vrouw-3:man & 0.741 & -0.631 & 2.114 & 0.712 \tabularnewline
4:vrouw-3:man & 1.096 & -0.89 & 3.083 & 0.689 \tabularnewline
5:vrouw-3:man & -2.021 & -7.09 & 3.047 & 0.923 \tabularnewline
5:man-4:man & -0.875 & -4.666 & 2.916 & 0.997 \tabularnewline
2:vrouw-4:man & -1.375 & -8.54 & 5.79 & 0.999 \tabularnewline
3:vrouw-4:man & -0.612 & -2.312 & 1.087 & 0.954 \tabularnewline
4:vrouw-4:man & -0.257 & -2.483 & 1.968 & 1 \tabularnewline
5:vrouw-4:man & -3.375 & -8.541 & 1.791 & 0.48 \tabularnewline
2:vrouw-5:man & -0.5 & -8.348 & 7.348 & 1 \tabularnewline
3:vrouw-5:man & 0.263 & -3.364 & 3.89 & 1 \tabularnewline
4:vrouw-5:man & 0.618 & -3.283 & 4.519 & 1 \tabularnewline
5:vrouw-5:man & -2.5 & -8.579 & 3.579 & 0.91 \tabularnewline
3:vrouw-2:vrouw & 0.763 & -6.316 & 7.842 & 1 \tabularnewline
4:vrouw-2:vrouw & 1.118 & -6.106 & 8.341 & 1 \tabularnewline
5:vrouw-2:vrouw & -2 & -10.597 & 6.597 & 0.996 \tabularnewline
4:vrouw-3:vrouw & 0.355 & -1.577 & 2.287 & 0.999 \tabularnewline
5:vrouw-3:vrouw & -2.763 & -7.81 & 2.284 & 0.698 \tabularnewline
5:vrouw-4:vrouw & -3.118 & -8.365 & 2.13 & 0.603 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=299229&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]5.934[/C][C]1.7[/C][C]10.168[/C][C]0.002[/C][/ROW]
[ROW][C]4-2[/C][C]6.768[/C][C]2.472[/C][C]11.064[/C][C]0[/C][/ROW]
[ROW][C]5-2[/C][C]5.167[/C][C]0.323[/C][C]10.01[/C][C]0.032[/C][/ROW]
[ROW][C]4-3[/C][C]0.834[/C][C]-0.257[/C][C]1.925[/C][C]0.197[/C][/ROW]
[ROW][C]5-3[/C][C]-0.767[/C][C]-3.257[/C][C]1.722[/C][C]0.854[/C][/ROW]
[ROW][C]5-4[/C][C]-1.602[/C][C]-4.195[/C][C]0.991[/C][C]0.379[/C][/ROW]
[ROW][C]vrouw-man[/C][C]0.491[/C][C]-0.234[/C][C]1.215[/C][C]0.183[/C][/ROW]
[ROW][C]3:man-2:man[/C][C]11.021[/C][C]3.927[/C][C]18.115[/C][C]0[/C][/ROW]
[ROW][C]4:man-2:man[/C][C]12.375[/C][C]5.21[/C][C]19.54[/C][C]0[/C][/ROW]
[ROW][C]5:man-2:man[/C][C]11.5[/C][C]3.652[/C][C]19.348[/C][C]0[/C][/ROW]
[ROW][C]2:vrouw-2:man[/C][C]11[/C][C]1.072[/C][C]20.928[/C][C]0.019[/C][/ROW]
[ROW][C]3:vrouw-2:man[/C][C]11.763[/C][C]4.684[/C][C]18.842[/C][C]0[/C][/ROW]
[ROW][C]4:vrouw-2:man[/C][C]12.118[/C][C]4.894[/C][C]19.341[/C][C]0[/C][/ROW]
[ROW][C]5:vrouw-2:man[/C][C]9[/C][C]0.403[/C][C]17.597[/C][C]0.033[/C][/ROW]
[ROW][C]4:man-3:man[/C][C]1.354[/C][C]-0.407[/C][C]3.115[/C][C]0.267[/C][/ROW]
[ROW][C]5:man-3:man[/C][C]0.479[/C][C]-3.177[/C][C]4.135[/C][C]1[/C][/ROW]
[ROW][C]2:vrouw-3:man[/C][C]-0.021[/C][C]-7.115[/C][C]7.073[/C][C]1[/C][/ROW]
[ROW][C]3:vrouw-3:man[/C][C]0.741[/C][C]-0.631[/C][C]2.114[/C][C]0.712[/C][/ROW]
[ROW][C]4:vrouw-3:man[/C][C]1.096[/C][C]-0.89[/C][C]3.083[/C][C]0.689[/C][/ROW]
[ROW][C]5:vrouw-3:man[/C][C]-2.021[/C][C]-7.09[/C][C]3.047[/C][C]0.923[/C][/ROW]
[ROW][C]5:man-4:man[/C][C]-0.875[/C][C]-4.666[/C][C]2.916[/C][C]0.997[/C][/ROW]
[ROW][C]2:vrouw-4:man[/C][C]-1.375[/C][C]-8.54[/C][C]5.79[/C][C]0.999[/C][/ROW]
[ROW][C]3:vrouw-4:man[/C][C]-0.612[/C][C]-2.312[/C][C]1.087[/C][C]0.954[/C][/ROW]
[ROW][C]4:vrouw-4:man[/C][C]-0.257[/C][C]-2.483[/C][C]1.968[/C][C]1[/C][/ROW]
[ROW][C]5:vrouw-4:man[/C][C]-3.375[/C][C]-8.541[/C][C]1.791[/C][C]0.48[/C][/ROW]
[ROW][C]2:vrouw-5:man[/C][C]-0.5[/C][C]-8.348[/C][C]7.348[/C][C]1[/C][/ROW]
[ROW][C]3:vrouw-5:man[/C][C]0.263[/C][C]-3.364[/C][C]3.89[/C][C]1[/C][/ROW]
[ROW][C]4:vrouw-5:man[/C][C]0.618[/C][C]-3.283[/C][C]4.519[/C][C]1[/C][/ROW]
[ROW][C]5:vrouw-5:man[/C][C]-2.5[/C][C]-8.579[/C][C]3.579[/C][C]0.91[/C][/ROW]
[ROW][C]3:vrouw-2:vrouw[/C][C]0.763[/C][C]-6.316[/C][C]7.842[/C][C]1[/C][/ROW]
[ROW][C]4:vrouw-2:vrouw[/C][C]1.118[/C][C]-6.106[/C][C]8.341[/C][C]1[/C][/ROW]
[ROW][C]5:vrouw-2:vrouw[/C][C]-2[/C][C]-10.597[/C][C]6.597[/C][C]0.996[/C][/ROW]
[ROW][C]4:vrouw-3:vrouw[/C][C]0.355[/C][C]-1.577[/C][C]2.287[/C][C]0.999[/C][/ROW]
[ROW][C]5:vrouw-3:vrouw[/C][C]-2.763[/C][C]-7.81[/C][C]2.284[/C][C]0.698[/C][/ROW]
[ROW][C]5:vrouw-4:vrouw[/C][C]-3.118[/C][C]-8.365[/C][C]2.13[/C][C]0.603[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=299229&T=3

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=299229&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-25.9341.710.1680.002
4-26.7682.47211.0640
5-25.1670.32310.010.032
4-30.834-0.2571.9250.197
5-3-0.767-3.2571.7220.854
5-4-1.602-4.1950.9910.379
vrouw-man0.491-0.2341.2150.183
3:man-2:man11.0213.92718.1150
4:man-2:man12.3755.2119.540
5:man-2:man11.53.65219.3480
2:vrouw-2:man111.07220.9280.019
3:vrouw-2:man11.7634.68418.8420
4:vrouw-2:man12.1184.89419.3410
5:vrouw-2:man90.40317.5970.033
4:man-3:man1.354-0.4073.1150.267
5:man-3:man0.479-3.1774.1351
2:vrouw-3:man-0.021-7.1157.0731
3:vrouw-3:man0.741-0.6312.1140.712
4:vrouw-3:man1.096-0.893.0830.689
5:vrouw-3:man-2.021-7.093.0470.923
5:man-4:man-0.875-4.6662.9160.997
2:vrouw-4:man-1.375-8.545.790.999
3:vrouw-4:man-0.612-2.3121.0870.954
4:vrouw-4:man-0.257-2.4831.9681
5:vrouw-4:man-3.375-8.5411.7910.48
2:vrouw-5:man-0.5-8.3487.3481
3:vrouw-5:man0.263-3.3643.891
4:vrouw-5:man0.618-3.2834.5191
5:vrouw-5:man-2.5-8.5793.5790.91
3:vrouw-2:vrouw0.763-6.3167.8421
4:vrouw-2:vrouw1.118-6.1068.3411
5:vrouw-2:vrouw-2-10.5976.5970.996
4:vrouw-3:vrouw0.355-1.5772.2870.999
5:vrouw-3:vrouw-2.763-7.812.2840.698
5:vrouw-4:vrouw-3.118-8.3652.130.603







Levenes Test for Homogeneity of Variance
DfF valuePr(>F)
Group71.0950.369
147

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

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



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