Free Statistics

of Irreproducible Research!

Author's title

Author*The author of this computation has been verified*
R Software Modulerwasp_One Factor ANOVA.wasp
Title produced by softwareOne-Way-Between-Groups ANOVA- Free Statistics Software (Calculator)
Date of computationMon, 23 Jan 2012 09:42:17 -0500
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2012/Jan/23/t1327329796vjwi3pift744r96.htm/, Retrieved Sat, 04 May 2024 05:22:53 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=161311, Retrieved Sat, 04 May 2024 05:22:53 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact122
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Aston University Statistical Software] [Test of Two Means] [2009-11-10 17:16:17] [98fd0e87c3eb04e0cc2efde01dbafab6]
- R P   [Aston University Statistical Software] [Compare Two Means] [2009-11-11 08:09:40] [74be16979710d4c4e7c6647856088456]
-    D    [Aston University Statistical Software] [PY2236 Week 6 dat...] [2009-11-11 12:53:10] [74be16979710d4c4e7c6647856088456]
-   P       [T-Tests] [Week 9 PY2236] [2010-11-24 14:41:08] [74be16979710d4c4e7c6647856088456]
-    D        [T-Tests] [PY2236 Week 9 Dat...] [2010-11-30 18:04:40] [74be16979710d4c4e7c6647856088456]
- RMPD          [T-Tests] [Part 1 categeory ...] [2012-01-23 14:05:10] [a4caa626434360c3dd87349f301be56d]
- RMPD            [One-Way-Between-Groups ANOVA- Free Statistics Software (Calculator)] [Part 1 categeory ...] [2012-01-23 14:37:36] [a4caa626434360c3dd87349f301be56d]
- R P                 [One-Way-Between-Groups ANOVA- Free Statistics Software (Calculator)] [part 1 category v...] [2012-01-23 14:42:17] [0a2565fd5e770bdc06b465fc72a06913] [Current]
Feedback Forum

Post a new message
Dataseries X:
11	1	7	5
12	0	6	6
12	0	10	2
12	0	9	3
12	0	7	5
12	0	9	3
11	1	8	4
10	2	8	4
8	4	6	6
9	3	11	1
12	0	8	4
11	1	12	0
12	0	10	2
12	0	8	4
12	0	10	2
12	0	9	3
12	0	8	4
11	1	9	3
12	0	12	0
11	1	9	3
12	0	5	7
11	1	9	3
12	0	8	4
11	1	10	2
12	0	10	2
12	0	5	7
11	1	11	1
11	1	11	1
12	0	11	1
10	2	7	5
12	0	8	4
5	7	5	7
12	0	6	6
12	0	9	3
12	0	11	1
12	0	11	1
12	0	11	1
12	0	11	1
12	0	9	3
12	0	8	4
12	0	11	1
10	2	9	3
12	0	5	7
11	1	8	4
12	0	10	2
11	1	8	4
12	0	8	4
12	0	9	3
12	0	9	3
4	8	5	7
11	1	7	5
10	2	12	0
12	0	10	2
12	0	8	4
3	9	6	6
12	0	9	3
8	4	7	5
2	10	8	4
7	5	2	10
9	3	7	5
10	2	6	6
12	0	10	2
12	0	10	2
9	3	6	6
10	2	10	2
10	2	10	2
11	1	8	4
9	3	8	4
11	1	9	3
10	2	9	3
11	1	10	2
11	1	10	2
12	0	12	0
12	0	11	1
11	1	9	3
6	6	7	5
12	0	9	3
8	4	7	5
12	0	11	1
11	1	10	2
12	0	8	4
11	1	7	5
12	0	12	0
11	1	9	3
12	0	12	0
5	7	2	10
4	8	7	5
12	0	12	0
8	4	8	4
12	0	8	4
12	0	10	2
12	0	10	2
10	2	10	2
11	1	10	2
11	1	4	8
10	2	5	7
6	6	6	6




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

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







ANOVA Model
P1Cat ~ P2Cat
means11.3890.1570.183-5.389-0.389-2.222-2.817-2.389-0.6670.023

\begin{tabular}{lllllllll}
\hline
ANOVA Model \tabularnewline
P1Cat  ~  P2Cat \tabularnewline
means & 11.389 & 0.157 & 0.183 & -5.389 & -0.389 & -2.222 & -2.817 & -2.389 & -0.667 & 0.023 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=161311&T=1

[TABLE]
[ROW][C]ANOVA Model[/C][/ROW]
[ROW][C]P1Cat  ~  P2Cat[/C][/ROW]
[ROW][C]means[/C][C]11.389[/C][C]0.157[/C][C]0.183[/C][C]-5.389[/C][C]-0.389[/C][C]-2.222[/C][C]-2.817[/C][C]-2.389[/C][C]-0.667[/C][C]0.023[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=161311&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=161311&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
P1Cat ~ P2Cat
means11.3890.1570.183-5.389-0.389-2.222-2.817-2.389-0.6670.023







ANOVA Statistics
DfSum SqMean SqF valuePr(>F)
P2Cat9148.32416.484.3850
Residuals87326.9963.759

\begin{tabular}{lllllllll}
\hline
ANOVA Statistics \tabularnewline
  & Df & Sum Sq & Mean Sq & F value & Pr(>F) \tabularnewline
P2Cat & 9 & 148.324 & 16.48 & 4.385 & 0 \tabularnewline
Residuals & 87 & 326.996 & 3.759 &   &   \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=161311&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]P2Cat[/C][C]9[/C][C]148.324[/C][C]16.48[/C][C]4.385[/C][C]0[/C][/ROW]
[ROW][C]Residuals[/C][C]87[/C][C]326.996[/C][C]3.759[/C][C] [/C][C] [/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=161311&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=161311&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)
P2Cat9148.32416.484.3850
Residuals87326.9963.759







Tukey Honest Significant Difference Comparisons
difflwruprp adj
11-100.157-2.2532.5661
12-100.183-2.6222.9871
2-10-5.389-10.081-0.6970.012
4-10-0.389-6.8576.0791
5-10-2.222-5.190.7450.321
6-10-2.817-5.622-0.0130.048
7-10-2.389-4.8720.0940.069
8-10-0.667-2.7651.4320.989
9-100.023-2.1062.1521
12-110.026-3.0183.071
2-11-5.545-10.385-0.7060.012
4-11-0.545-7.1216.031
5-11-2.379-5.5740.8160.329
6-11-2.974-6.0180.070.061
7-11-2.545-5.2960.2050.094
8-11-0.823-3.2331.5860.982
9-11-0.134-2.572.3021
2-12-5.571-10.619-0.5240.019
4-12-0.571-7.3026.1591
5-12-2.405-5.9071.0980.445
6-12-3-6.3650.3650.123
7-12-2.571-5.6740.5310.194
8-12-0.849-3.6531.9550.993
9-12-0.16-2.9872.6681
4-25-2.7112.710.529
5-23.167-1.9748.3070.601
6-22.571-2.4767.6190.817
7-23-1.8767.8760.603
8-24.7220.039.4150.047
9-25.4120.70610.1180.012
5-4-1.833-8.6334.9670.997
6-4-2.429-9.1594.3020.975
7-4-2-8.6034.6030.992
8-4-0.278-6.7466.191
9-40.412-6.0666.891
6-5-0.595-4.0982.9071
7-5-0.167-3.4183.0841
8-51.556-1.4124.5230.791
9-52.245-0.7445.2350.317
7-60.429-2.6743.5311
8-62.151-0.6534.9550.288
9-62.840.0135.6680.048
8-71.722-0.7614.2050.43
9-72.412-0.0974.9210.07
9-80.69-1.442.8190.988

\begin{tabular}{lllllllll}
\hline
Tukey Honest Significant Difference Comparisons \tabularnewline
  & diff & lwr & upr & p adj \tabularnewline
11-10 & 0.157 & -2.253 & 2.566 & 1 \tabularnewline
12-10 & 0.183 & -2.622 & 2.987 & 1 \tabularnewline
2-10 & -5.389 & -10.081 & -0.697 & 0.012 \tabularnewline
4-10 & -0.389 & -6.857 & 6.079 & 1 \tabularnewline
5-10 & -2.222 & -5.19 & 0.745 & 0.321 \tabularnewline
6-10 & -2.817 & -5.622 & -0.013 & 0.048 \tabularnewline
7-10 & -2.389 & -4.872 & 0.094 & 0.069 \tabularnewline
8-10 & -0.667 & -2.765 & 1.432 & 0.989 \tabularnewline
9-10 & 0.023 & -2.106 & 2.152 & 1 \tabularnewline
12-11 & 0.026 & -3.018 & 3.07 & 1 \tabularnewline
2-11 & -5.545 & -10.385 & -0.706 & 0.012 \tabularnewline
4-11 & -0.545 & -7.121 & 6.03 & 1 \tabularnewline
5-11 & -2.379 & -5.574 & 0.816 & 0.329 \tabularnewline
6-11 & -2.974 & -6.018 & 0.07 & 0.061 \tabularnewline
7-11 & -2.545 & -5.296 & 0.205 & 0.094 \tabularnewline
8-11 & -0.823 & -3.233 & 1.586 & 0.982 \tabularnewline
9-11 & -0.134 & -2.57 & 2.302 & 1 \tabularnewline
2-12 & -5.571 & -10.619 & -0.524 & 0.019 \tabularnewline
4-12 & -0.571 & -7.302 & 6.159 & 1 \tabularnewline
5-12 & -2.405 & -5.907 & 1.098 & 0.445 \tabularnewline
6-12 & -3 & -6.365 & 0.365 & 0.123 \tabularnewline
7-12 & -2.571 & -5.674 & 0.531 & 0.194 \tabularnewline
8-12 & -0.849 & -3.653 & 1.955 & 0.993 \tabularnewline
9-12 & -0.16 & -2.987 & 2.668 & 1 \tabularnewline
4-2 & 5 & -2.71 & 12.71 & 0.529 \tabularnewline
5-2 & 3.167 & -1.974 & 8.307 & 0.601 \tabularnewline
6-2 & 2.571 & -2.476 & 7.619 & 0.817 \tabularnewline
7-2 & 3 & -1.876 & 7.876 & 0.603 \tabularnewline
8-2 & 4.722 & 0.03 & 9.415 & 0.047 \tabularnewline
9-2 & 5.412 & 0.706 & 10.118 & 0.012 \tabularnewline
5-4 & -1.833 & -8.633 & 4.967 & 0.997 \tabularnewline
6-4 & -2.429 & -9.159 & 4.302 & 0.975 \tabularnewline
7-4 & -2 & -8.603 & 4.603 & 0.992 \tabularnewline
8-4 & -0.278 & -6.746 & 6.19 & 1 \tabularnewline
9-4 & 0.412 & -6.066 & 6.89 & 1 \tabularnewline
6-5 & -0.595 & -4.098 & 2.907 & 1 \tabularnewline
7-5 & -0.167 & -3.418 & 3.084 & 1 \tabularnewline
8-5 & 1.556 & -1.412 & 4.523 & 0.791 \tabularnewline
9-5 & 2.245 & -0.744 & 5.235 & 0.317 \tabularnewline
7-6 & 0.429 & -2.674 & 3.531 & 1 \tabularnewline
8-6 & 2.151 & -0.653 & 4.955 & 0.288 \tabularnewline
9-6 & 2.84 & 0.013 & 5.668 & 0.048 \tabularnewline
8-7 & 1.722 & -0.761 & 4.205 & 0.43 \tabularnewline
9-7 & 2.412 & -0.097 & 4.921 & 0.07 \tabularnewline
9-8 & 0.69 & -1.44 & 2.819 & 0.988 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=161311&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]11-10[/C][C]0.157[/C][C]-2.253[/C][C]2.566[/C][C]1[/C][/ROW]
[ROW][C]12-10[/C][C]0.183[/C][C]-2.622[/C][C]2.987[/C][C]1[/C][/ROW]
[ROW][C]2-10[/C][C]-5.389[/C][C]-10.081[/C][C]-0.697[/C][C]0.012[/C][/ROW]
[ROW][C]4-10[/C][C]-0.389[/C][C]-6.857[/C][C]6.079[/C][C]1[/C][/ROW]
[ROW][C]5-10[/C][C]-2.222[/C][C]-5.19[/C][C]0.745[/C][C]0.321[/C][/ROW]
[ROW][C]6-10[/C][C]-2.817[/C][C]-5.622[/C][C]-0.013[/C][C]0.048[/C][/ROW]
[ROW][C]7-10[/C][C]-2.389[/C][C]-4.872[/C][C]0.094[/C][C]0.069[/C][/ROW]
[ROW][C]8-10[/C][C]-0.667[/C][C]-2.765[/C][C]1.432[/C][C]0.989[/C][/ROW]
[ROW][C]9-10[/C][C]0.023[/C][C]-2.106[/C][C]2.152[/C][C]1[/C][/ROW]
[ROW][C]12-11[/C][C]0.026[/C][C]-3.018[/C][C]3.07[/C][C]1[/C][/ROW]
[ROW][C]2-11[/C][C]-5.545[/C][C]-10.385[/C][C]-0.706[/C][C]0.012[/C][/ROW]
[ROW][C]4-11[/C][C]-0.545[/C][C]-7.121[/C][C]6.03[/C][C]1[/C][/ROW]
[ROW][C]5-11[/C][C]-2.379[/C][C]-5.574[/C][C]0.816[/C][C]0.329[/C][/ROW]
[ROW][C]6-11[/C][C]-2.974[/C][C]-6.018[/C][C]0.07[/C][C]0.061[/C][/ROW]
[ROW][C]7-11[/C][C]-2.545[/C][C]-5.296[/C][C]0.205[/C][C]0.094[/C][/ROW]
[ROW][C]8-11[/C][C]-0.823[/C][C]-3.233[/C][C]1.586[/C][C]0.982[/C][/ROW]
[ROW][C]9-11[/C][C]-0.134[/C][C]-2.57[/C][C]2.302[/C][C]1[/C][/ROW]
[ROW][C]2-12[/C][C]-5.571[/C][C]-10.619[/C][C]-0.524[/C][C]0.019[/C][/ROW]
[ROW][C]4-12[/C][C]-0.571[/C][C]-7.302[/C][C]6.159[/C][C]1[/C][/ROW]
[ROW][C]5-12[/C][C]-2.405[/C][C]-5.907[/C][C]1.098[/C][C]0.445[/C][/ROW]
[ROW][C]6-12[/C][C]-3[/C][C]-6.365[/C][C]0.365[/C][C]0.123[/C][/ROW]
[ROW][C]7-12[/C][C]-2.571[/C][C]-5.674[/C][C]0.531[/C][C]0.194[/C][/ROW]
[ROW][C]8-12[/C][C]-0.849[/C][C]-3.653[/C][C]1.955[/C][C]0.993[/C][/ROW]
[ROW][C]9-12[/C][C]-0.16[/C][C]-2.987[/C][C]2.668[/C][C]1[/C][/ROW]
[ROW][C]4-2[/C][C]5[/C][C]-2.71[/C][C]12.71[/C][C]0.529[/C][/ROW]
[ROW][C]5-2[/C][C]3.167[/C][C]-1.974[/C][C]8.307[/C][C]0.601[/C][/ROW]
[ROW][C]6-2[/C][C]2.571[/C][C]-2.476[/C][C]7.619[/C][C]0.817[/C][/ROW]
[ROW][C]7-2[/C][C]3[/C][C]-1.876[/C][C]7.876[/C][C]0.603[/C][/ROW]
[ROW][C]8-2[/C][C]4.722[/C][C]0.03[/C][C]9.415[/C][C]0.047[/C][/ROW]
[ROW][C]9-2[/C][C]5.412[/C][C]0.706[/C][C]10.118[/C][C]0.012[/C][/ROW]
[ROW][C]5-4[/C][C]-1.833[/C][C]-8.633[/C][C]4.967[/C][C]0.997[/C][/ROW]
[ROW][C]6-4[/C][C]-2.429[/C][C]-9.159[/C][C]4.302[/C][C]0.975[/C][/ROW]
[ROW][C]7-4[/C][C]-2[/C][C]-8.603[/C][C]4.603[/C][C]0.992[/C][/ROW]
[ROW][C]8-4[/C][C]-0.278[/C][C]-6.746[/C][C]6.19[/C][C]1[/C][/ROW]
[ROW][C]9-4[/C][C]0.412[/C][C]-6.066[/C][C]6.89[/C][C]1[/C][/ROW]
[ROW][C]6-5[/C][C]-0.595[/C][C]-4.098[/C][C]2.907[/C][C]1[/C][/ROW]
[ROW][C]7-5[/C][C]-0.167[/C][C]-3.418[/C][C]3.084[/C][C]1[/C][/ROW]
[ROW][C]8-5[/C][C]1.556[/C][C]-1.412[/C][C]4.523[/C][C]0.791[/C][/ROW]
[ROW][C]9-5[/C][C]2.245[/C][C]-0.744[/C][C]5.235[/C][C]0.317[/C][/ROW]
[ROW][C]7-6[/C][C]0.429[/C][C]-2.674[/C][C]3.531[/C][C]1[/C][/ROW]
[ROW][C]8-6[/C][C]2.151[/C][C]-0.653[/C][C]4.955[/C][C]0.288[/C][/ROW]
[ROW][C]9-6[/C][C]2.84[/C][C]0.013[/C][C]5.668[/C][C]0.048[/C][/ROW]
[ROW][C]8-7[/C][C]1.722[/C][C]-0.761[/C][C]4.205[/C][C]0.43[/C][/ROW]
[ROW][C]9-7[/C][C]2.412[/C][C]-0.097[/C][C]4.921[/C][C]0.07[/C][/ROW]
[ROW][C]9-8[/C][C]0.69[/C][C]-1.44[/C][C]2.819[/C][C]0.988[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=161311&T=3

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=161311&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
11-100.157-2.2532.5661
12-100.183-2.6222.9871
2-10-5.389-10.081-0.6970.012
4-10-0.389-6.8576.0791
5-10-2.222-5.190.7450.321
6-10-2.817-5.622-0.0130.048
7-10-2.389-4.8720.0940.069
8-10-0.667-2.7651.4320.989
9-100.023-2.1062.1521
12-110.026-3.0183.071
2-11-5.545-10.385-0.7060.012
4-11-0.545-7.1216.031
5-11-2.379-5.5740.8160.329
6-11-2.974-6.0180.070.061
7-11-2.545-5.2960.2050.094
8-11-0.823-3.2331.5860.982
9-11-0.134-2.572.3021
2-12-5.571-10.619-0.5240.019
4-12-0.571-7.3026.1591
5-12-2.405-5.9071.0980.445
6-12-3-6.3650.3650.123
7-12-2.571-5.6740.5310.194
8-12-0.849-3.6531.9550.993
9-12-0.16-2.9872.6681
4-25-2.7112.710.529
5-23.167-1.9748.3070.601
6-22.571-2.4767.6190.817
7-23-1.8767.8760.603
8-24.7220.039.4150.047
9-25.4120.70610.1180.012
5-4-1.833-8.6334.9670.997
6-4-2.429-9.1594.3020.975
7-4-2-8.6034.6030.992
8-4-0.278-6.7466.191
9-40.412-6.0666.891
6-5-0.595-4.0982.9071
7-5-0.167-3.4183.0841
8-51.556-1.4124.5230.791
9-52.245-0.7445.2350.317
7-60.429-2.6743.5311
8-62.151-0.6534.9550.288
9-62.840.0135.6680.048
8-71.722-0.7614.2050.43
9-72.412-0.0974.9210.07
9-80.69-1.442.8190.988







Levenes Test for Homogeneity of Variance
DfF valuePr(>F)
Group92.50.014
87

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

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



Parameters (Session):
par1 = 1 ; par2 = 3 ; par3 = TRUE ;
Parameters (R input):
par1 = 1 ; par2 = 3 ; par3 = TRUE ;
R code (references can be found in the software module):
cat1 <- as.numeric(par1) #
cat2<- as.numeric(par2) #
intercept<-as.logical(par3)
x <- t(x)
x1<-as.numeric(x[,cat1])
f1<-as.character(x[,cat2])
xdf<-data.frame(x1,f1)
(V1<-dimnames(y)[[1]][cat1])
(V2<-dimnames(y)[[1]][cat2])
names(xdf)<-c('Response', 'Treatment')
if(intercept == FALSE) (lmxdf<-lm(Response ~ Treatment - 1, data = xdf) ) else (lmxdf<-lm(Response ~ Treatment, 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, paste(V1, ' ~ ', V2), 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)
a<-table.row.start(a)
a<-table.element(a, V2,,TRUE)
a<-table.element(a, anova.xdf$Df[1],,FALSE)
a<-table.element(a, round(anova.xdf$'Sum Sq'[1], digits=3),,FALSE)
a<-table.element(a, round(anova.xdf$'Mean Sq'[1], digits=3),,FALSE)
a<-table.element(a, round(anova.xdf$'F value'[1], digits=3),,FALSE)
a<-table.element(a, round(anova.xdf$'Pr(>F)'[1], 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[2],,FALSE)
a<-table.element(a, round(anova.xdf$'Sum Sq'[2], digits=3),,FALSE)
a<-table.element(a, round(anova.xdf$'Mean Sq'[2], 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, data=xdf, xlab=V2, ylab=V1)
dev.off()
if(intercept==TRUE){
thsd<-TukeyHSD(aov.xdf)
bitmap(file='TukeyHSDPlot.png')
plot(thsd)
dev.off()
}
if(intercept==TRUE){
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(i in 1:length(rownames(thsd[[1]]))){
a<-table.row.start(a)
a<-table.element(a,rownames(thsd[[1]])[i], 1, TRUE)
for(j in 1:4){
a<-table.element(a,round(thsd[[1]][i,j], digits=3), 1, FALSE)
}
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable2.tab')
}
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')