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 computationWed, 06 Dec 2017 13:43:15 +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/2017/Dec/06/t1512564434d9x2sivjkifug28.htm/, Retrieved Tue, 14 May 2024 06:53:18 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=308604, Retrieved Tue, 14 May 2024 06:53:18 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact101
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Two-Way ANOVA] [Gewicht hersenen] [2017-12-06 12:43:15] [cc80ff11868be05b07316345895ba511] [Current]
Feedback Forum

Post a new message
Dataseries X:
1530	'Man'	'20-46'
1297	'Man'	'20-46'
1335	'Man'	'20-46'
1282	'Man'	'20-46'
1590	'Man'	'20-46'
1300	'Man'	'20-46'
1400	'Man'	'20-46'
1255	'Man'	'20-46'
1355	'Man'	'20-46'
1375	'Man'	'20-46'
1340	'Man'	'20-46'
1380	'Man'	'20-46'
1355	'Man'	'20-46'
1522	'Man'	'20-46'
1208	'Man'	'20-46'
1405	'Man'	'20-46'
1358	'Man'	'20-46'
1292	'Man'	'20-46'
1340	'Man'	'20-46'
1400	'Man'	'20-46'
1357	'Man'	'20-46'
1287	'Man'	'20-46'
1275	'Man'	'20-46'
1270	'Man'	'20-46'
1635	'Man'	'20-46'
1505	'Man'	'20-46'
1490	'Man'	'20-46'
1485	'Man'	'20-46'
1310	'Man'	'20-46'
1420	'Man'	'20-46'
1318	'Man'	'20-46'
1432	'Man'	'20-46'
1364	'Man'	'20-46'
1405	'Man'	'20-46'
1432	'Man'	'20-46'
1207	'Man'	'20-46'
1375	'Man'	'20-46'
1350	'Man'	'20-46'
1236	'Man'	'20-46'
1250	'Man'	'20-46'
1350	'Man'	'20-46'
1320	'Man'	'20-46'
1525	'Man'	'20-46'
1570	'Man'	'20-46'
1340	'Man'	'20-46'
1422	'Man'	'20-46'
1506	'Man'	'20-46'
1215	'Man'	'20-46'
1311	'Man'	'20-46'
1300	'Man'	'20-46'
1224	'Man'	'20-46'
1350	'Man'	'20-46'
1335	'Man'	'20-46'
1390	'Man'	'20-46'
1400	'Man'	'20-46'
1225	'Man'	'20-46'
1310	'Man'	'20-46'
1560	'Man'	'46+'
1330	'Man'	'46+'
1222	'Man'	'46+'
1415	'Man'	'46+'
1175	'Man'	'46+'
1330	'Man'	'46+'
1485	'Man'	'46+'
1470	'Man'	'46+'
1135	'Man'	'46+'
1310	'Man'	'46+'
1154	'Man'	'46+'
1510	'Man'	'46+'
1415	'Man'	'46+'
1468	'Man'	'46+'
1390	'Man'	'46+'
1380	'Man'	'46+'
1432	'Man'	'46+'
1240	'Man'	'46+'
1195	'Man'	'46+'
1225	'Man'	'46+'
1188	'Man'	'46+'
1252	'Man'	'46+'
1315	'Man'	'46+'
1245	'Man'	'46+'
1430	'Man'	'46+'
1279	'Man'	'46+'
1245	'Man'	'46+'
1309	'Man'	'46+'
1412	'Man'	'46+'
1120	'Man'	'46+'
1220	'Man'	'46+'
1280	'Man'	'46+'
1440	'Man'	'46+'
1370	'Man'	'46+'
1192	'Man'	'46+'
1230	'Man'	'46+'
1346	'Man'	'46+'
1290	'Man'	'46+'
1165	'Man'	'46+'
1240	'Man'	'46+'
1132	'Man'	'46+'
1242	'Man'	'46+'
1270	'Man'	'46+'
1218	'Man'	'46+'
1430	'Man'	'46+'
1588	'Man'	'46+'
1320	'Man'	'46+'
1290	'Man'	'46+'
1260	'Man'	'46+'
1425	'Man'	'46+'
1226	'Man'	'46+'
1360	'Man'	'46+'
1620	'Man'	'46+'
1310	'Man'	'46+'
1250	'Man'	'46+'
1295	'Man'	'46+'
1290	'Man'	'46+'
1290	'Man'	'46+'
1275	'Man'	'46+'
1250	'Man'	'46+'
1270	'Man'	'46+'
1362	'Man'	'46+'
1300	'Man'	'46+'
1173	'Man'	'46+'
1256	'Man'	'46+'
1440	'Man'	'46+'
1180	'Man'	'46+'
1306	'Man'	'46+'
1350	'Man'	'46+'
1125	'Man'	'46+'
1165	'Man'	'46+'
1312	'Man'	'46+'
1300	'Man'	'46+'
1270	'Man'	'46+'
1335	'Man'	'46+'
1450	'Man'	'46+'
1310	'Man'	'46+'
1027	'Vrouw'	'20-46'
1235	'Vrouw'	'20-46'
1260	'Vrouw'	'20-46'
1165	'Vrouw'	'20-46'
1080	'Vrouw'	'20-46'
1127	'Vrouw'	'20-46'
1270	'Vrouw'	'20-46'
1252	'Vrouw'	'20-46'
1200	'Vrouw'	'20-46'
1290	'Vrouw'	'20-46'
1334	'Vrouw'	'20-46'
1380	'Vrouw'	'20-46'
1140	'Vrouw'	'20-46'
1243	'Vrouw'	'20-46'
1340	'Vrouw'	'20-46'
1168	'Vrouw'	'20-46'
1322	'Vrouw'	'20-46'
1249	'Vrouw'	'20-46'
1321	'Vrouw'	'20-46'
1192	'Vrouw'	'20-46'
1373	'Vrouw'	'20-46'
1170	'Vrouw'	'20-46'
1265	'Vrouw'	'20-46'
1235	'Vrouw'	'20-46'
1302	'Vrouw'	'20-46'
1241	'Vrouw'	'20-46'
1078	'Vrouw'	'20-46'
1520	'Vrouw'	'20-46'
1460	'Vrouw'	'20-46'
1075	'Vrouw'	'20-46'
1280	'Vrouw'	'20-46'
1180	'Vrouw'	'20-46'
1250	'Vrouw'	'20-46'
1190	'Vrouw'	'20-46'
1374	'Vrouw'	'20-46'
1306	'Vrouw'	'20-46'
1202	'Vrouw'	'20-46'
1240	'Vrouw'	'20-46'
1316	'Vrouw'	'20-46'
1280	'Vrouw'	'20-46'
1350	'Vrouw'	'20-46'
1180	'Vrouw'	'20-46'
1210	'Vrouw'	'20-46'
1127	'Vrouw'	'20-46'
1324	'Vrouw'	'20-46'
1210	'Vrouw'	'20-46'
1290	'Vrouw'	'20-46'
1100	'Vrouw'	'20-46'
1280	'Vrouw'	'20-46'
1175	'Vrouw'	'20-46'
1160	'Vrouw'	'20-46'
1205	'Vrouw'	'20-46'
1163	'Vrouw'	'20-46'
1022	'Vrouw'	'46+'
1243	'Vrouw'	'46+'
1350	'Vrouw'	'46+'
1237	'Vrouw'	'46+'
1204	'Vrouw'	'46+'
1090	'Vrouw'	'46+'
1355	'Vrouw'	'46+'
1250	'Vrouw'	'46+'
1076	'Vrouw'	'46+'
1120	'Vrouw'	'46+'
1220	'Vrouw'	'46+'
1240	'Vrouw'	'46+'
1220	'Vrouw'	'46+'
1095	'Vrouw'	'46+'
1235	'Vrouw'	'46+'
1105	'Vrouw'	'46+'
1405	'Vrouw'	'46+'
1150	'Vrouw'	'46+'
1305	'Vrouw'	'46+'
1220	'Vrouw'	'46+'
1296	'Vrouw'	'46+'
1175	'Vrouw'	'46+'
955	'Vrouw'	'46+'
1070	'Vrouw'	'46+'
1320	'Vrouw'	'46+'
1060	'Vrouw'	'46+'
1130	'Vrouw'	'46+'
1250	'Vrouw'	'46+'
1225	'Vrouw'	'46+'
1180	'Vrouw'	'46+'
1178	'Vrouw'	'46+'
1142	'Vrouw'	'46+'
1130	'Vrouw'	'46+'
1185	'Vrouw'	'46+'
1012	'Vrouw'	'46+'
1280	'Vrouw'	'46+'
1103	'Vrouw'	'46+'
1408	'Vrouw'	'46+'
1300	'Vrouw'	'46+'
1246	'Vrouw'	'46+'
1380	'Vrouw'	'46+'
1350	'Vrouw'	'46+'
1060	'Vrouw'	'46+'
1350	'Vrouw'	'46+'
1220	'Vrouw'	'46+'
1110	'Vrouw'	'46+'
1215	'Vrouw'	'46+'
1104	'Vrouw'	'46+'
1170	'Vrouw'	'46+'
1120	'Vrouw'	'46+'




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

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







ANOVA Model
Response ~ Treatment_A * Treatment_B
means1365.175-125.44-57.98115.565

\begin{tabular}{lllllllll}
\hline
ANOVA Model \tabularnewline
Response ~ Treatment_A * Treatment_B \tabularnewline
means & 1365.175 & -125.44 & -57.981 & 15.565 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=308604&T=1

[TABLE]
[ROW][C]ANOVA Model[/C][/ROW]
[ROW][C]Response ~ Treatment_A * Treatment_B[/C][/ROW]
[ROW][C]means[/C][C]1365.175[/C][C]-125.44[/C][C]-57.981[/C][C]15.565[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=308604&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=308604&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
means1365.175-125.44-57.98115.565







ANOVA Statistics
DfSum SqMean SqF valuePr(>F)
1
Treatment_A1739841.081739841.08168.3660
Treatment_B1152906.741152906.74114.130
Treatment_A:Treatment_B13490.8753490.8750.3230.571
Residuals2332521471.50510821.766

\begin{tabular}{lllllllll}
\hline
ANOVA Statistics \tabularnewline
  & Df & Sum Sq & Mean Sq & F value & Pr(>F) \tabularnewline
 & 1 &  &  &  &  \tabularnewline
Treatment_A & 1 & 739841.081 & 739841.081 & 68.366 & 0 \tabularnewline
Treatment_B & 1 & 152906.741 & 152906.741 & 14.13 & 0 \tabularnewline
Treatment_A:Treatment_B & 1 & 3490.875 & 3490.875 & 0.323 & 0.571 \tabularnewline
Residuals & 233 & 2521471.505 & 10821.766 &   &   \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=308604&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]Treatment_A[/C][C]1[/C][C]739841.081[/C][C]739841.081[/C][C]68.366[/C][C]0[/C][/ROW]
[ROW][C]Treatment_B[/C][C]1[/C][C]152906.741[/C][C]152906.741[/C][C]14.13[/C][C]0[/C][/ROW]
[ROW][C]Treatment_A:Treatment_B[/C][C]1[/C][C]3490.875[/C][C]3490.875[/C][C]0.323[/C][C]0.571[/C][/ROW]
[ROW][C]Residuals[/C][C]233[/C][C]2521471.505[/C][C]10821.766[/C][C] [/C][C] [/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=308604&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=308604&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
Treatment_A1739841.081739841.08168.3660
Treatment_B1152906.741152906.74114.130
Treatment_A:Treatment_B13490.8753490.8750.3230.571
Residuals2332521471.50510821.766







Tukey Honest Significant Difference Comparisons
difflwruprp adj
Vrouw-Man-112.713-139.57-85.8550
46+-20-46-50.731-77.427-24.0360
Vrouw:20-46-Man:20-46-125.44-176.806-74.0730
Man:46+-Man:20-46-57.981-105.016-10.9450.009
Vrouw:46+-Man:20-46-167.855-220.014-115.6970
Man:46+-Vrouw:20-4667.45919.414115.5040.002
Vrouw:46+-Vrouw:20-46-42.416-95.48610.6550.167
Vrouw:46+-Man:46+-109.875-158.766-60.9840

\begin{tabular}{lllllllll}
\hline
Tukey Honest Significant Difference Comparisons \tabularnewline
  & diff & lwr & upr & p adj \tabularnewline
Vrouw-Man & -112.713 & -139.57 & -85.855 & 0 \tabularnewline
46+-20-46 & -50.731 & -77.427 & -24.036 & 0 \tabularnewline
Vrouw:20-46-Man:20-46 & -125.44 & -176.806 & -74.073 & 0 \tabularnewline
Man:46+-Man:20-46 & -57.981 & -105.016 & -10.945 & 0.009 \tabularnewline
Vrouw:46+-Man:20-46 & -167.855 & -220.014 & -115.697 & 0 \tabularnewline
Man:46+-Vrouw:20-46 & 67.459 & 19.414 & 115.504 & 0.002 \tabularnewline
Vrouw:46+-Vrouw:20-46 & -42.416 & -95.486 & 10.655 & 0.167 \tabularnewline
Vrouw:46+-Man:46+ & -109.875 & -158.766 & -60.984 & 0 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=308604&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]Vrouw-Man[/C][C]-112.713[/C][C]-139.57[/C][C]-85.855[/C][C]0[/C][/ROW]
[ROW][C]46+-20-46[/C][C]-50.731[/C][C]-77.427[/C][C]-24.036[/C][C]0[/C][/ROW]
[ROW][C]Vrouw:20-46-Man:20-46[/C][C]-125.44[/C][C]-176.806[/C][C]-74.073[/C][C]0[/C][/ROW]
[ROW][C]Man:46+-Man:20-46[/C][C]-57.981[/C][C]-105.016[/C][C]-10.945[/C][C]0.009[/C][/ROW]
[ROW][C]Vrouw:46+-Man:20-46[/C][C]-167.855[/C][C]-220.014[/C][C]-115.697[/C][C]0[/C][/ROW]
[ROW][C]Man:46+-Vrouw:20-46[/C][C]67.459[/C][C]19.414[/C][C]115.504[/C][C]0.002[/C][/ROW]
[ROW][C]Vrouw:46+-Vrouw:20-46[/C][C]-42.416[/C][C]-95.486[/C][C]10.655[/C][C]0.167[/C][/ROW]
[ROW][C]Vrouw:46+-Man:46+[/C][C]-109.875[/C][C]-158.766[/C][C]-60.984[/C][C]0[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=308604&T=3

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=308604&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
Vrouw-Man-112.713-139.57-85.8550
46+-20-46-50.731-77.427-24.0360
Vrouw:20-46-Man:20-46-125.44-176.806-74.0730
Man:46+-Man:20-46-57.981-105.016-10.9450.009
Vrouw:46+-Man:20-46-167.855-220.014-115.6970
Man:46+-Vrouw:20-4667.45919.414115.5040.002
Vrouw:46+-Vrouw:20-46-42.416-95.48610.6550.167
Vrouw:46+-Man:46+-109.875-158.766-60.9840







Levenes Test for Homogeneity of Variance
DfF valuePr(>F)
Group30.4910.689
233

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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=308604&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)
Group30.4910.689
233



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):
par4 <- 'TRUE'
par3 <- '3'
par2 <- '2'
par1 <- '1'
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')