Free Statistics

of Irreproducible Research!

Author's title

Author*The author of this computation has been verified*
R Software Module--
Title produced by softwareTwo-Way ANOVA
Date of computationSun, 11 Dec 2011 03:36:38 -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/2011/Dec/11/t1323593019whbhqhv5bz1lhoz.htm/, Retrieved Sun, 28 Apr 2024 19:37:09 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=153646, Retrieved Sun, 28 Apr 2024 19:37:09 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact139
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Two-Way ANOVA] [] [2010-11-02 14:42:14] [b98453cac15ba1066b407e146608df68]
- R PD  [Two-Way ANOVA] [] [2011-12-11 08:35:33] [80bca13c5f9401fbb753952fd2952f4a]
- RM        [Two-Way ANOVA] [] [2011-12-11 08:36:38] [204816f6f70a8d342ddc2b9d4f4a80d3] [Current]
Feedback Forum

Post a new message
Dataseries X:
0	0	'E'	0	1
0	1	'F'	1	0
0	0	'F'	0	1
0	0	'H'	0	1
0	0	'H'	0	1
0	0	'H'	0	1
0	1	'E'	1	1
0	1	'F'	1	1
0	0	'E'	0	1
0	1	'F'	1	0
0	0	'H'	0	0
0	0	'E'	0	0
0	1	'F'	1	1
0	0	'H'	0	0
0	1	'E'	1	0
0	0	'H'	0	0
0	0	'E'	0	1
0	0	'F'	0	1
0	0	'H'	0	0
0	1	'F'	1	0
0	0	'H'	0	0
0	0	'H'	0	1
0	0	'H'	0	0
0	0	'E'	0	0
0	1	'F'	1	0
0	1	'E'	1	0
0	1	'E'	1	0
1	1	'F'	0	1
0	0	'F'	0	0
0	0	'H'	0	0
0	0	'E'	0	1
0	1	'E'	1	1
0	0	'H'	0	1
0	1	'E'	1	1
0	1	'F'	1	1
0	0	'E'	0	1
0	1	'F'	1	0
0	0	'H'	0	0
0	1	'E'	1	0
0	1	'F'	1	0
0	1	'F'	1	0
0	0	'F'	0	0
0	1	'F'	1	0
0	1	'H'	1	1
0	1	'E'	1	0
0	0	'E'	0	0
0	0	'H'	0	0
0	1	'E'	1	1
0	0	'F'	0	1
0	0	'F'	0	0
0	0	'H'	0	0
0	0	'E'	0	1
0	1	'F'	1	1
0	1	'E'	1	1
0	0	'H'	0	1
0	0	'H'	0	1
0	0	'H'	0	1
0	0	'E'	0	1
0	0	'H'	0	0
0	1	'E'	1	0
0	0	'H'	0	1
0	0	'F'	0	1
0	0	'H'	0	1
0	1	'F'	1	0
0	0	'E'	0	1
0	1	'E'	1	1
0	0	'F'	0	0
0	0	'H'	0	1
0	0	'F'	0	0
0	0	'E'	0	1
1	0	'E'	-1	1
0	0	'H'	0	0
0	0	'H'	0	1
0	0	'F'	0	1
0	0	'H'	0	1
0	1	'E'	1	0
0	0	'F'	0	1
0	1	'E'	1	0
0	0	'E'	0	0
0	0	'E'	0	0
0	0	'F'	0	1
0	0	'E'	0	1
0	1	'F'	1	1
0	0	'H'	0	1
1	1	'H'	0	1
0	0	'H'	0	1
0	0	'F'	0	0
0	0	'H'	0	1
0	0	'H'	0	1
0	1	'F'	1	1
0	1	'F'	1	1
0	0	'H'	0	0
0	0	'F'	0	1
0	0	'H'	0	1
0	0	'E'	0	0
0	1	'F'	1	1
0	0	'E'	0	0
0	0	'H'	0	1
0	1	'F'	1	1
1	1	'F'	0	1
0	0	'H'	0	1
0	1	'E'	1	1
0	0	'F'	0	0
0	0	'H'	0	1
0	0	'E'	0	1
0	0	'F'	0	0
0	0	'H'	0	0
0	0	'H'	0	1
0	1	'F'	1	1
0	1	'F'	1	1
0	0	'H'	0	1
0	0	'E'	0	0
0	0	'H'	0	1
0	0	'E'	0	1
0	0	'E'	0	0
0	0	'F'	0	1
0	0	'F'	0	1




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Gwilym Jenkins' @ jenkins.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 & 2 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ jenkins.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=153646&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]2 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Gwilym Jenkins' @ jenkins.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=153646&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=153646&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 time2 seconds
R Server'Gwilym Jenkins' @ jenkins.wessa.net







ANOVA Model
xdf2$diff ~ xdf2$treat * xdf2$gender
names(Intercept)xdf2$treatFxdf2$treatHxdf2$gender1xdf2$treatF:xdf2$gender1xdf2$treatH:xdf2$gender1
means0.470590.058824-0.47059-0.170590.119440.20905

\begin{tabular}{lllllllll}
\hline
ANOVA Model \tabularnewline
xdf2$diff ~ xdf2$treat * xdf2$gender \tabularnewline
names & (Intercept) & xdf2$treatF & xdf2$treatH & xdf2$gender1 & xdf2$treatF:xdf2$gender1 & xdf2$treatH:xdf2$gender1 \tabularnewline
means & 0.47059 & 0.058824 & -0.47059 & -0.17059 & 0.11944 & 0.20905 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=153646&T=1

[TABLE]
[ROW][C]ANOVA Model[/C][/ROW]
[ROW][C]xdf2$diff ~ xdf2$treat * xdf2$gender[/C][/ROW]
[ROW][C]names[/C][C](Intercept)[/C][C]xdf2$treatF[/C][C]xdf2$treatH[/C][C]xdf2$gender1[/C][C]xdf2$treatF:xdf2$gender1[/C][C]xdf2$treatH:xdf2$gender1[/C][/ROW]
[ROW][C]means[/C][C]0.47059[/C][C]0.058824[/C][C]-0.47059[/C][C]-0.17059[/C][C]0.11944[/C][C]0.20905[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=153646&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=153646&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
xdf2$diff ~ xdf2$treat * xdf2$gender
names(Intercept)xdf2$treatFxdf2$treatHxdf2$gender1xdf2$treatF:xdf2$gender1xdf2$treatH:xdf2$gender1
means0.470590.058824-0.47059-0.170590.119440.20905







ANOVA Statistics
DfSum SqMean SqF valuePr(>F)
2
xdf2$treat24.85222.426112.6011.1702e-05
xdf2$gender20.105120.105120.545970.46153
xdf2$treat:xdf2$gender20.201330.100660.522840.59429
Residuals11121.3710.19253

\begin{tabular}{lllllllll}
\hline
ANOVA Statistics \tabularnewline
  & Df & Sum Sq & Mean Sq & F value & Pr(>F) \tabularnewline
 & 2 &  &  &  &  \tabularnewline
xdf2$treat & 2 & 4.8522 & 2.4261 & 12.601 & 1.1702e-05 \tabularnewline
xdf2$gender & 2 & 0.10512 & 0.10512 & 0.54597 & 0.46153 \tabularnewline
xdf2$treat:xdf2$gender & 2 & 0.20133 & 0.10066 & 0.52284 & 0.59429 \tabularnewline
Residuals & 111 & 21.371 & 0.19253 &   &   \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=153646&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]2[/C][C][/C][C][/C][C][/C][C][/C][/ROW]
[ROW][C]xdf2$treat[/C][C]2[/C][C]4.8522[/C][C]2.4261[/C][C]12.601[/C][C]1.1702e-05[/C][/ROW]
[ROW][C]xdf2$gender[/C][C]2[/C][C]0.10512[/C][C]0.10512[/C][C]0.54597[/C][C]0.46153[/C][/ROW]
[ROW][C]xdf2$treat:xdf2$gender[/C][C]2[/C][C]0.20133[/C][C]0.10066[/C][C]0.52284[/C][C]0.59429[/C][/ROW]
[ROW][C]Residuals[/C][C]111[/C][C]21.371[/C][C]0.19253[/C][C] [/C][C] [/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=153646&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=153646&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)
2
xdf2$treat24.85222.426112.6011.1702e-05
xdf2$gender20.105120.105120.545970.46153
xdf2$treat:xdf2$gender20.201330.100660.522840.59429
Residuals11121.3710.19253







Tukey Honest Significant Difference Comparisons
difflwruprp adj
F-E0.12162-0.116140.359380.44675
H-E-0.35338-0.59114-0.115620.0017382
H-F-0.475-0.70808-0.241921.2489e-05
1-0-0.060675-0.22410.102750.46346
F:0-E:00.058824-0.377650.49530.99879
H:0-E:0-0.47059-0.92985-0.0113250.041248
E:1-E:0-0.17059-0.590380.24920.84618
F:1-E:00.0076726-0.399340.414691
H:1-E:0-0.43213-0.82904-0.0352170.024446
H:0-F:0-0.52941-0.98867-0.0701490.014038
E:1-F:0-0.22941-0.64920.190380.61018
F:1-F:0-0.051151-0.458170.355860.99914
H:1-F:0-0.49095-0.88786-0.094040.0064674
E:1-H:00.3-0.143430.743430.37075
F:1-H:00.478260.0468990.909620.020626
H:1-H:00.038462-0.383380.46030.99982
F:1-E:10.17826-0.210810.567330.76848
H:1-E:1-0.26154-0.640020.116940.34671
H:1-F:1-0.4398-0.80406-0.0755350.008539

\begin{tabular}{lllllllll}
\hline
Tukey Honest Significant Difference Comparisons \tabularnewline
  & diff & lwr & upr & p adj \tabularnewline
F-E & 0.12162 & -0.11614 & 0.35938 & 0.44675 \tabularnewline
H-E & -0.35338 & -0.59114 & -0.11562 & 0.0017382 \tabularnewline
H-F & -0.475 & -0.70808 & -0.24192 & 1.2489e-05 \tabularnewline
1-0 & -0.060675 & -0.2241 & 0.10275 & 0.46346 \tabularnewline
F:0-E:0 & 0.058824 & -0.37765 & 0.4953 & 0.99879 \tabularnewline
H:0-E:0 & -0.47059 & -0.92985 & -0.011325 & 0.041248 \tabularnewline
E:1-E:0 & -0.17059 & -0.59038 & 0.2492 & 0.84618 \tabularnewline
F:1-E:0 & 0.0076726 & -0.39934 & 0.41469 & 1 \tabularnewline
H:1-E:0 & -0.43213 & -0.82904 & -0.035217 & 0.024446 \tabularnewline
H:0-F:0 & -0.52941 & -0.98867 & -0.070149 & 0.014038 \tabularnewline
E:1-F:0 & -0.22941 & -0.6492 & 0.19038 & 0.61018 \tabularnewline
F:1-F:0 & -0.051151 & -0.45817 & 0.35586 & 0.99914 \tabularnewline
H:1-F:0 & -0.49095 & -0.88786 & -0.09404 & 0.0064674 \tabularnewline
E:1-H:0 & 0.3 & -0.14343 & 0.74343 & 0.37075 \tabularnewline
F:1-H:0 & 0.47826 & 0.046899 & 0.90962 & 0.020626 \tabularnewline
H:1-H:0 & 0.038462 & -0.38338 & 0.4603 & 0.99982 \tabularnewline
F:1-E:1 & 0.17826 & -0.21081 & 0.56733 & 0.76848 \tabularnewline
H:1-E:1 & -0.26154 & -0.64002 & 0.11694 & 0.34671 \tabularnewline
H:1-F:1 & -0.4398 & -0.80406 & -0.075535 & 0.008539 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=153646&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]F-E[/C][C]0.12162[/C][C]-0.11614[/C][C]0.35938[/C][C]0.44675[/C][/ROW]
[ROW][C]H-E[/C][C]-0.35338[/C][C]-0.59114[/C][C]-0.11562[/C][C]0.0017382[/C][/ROW]
[ROW][C]H-F[/C][C]-0.475[/C][C]-0.70808[/C][C]-0.24192[/C][C]1.2489e-05[/C][/ROW]
[ROW][C]1-0[/C][C]-0.060675[/C][C]-0.2241[/C][C]0.10275[/C][C]0.46346[/C][/ROW]
[ROW][C]F:0-E:0[/C][C]0.058824[/C][C]-0.37765[/C][C]0.4953[/C][C]0.99879[/C][/ROW]
[ROW][C]H:0-E:0[/C][C]-0.47059[/C][C]-0.92985[/C][C]-0.011325[/C][C]0.041248[/C][/ROW]
[ROW][C]E:1-E:0[/C][C]-0.17059[/C][C]-0.59038[/C][C]0.2492[/C][C]0.84618[/C][/ROW]
[ROW][C]F:1-E:0[/C][C]0.0076726[/C][C]-0.39934[/C][C]0.41469[/C][C]1[/C][/ROW]
[ROW][C]H:1-E:0[/C][C]-0.43213[/C][C]-0.82904[/C][C]-0.035217[/C][C]0.024446[/C][/ROW]
[ROW][C]H:0-F:0[/C][C]-0.52941[/C][C]-0.98867[/C][C]-0.070149[/C][C]0.014038[/C][/ROW]
[ROW][C]E:1-F:0[/C][C]-0.22941[/C][C]-0.6492[/C][C]0.19038[/C][C]0.61018[/C][/ROW]
[ROW][C]F:1-F:0[/C][C]-0.051151[/C][C]-0.45817[/C][C]0.35586[/C][C]0.99914[/C][/ROW]
[ROW][C]H:1-F:0[/C][C]-0.49095[/C][C]-0.88786[/C][C]-0.09404[/C][C]0.0064674[/C][/ROW]
[ROW][C]E:1-H:0[/C][C]0.3[/C][C]-0.14343[/C][C]0.74343[/C][C]0.37075[/C][/ROW]
[ROW][C]F:1-H:0[/C][C]0.47826[/C][C]0.046899[/C][C]0.90962[/C][C]0.020626[/C][/ROW]
[ROW][C]H:1-H:0[/C][C]0.038462[/C][C]-0.38338[/C][C]0.4603[/C][C]0.99982[/C][/ROW]
[ROW][C]F:1-E:1[/C][C]0.17826[/C][C]-0.21081[/C][C]0.56733[/C][C]0.76848[/C][/ROW]
[ROW][C]H:1-E:1[/C][C]-0.26154[/C][C]-0.64002[/C][C]0.11694[/C][C]0.34671[/C][/ROW]
[ROW][C]H:1-F:1[/C][C]-0.4398[/C][C]-0.80406[/C][C]-0.075535[/C][C]0.008539[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=153646&T=3

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=153646&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
F-E0.12162-0.116140.359380.44675
H-E-0.35338-0.59114-0.115620.0017382
H-F-0.475-0.70808-0.241921.2489e-05
1-0-0.060675-0.22410.102750.46346
F:0-E:00.058824-0.377650.49530.99879
H:0-E:0-0.47059-0.92985-0.0113250.041248
E:1-E:0-0.17059-0.590380.24920.84618
F:1-E:00.0076726-0.399340.414691
H:1-E:0-0.43213-0.82904-0.0352170.024446
H:0-F:0-0.52941-0.98867-0.0701490.014038
E:1-F:0-0.22941-0.64920.190380.61018
F:1-F:0-0.051151-0.458170.355860.99914
H:1-F:0-0.49095-0.88786-0.094040.0064674
E:1-H:00.3-0.143430.743430.37075
F:1-H:00.478260.0468990.909620.020626
H:1-H:00.038462-0.383380.46030.99982
F:1-E:10.17826-0.210810.567330.76848
H:1-E:1-0.26154-0.640020.116940.34671
H:1-F:1-0.4398-0.80406-0.0755350.008539







Levenes Test for Homogeneity of Variance
DfF valuePr(>F)
Group55.50440.00014496
111

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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=153646&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)
Group55.50440.00014496
111



Parameters (Session):
par1 = 4 ; par2 = 3 ; par3 = 5 ; par4 = TRUE ;
Parameters (R input):
par1 = 4 ; par2 = 3 ; par3 = 5 ; par4 = TRUE ; par5 = ; par6 = ; par7 = ; par8 = ; par9 = ; par10 = ; par11 = ; par12 = ; par13 = ; par14 = ; par15 = ; par16 = ; par17 = ; par18 = ; par19 = ; par20 = ;
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])
mynames<- c(V1, V2, V3)
xdf2<-xdf
names(xdf2)<-mynames
names(xdf)<-c('R', 'A', 'B')
mynames <- c(V1, V2, V3)
if(intercept == FALSE)eval (substitute(lmout<-lm(xdf$R ~ xdf$A * xdf$B- 1, data = xdf), list(xdf=quote(xdf2),R=mynames[1],A=mynames[2],B=mynames[3]) ))else eval(substitute(lmout<-lm(xdf$R ~ xdf$A * xdf$B, data = xdf), list(xdf=quote(xdf2),R=mynames[1],A=mynames[2],B=mynames[3]) ))
oldnames<-names(lmout$coeff)
newnames<-gsub('xdf2$', '', oldnames)
(names(lmout$coeff)<-newnames)
(names(lmout$coefficients)<-newnames)
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'ANOVA Model', length(lmout$coefficients)+1,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
callstr<-gsub('xdf2$', '',as.character(lmout$call$formula))
callstr<-paste(callstr[2], callstr[1], callstr[3])
a<-table.element(a,callstr ,length(lmout$coefficients)+1,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'names',,TRUE)
for(i in 1:length(lmout$coefficients)){
a<-table.element(a, names(lmout$coefficients[i]),,FALSE)
}
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'means',,TRUE)
for(i in 1:length(lmout$coefficients)){
a<-table.element(a, signif(lmout$coefficients[i], digits=5),,FALSE)
}
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable.tab')
(aov.xdf<-aov(lmout) )
(anova.xdf<-anova(lmout) )
rownames(anova.xdf)<-gsub('xdf2$','',rownames(anova.xdf))
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, signif(anova.xdf$'Sum Sq'[i], digits=5),,FALSE)
a<-table.element(a, signif(anova.xdf$'Mean Sq'[i], digits=5),,FALSE)
a<-table.element(a, signif(anova.xdf$'F value'[i], digits=5),,FALSE)
a<-table.element(a, signif(anova.xdf$'Pr(>F)'[i], digits=5),,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, signif(anova.xdf$'Sum Sq'[i+1], digits=5),,FALSE)
a<-table.element(a, signif(anova.xdf$'Mean Sq'[i+1], digits=5),,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(R ~ A + 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$A, xdf$B, xdf$R, 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(0,0,1,2,1,2,0,0,3,3,3,3), 2,6))
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,signif(thsd[[nt]][i,j], digits=5), 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(lmout)
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,signif(lt.lmxdf[[i]][1], digits=5), 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')