Free Statistics

of Irreproducible Research!

Author's title

Author*The author of this computation has been verified*
R Software ModuleIan.Hollidayrwasp_Two Factor ANOVA -V2.wasp
Title produced by softwareVariability
Date of computationSat, 05 Jun 2010 11:08:20 +0000
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2010/Jun/05/t1275736454vm2a6mcjm3a0jmt.htm/, Retrieved Fri, 03 May 2024 10:16:48 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=77512, Retrieved Fri, 03 May 2024 10:16:48 +0000
QR Codes:

Original text written by user:Added in the missing values from Erickson and Nosanchuk that were removed from the R version of the dataset
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact172
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Two-Way ANOVA] [two-way anova wit...] [2010-05-26 17:02:24] [98fd0e87c3eb04e0cc2efde01dbafab6]
- R PD  [Two-Way ANOVA] [ANOVA with good l...] [2010-05-28 23:09:47] [98fd0e87c3eb04e0cc2efde01dbafab6]
- R       [Variability] [ANOVA with better...] [2010-05-29 09:47:12] [98fd0e87c3eb04e0cc2efde01dbafab6]
- R         [Variability] [ANOVA with better...] [2010-05-29 09:54:40] [98fd0e87c3eb04e0cc2efde01dbafab6]
- R  D          [Variability] [Adler Data - Comp...] [2010-06-05 11:08:20] [a9208f4f8d3b118336aae915785f2bd9] [Current]
Feedback Forum

Post a new message
Dataseries X:
'GOOD'	'HIGH'	25
'GOOD'	'HIGH'	0
'GOOD'	'HIGH'	-16
'GOOD'	'HIGH'	5
'GOOD'	'HIGH'	11
'GOOD'	'HIGH'	-6
'GOOD'	'HIGH'	42
'GOOD'	'HIGH'	-2
'GOOD'	'HIGH'	-13
'GOOD'	'HIGH'	14
'GOOD'	'HIGH'	4
'GOOD'	'HIGH'	-22
'GOOD'	'HIGH'	19
'GOOD'	'HIGH'	6
'GOOD'	'HIGH'	9
'GOOD'	'HIGH'	13
'GOOD'	'HIGH'	-3
'GOOD'	'HIGH'	-6
'GOOD'	'LOW'	-25
'GOOD'	'LOW'	-23
'GOOD'	'LOW'	-28
'GOOD'	'LOW'	-22
'GOOD'	'LOW'	-22
'GOOD'	'LOW'	-10
'GOOD'	'LOW'	-20
'GOOD'	'LOW'	-24
'GOOD'	'LOW'	-24
'GOOD'	'LOW'	-22
'GOOD'	'LOW'	-23
'GOOD'	'LOW'	-19
'GOOD'	'LOW'	-2
'GOOD'	'LOW'	12
'GOOD'	'LOW'	-8
'GOOD'	'LOW'	-17
'GOOD'	'LOW'	-30
'GOOD'	'LOW'	-22
'SCIENTIFIC'	'HIGH'	-19
'SCIENTIFIC'	'HIGH'	-24
'SCIENTIFIC'	'HIGH'	-4
'SCIENTIFIC'	'HIGH'	-24
'SCIENTIFIC'	'HIGH'	0
'SCIENTIFIC'	'HIGH'	-4
'SCIENTIFIC'	'HIGH'	5
'SCIENTIFIC'	'HIGH'	-1
'SCIENTIFIC'	'HIGH'	-9
'SCIENTIFIC'	'HIGH'	-5
'SCIENTIFIC'	'HIGH'	-6
'SCIENTIFIC'	'HIGH'	4
'SCIENTIFIC'	'HIGH'	-13
'SCIENTIFIC'	'HIGH'	-1
'SCIENTIFIC'	'HIGH'	-3
'SCIENTIFIC'	'HIGH'	-11
'SCIENTIFIC'	'HIGH'	-6
'SCIENTIFIC'	'HIGH'	-4
'SCIENTIFIC'	'LOW'	6
'SCIENTIFIC'	'LOW'	-5
'SCIENTIFIC'	'LOW'	14
'SCIENTIFIC'	'LOW'	-11
'SCIENTIFIC'	'LOW'	14
'SCIENTIFIC'	'LOW'	-5
'SCIENTIFIC'	'LOW'	-22
'SCIENTIFIC'	'LOW'	7
'SCIENTIFIC'	'LOW'	14
'SCIENTIFIC'	'LOW'	15
'SCIENTIFIC'	'LOW'	-6
'SCIENTIFIC'	'LOW'	9
'SCIENTIFIC'	'LOW'	-5
'SCIENTIFIC'	'LOW'	-5
'SCIENTIFIC'	'LOW'	-9
'SCIENTIFIC'	'LOW'	3
'SCIENTIFIC'	'LOW'	-5
'SCIENTIFIC'	'LOW'	6
'NONE'	'HIGH'	-26
'NONE'	'HIGH'	-1
'NONE'	'HIGH'	22
'NONE'	'HIGH'	3
'NONE'	'HIGH'	-26
'NONE'	'HIGH'	4
'NONE'	'HIGH'	-21
'NONE'	'HIGH'	-19
'NONE'	'HIGH'	-12
'NONE'	'HIGH'	9
'NONE'	'HIGH'	-9
'NONE'	'HIGH'	-27
'NONE'	'HIGH'	-10
'NONE'	'HIGH'	-37
'NONE'	'HIGH'	0
'NONE'	'HIGH'	-10
'NONE'	'HIGH'	-6
'NONE'	'HIGH'	-11
'NONE'	'LOW'	-12
'NONE'	'LOW'	-4
'NONE'	'LOW'	13
'NONE'	'LOW'	-27
'NONE'	'LOW'	-7
'NONE'	'LOW'	-20
'NONE'	'LOW'	-4
'NONE'	'LOW'	-10
'NONE'	'LOW'	-3
'NONE'	'LOW'	-11
'NONE'	'LOW'	2
'NONE'	'LOW'	-9
'NONE'	'LOW'	20
'NONE'	'LOW'	9
'NONE'	'LOW'	-8
'NONE'	'LOW'	8
'NONE'	'LOW'	-6
'NONE'	'LOW'	6




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk

\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 & 'RServer@AstonUniversity' @ vre.aston.ac.uk \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=77512&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]'RServer@AstonUniversity' @ vre.aston.ac.uk[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=77512&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=77512&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'RServer@AstonUniversity' @ vre.aston.ac.uk







ANOVA Model
R ~ Exp * Inst
names(Intercept)ExpLOWInstNONEInstSCIENTIFICExpLOW:InstNONEExpLOW:InstSCIENTIFIC
means4.444-22.722-14.278-11.38929.05630.5

\begin{tabular}{lllllllll}
\hline
ANOVA Model \tabularnewline
R ~ Exp * Inst \tabularnewline
names & (Intercept) & ExpLOW & InstNONE & InstSCIENTIFIC & ExpLOW:InstNONE & ExpLOW:InstSCIENTIFIC \tabularnewline
means & 4.444 & -22.722 & -14.278 & -11.389 & 29.056 & 30.5 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=77512&T=1

[TABLE]
[ROW][C]ANOVA Model[/C][/ROW]
[ROW][C]R ~ Exp * Inst[/C][/ROW]
[ROW][C]names[/C][C](Intercept)[/C][C]ExpLOW[/C][C]InstNONE[/C][C]InstSCIENTIFIC[/C][C]ExpLOW:InstNONE[/C][C]ExpLOW:InstSCIENTIFIC[/C][/ROW]
[ROW][C]means[/C][C]4.444[/C][C]-22.722[/C][C]-14.278[/C][C]-11.389[/C][C]29.056[/C][C]30.5[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=77512&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=77512&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
R ~ Exp * Inst
names(Intercept)ExpLOWInstNONEInstSCIENTIFICExpLOW:InstNONEExpLOW:InstSCIENTIFIC
means4.444-22.722-14.278-11.38929.05630.5







ANOVA Statistics
DfSum SqMean SqF valuePr(>F)
1
Exp1222.454222.4541.5240.22
Inst1336.13168.0651.1510.32
Exp:Inst15329.6852664.84318.2540
Residuals10214890.5145.985

\begin{tabular}{lllllllll}
\hline
ANOVA Statistics \tabularnewline
  & Df & Sum Sq & Mean Sq & F value & Pr(>F) \tabularnewline
 & 1 &  &  &  &  \tabularnewline
Exp & 1 & 222.454 & 222.454 & 1.524 & 0.22 \tabularnewline
Inst & 1 & 336.13 & 168.065 & 1.151 & 0.32 \tabularnewline
Exp:Inst & 1 & 5329.685 & 2664.843 & 18.254 & 0 \tabularnewline
Residuals & 102 & 14890.5 & 145.985 &   &   \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=77512&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]1[/C][C][/C][C][/C][C][/C][C][/C][/ROW]
[ROW][C]Exp[/C][C]1[/C][C]222.454[/C][C]222.454[/C][C]1.524[/C][C]0.22[/C][/ROW]
[ROW][C]Inst[/C][C]1[/C][C]336.13[/C][C]168.065[/C][C]1.151[/C][C]0.32[/C][/ROW]
[ROW][C]Exp:Inst[/C][C]1[/C][C]5329.685[/C][C]2664.843[/C][C]18.254[/C][C]0[/C][/ROW]
[ROW][C]Residuals[/C][C]102[/C][C]14890.5[/C][C]145.985[/C][C] [/C][C] [/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=77512&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=77512&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)
1
Exp1222.454222.4541.5240.22
Inst1336.13168.0651.1510.32
Exp:Inst15329.6852664.84318.2540
Residuals10214890.5145.985







Tukey Honest Significant Difference Comparisons
difflwruprp adj
LOW-HIGH-2.87-7.4831.7420.22
NONE-GOOD0.25-6.5237.0230.996
SCIENTIFIC-GOOD3.861-2.91210.6340.368
SCIENTIFIC-NONE3.611-3.16210.3840.416
LOW:GOOD-HIGH:GOOD-22.722-34.421-11.0240
HIGH:NONE-HIGH:GOOD-14.278-25.976-2.5790.008
LOW:NONE-HIGH:GOOD-7.944-19.6433.7540.365
HIGH:SCIENTIFIC-HIGH:GOOD-11.389-23.0870.3090.061
LOW:SCIENTIFIC-HIGH:GOOD-3.611-15.3098.0870.946
HIGH:NONE-LOW:GOOD8.444-3.25420.1430.297
LOW:NONE-LOW:GOOD14.7783.07926.4760.005
HIGH:SCIENTIFIC-LOW:GOOD11.333-0.36523.0320.063
LOW:SCIENTIFIC-LOW:GOOD19.1117.41330.8090
LOW:NONE-HIGH:NONE6.333-5.36518.0320.618
HIGH:SCIENTIFIC-HIGH:NONE2.889-8.80914.5870.979
LOW:SCIENTIFIC-HIGH:NONE10.667-1.03222.3650.095
HIGH:SCIENTIFIC-LOW:NONE-3.444-15.1438.2540.956
LOW:SCIENTIFIC-LOW:NONE4.333-7.36516.0320.89
LOW:SCIENTIFIC-HIGH:SCIENTIFIC7.778-3.92119.4760.389

\begin{tabular}{lllllllll}
\hline
Tukey Honest Significant Difference Comparisons \tabularnewline
  & diff & lwr & upr & p adj \tabularnewline
LOW-HIGH & -2.87 & -7.483 & 1.742 & 0.22 \tabularnewline
NONE-GOOD & 0.25 & -6.523 & 7.023 & 0.996 \tabularnewline
SCIENTIFIC-GOOD & 3.861 & -2.912 & 10.634 & 0.368 \tabularnewline
SCIENTIFIC-NONE & 3.611 & -3.162 & 10.384 & 0.416 \tabularnewline
LOW:GOOD-HIGH:GOOD & -22.722 & -34.421 & -11.024 & 0 \tabularnewline
HIGH:NONE-HIGH:GOOD & -14.278 & -25.976 & -2.579 & 0.008 \tabularnewline
LOW:NONE-HIGH:GOOD & -7.944 & -19.643 & 3.754 & 0.365 \tabularnewline
HIGH:SCIENTIFIC-HIGH:GOOD & -11.389 & -23.087 & 0.309 & 0.061 \tabularnewline
LOW:SCIENTIFIC-HIGH:GOOD & -3.611 & -15.309 & 8.087 & 0.946 \tabularnewline
HIGH:NONE-LOW:GOOD & 8.444 & -3.254 & 20.143 & 0.297 \tabularnewline
LOW:NONE-LOW:GOOD & 14.778 & 3.079 & 26.476 & 0.005 \tabularnewline
HIGH:SCIENTIFIC-LOW:GOOD & 11.333 & -0.365 & 23.032 & 0.063 \tabularnewline
LOW:SCIENTIFIC-LOW:GOOD & 19.111 & 7.413 & 30.809 & 0 \tabularnewline
LOW:NONE-HIGH:NONE & 6.333 & -5.365 & 18.032 & 0.618 \tabularnewline
HIGH:SCIENTIFIC-HIGH:NONE & 2.889 & -8.809 & 14.587 & 0.979 \tabularnewline
LOW:SCIENTIFIC-HIGH:NONE & 10.667 & -1.032 & 22.365 & 0.095 \tabularnewline
HIGH:SCIENTIFIC-LOW:NONE & -3.444 & -15.143 & 8.254 & 0.956 \tabularnewline
LOW:SCIENTIFIC-LOW:NONE & 4.333 & -7.365 & 16.032 & 0.89 \tabularnewline
LOW:SCIENTIFIC-HIGH:SCIENTIFIC & 7.778 & -3.921 & 19.476 & 0.389 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=77512&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]LOW-HIGH[/C][C]-2.87[/C][C]-7.483[/C][C]1.742[/C][C]0.22[/C][/ROW]
[ROW][C]NONE-GOOD[/C][C]0.25[/C][C]-6.523[/C][C]7.023[/C][C]0.996[/C][/ROW]
[ROW][C]SCIENTIFIC-GOOD[/C][C]3.861[/C][C]-2.912[/C][C]10.634[/C][C]0.368[/C][/ROW]
[ROW][C]SCIENTIFIC-NONE[/C][C]3.611[/C][C]-3.162[/C][C]10.384[/C][C]0.416[/C][/ROW]
[ROW][C]LOW:GOOD-HIGH:GOOD[/C][C]-22.722[/C][C]-34.421[/C][C]-11.024[/C][C]0[/C][/ROW]
[ROW][C]HIGH:NONE-HIGH:GOOD[/C][C]-14.278[/C][C]-25.976[/C][C]-2.579[/C][C]0.008[/C][/ROW]
[ROW][C]LOW:NONE-HIGH:GOOD[/C][C]-7.944[/C][C]-19.643[/C][C]3.754[/C][C]0.365[/C][/ROW]
[ROW][C]HIGH:SCIENTIFIC-HIGH:GOOD[/C][C]-11.389[/C][C]-23.087[/C][C]0.309[/C][C]0.061[/C][/ROW]
[ROW][C]LOW:SCIENTIFIC-HIGH:GOOD[/C][C]-3.611[/C][C]-15.309[/C][C]8.087[/C][C]0.946[/C][/ROW]
[ROW][C]HIGH:NONE-LOW:GOOD[/C][C]8.444[/C][C]-3.254[/C][C]20.143[/C][C]0.297[/C][/ROW]
[ROW][C]LOW:NONE-LOW:GOOD[/C][C]14.778[/C][C]3.079[/C][C]26.476[/C][C]0.005[/C][/ROW]
[ROW][C]HIGH:SCIENTIFIC-LOW:GOOD[/C][C]11.333[/C][C]-0.365[/C][C]23.032[/C][C]0.063[/C][/ROW]
[ROW][C]LOW:SCIENTIFIC-LOW:GOOD[/C][C]19.111[/C][C]7.413[/C][C]30.809[/C][C]0[/C][/ROW]
[ROW][C]LOW:NONE-HIGH:NONE[/C][C]6.333[/C][C]-5.365[/C][C]18.032[/C][C]0.618[/C][/ROW]
[ROW][C]HIGH:SCIENTIFIC-HIGH:NONE[/C][C]2.889[/C][C]-8.809[/C][C]14.587[/C][C]0.979[/C][/ROW]
[ROW][C]LOW:SCIENTIFIC-HIGH:NONE[/C][C]10.667[/C][C]-1.032[/C][C]22.365[/C][C]0.095[/C][/ROW]
[ROW][C]HIGH:SCIENTIFIC-LOW:NONE[/C][C]-3.444[/C][C]-15.143[/C][C]8.254[/C][C]0.956[/C][/ROW]
[ROW][C]LOW:SCIENTIFIC-LOW:NONE[/C][C]4.333[/C][C]-7.365[/C][C]16.032[/C][C]0.89[/C][/ROW]
[ROW][C]LOW:SCIENTIFIC-HIGH:SCIENTIFIC[/C][C]7.778[/C][C]-3.921[/C][C]19.476[/C][C]0.389[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=77512&T=3

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=77512&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
LOW-HIGH-2.87-7.4831.7420.22
NONE-GOOD0.25-6.5237.0230.996
SCIENTIFIC-GOOD3.861-2.91210.6340.368
SCIENTIFIC-NONE3.611-3.16210.3840.416
LOW:GOOD-HIGH:GOOD-22.722-34.421-11.0240
HIGH:NONE-HIGH:GOOD-14.278-25.976-2.5790.008
LOW:NONE-HIGH:GOOD-7.944-19.6433.7540.365
HIGH:SCIENTIFIC-HIGH:GOOD-11.389-23.0870.3090.061
LOW:SCIENTIFIC-HIGH:GOOD-3.611-15.3098.0870.946
HIGH:NONE-LOW:GOOD8.444-3.25420.1430.297
LOW:NONE-LOW:GOOD14.7783.07926.4760.005
HIGH:SCIENTIFIC-LOW:GOOD11.333-0.36523.0320.063
LOW:SCIENTIFIC-LOW:GOOD19.1117.41330.8090
LOW:NONE-HIGH:NONE6.333-5.36518.0320.618
HIGH:SCIENTIFIC-HIGH:NONE2.889-8.80914.5870.979
LOW:SCIENTIFIC-HIGH:NONE10.667-1.03222.3650.095
HIGH:SCIENTIFIC-LOW:NONE-3.444-15.1438.2540.956
LOW:SCIENTIFIC-LOW:NONE4.333-7.36516.0320.89
LOW:SCIENTIFIC-HIGH:SCIENTIFIC7.778-3.92119.4760.389







Levenes Test for Homogeneity of Variance
DfF valuePr(>F)
Group51.5270.188
102

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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=77512&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)
Group51.5270.188
102



Parameters (Session):
par1 = 3 ; par2 = 2 ; par3 = 1 ; par4 = TRUE ;
Parameters (R input):
par1 = 3 ; par2 = 2 ; par3 = 1 ; 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])
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, round(lmout$coefficients[i], digits=3),,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, 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(R ~ A + B, data=xdf, xlab=V2, ylab=V1, main='Boxplots of ANOVA Groups',cex.axis=0.7 )
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')
par(mai=c(1,1.5,1,1))
layout(matrix(c(1,2,1,2,3,3,3,3), 2,4))
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(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,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')