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, 05 Dec 2017 08:51:22 +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/05/t15124603885izspfev1oblchx.htm/, Retrieved Mon, 13 May 2024 22:00:33 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=308527, Retrieved Mon, 13 May 2024 22:00:33 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact121
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Two-Way ANOVA] [Hersenen] [2017-12-05 07:51:22] [cc80ff11868be05b07316345895ba511] [Current]
Feedback Forum

Post a new message
Dataseries X:
4512	'Man'	'20-46'
3738	'Man'	'20-46'
4261	'Man'	'20-46'
3777	'Man'	'20-46'
4177	'Man'	'20-46'
3585	'Man'	'20-46'
3785	'Man'	'20-46'
3559	'Man'	'20-46'
3613	'Man'	'20-46'
3982	'Man'	'20-46'
3443	'Man'	'20-46'
3993	'Man'	'20-46'
3640	'Man'	'20-46'
4208	'Man'	'20-46'
3832	'Man'	'20-46'
3876	'Man'	'20-46'
3497	'Man'	'20-46'
3466	'Man'	'20-46'
3095	'Man'	'20-46'
4424	'Man'	'20-46'
3878	'Man'	'20-46'
4046	'Man'	'20-46'
3804	'Man'	'20-46'
3710	'Man'	'20-46'
4747	'Man'	'20-46'
4423	'Man'	'20-46'
4036	'Man'	'20-46'
4022	'Man'	'20-46'
3454	'Man'	'20-46'
4175	'Man'	'20-46'
3787	'Man'	'20-46'
3796	'Man'	'20-46'
4103	'Man'	'20-46'
4161	'Man'	'20-46'
4158	'Man'	'20-46'
3814	'Man'	'20-46'
3527	'Man'	'20-46'
3748	'Man'	'20-46'
3334	'Man'	'20-46'
3492	'Man'	'20-46'
3962	'Man'	'20-46'
3505	'Man'	'20-46'
4315	'Man'	'20-46'
3804	'Man'	'20-46'
3863	'Man'	'20-46'
4034	'Man'	'20-46'
4308	'Man'	'20-46'
3165	'Man'	'20-46'
3641	'Man'	'20-46'
3644	'Man'	'20-46'
3891	'Man'	'20-46'
3793	'Man'	'20-46'
4270	'Man'	'20-46'
4063	'Man'	'20-46'
4012	'Man'	'20-46'
3458	'Man'	'20-46'
3890	'Man'	'20-46'
4166	'Man'	'46+'
3935	'Man'	'46+'
3669	'Man'	'46+'
3866	'Man'	'46+'
3393	'Man'	'46+'
4442	'Man'	'46+'
4253	'Man'	'46+'
3727	'Man'	'46+'
3329	'Man'	'46+'
3415	'Man'	'46+'
3372	'Man'	'46+'
4430	'Man'	'46+'
4381	'Man'	'46+'
4008	'Man'	'46+'
3858	'Man'	'46+'
4121	'Man'	'46+'
4057	'Man'	'46+'
3824	'Man'	'46+'
3394	'Man'	'46+'
3558	'Man'	'46+'
3362	'Man'	'46+'
3930	'Man'	'46+'
3835	'Man'	'46+'
3830	'Man'	'46+'
3856	'Man'	'46+'
3249	'Man'	'46+'
3577	'Man'	'46+'
3933	'Man'	'46+'
3850	'Man'	'46+'
3309	'Man'	'46+'
3406	'Man'	'46+'
3506	'Man'	'46+'
3907	'Man'	'46+'
4160	'Man'	'46+'
3318	'Man'	'46+'
3662	'Man'	'46+'
3899	'Man'	'46+'
3700	'Man'	'46+'
3779	'Man'	'46+'
3473	'Man'	'46+'
3490	'Man'	'46+'
3654	'Man'	'46+'
3478	'Man'	'46+'
3495	'Man'	'46+'
3834	'Man'	'46+'
3876	'Man'	'46+'
3661	'Man'	'46+'
3618	'Man'	'46+'
3648	'Man'	'46+'
4032	'Man'	'46+'
3399	'Man'	'46+'
3916	'Man'	'46+'
4430	'Man'	'46+'
3695	'Man'	'46+'
3524	'Man'	'46+'
3571	'Man'	'46+'
3594	'Man'	'46+'
3383	'Man'	'46+'
3499	'Man'	'46+'
3589	'Man'	'46+'
3900	'Man'	'46+'
4114	'Man'	'46+'
3937	'Man'	'46+'
3399	'Man'	'46+'
4200	'Man'	'46+'
4488	'Man'	'46+'
3614	'Man'	'46+'
4051	'Man'	'46+'
3782	'Man'	'46+'
3391	'Man'	'46+'
3124	'Man'	'46+'
4053	'Man'	'46+'
3582	'Man'	'46+'
3666	'Man'	'46+'
3532	'Man'	'46+'
4046	'Man'	'46+'
3667	'Man'	'46+'
2857	'Vrouw'	'20-46'
3436	'Vrouw'	'20-46'
3791	'Vrouw'	'20-46'
3302	'Vrouw'	'20-46'
3104	'Vrouw'	'20-46'
3171	'Vrouw'	'20-46'
3572	'Vrouw'	'20-46'
3530	'Vrouw'	'20-46'
3175	'Vrouw'	'20-46'
3438	'Vrouw'	'20-46'
3903	'Vrouw'	'20-46'
3899	'Vrouw'	'20-46'
3401	'Vrouw'	'20-46'
3267	'Vrouw'	'20-46'
3451	'Vrouw'	'20-46'
3090	'Vrouw'	'20-46'
3413	'Vrouw'	'20-46'
3323	'Vrouw'	'20-46'
3680	'Vrouw'	'20-46'
3439	'Vrouw'	'20-46'
3853	'Vrouw'	'20-46'
3156	'Vrouw'	'20-46'
3279	'Vrouw'	'20-46'
3707	'Vrouw'	'20-46'
4006	'Vrouw'	'20-46'
3269	'Vrouw'	'20-46'
3071	'Vrouw'	'20-46'
3779	'Vrouw'	'20-46'
3548	'Vrouw'	'20-46'
3292	'Vrouw'	'20-46'
3497	'Vrouw'	'20-46'
3082	'Vrouw'	'20-46'
3248	'Vrouw'	'20-46'
3358	'Vrouw'	'20-46'
3803	'Vrouw'	'20-46'
3566	'Vrouw'	'20-46'
3145	'Vrouw'	'20-46'
3503	'Vrouw'	'20-46'
3571	'Vrouw'	'20-46'
3724	'Vrouw'	'20-46'
3615	'Vrouw'	'20-46'
3203	'Vrouw'	'20-46'
3609	'Vrouw'	'20-46'
3561	'Vrouw'	'20-46'
3979	'Vrouw'	'20-46'
3533	'Vrouw'	'20-46'
3689	'Vrouw'	'20-46'
3158	'Vrouw'	'20-46'
4005	'Vrouw'	'20-46'
3181	'Vrouw'	'20-46'
3479	'Vrouw'	'20-46'
3642	'Vrouw'	'20-46'
3632	'Vrouw'	'20-46'
3069	'Vrouw'	'46+'
3394	'Vrouw'	'46+'
3703	'Vrouw'	'46+'
3165	'Vrouw'	'46+'
3354	'Vrouw'	'46+'
3000	'Vrouw'	'46+'
3687	'Vrouw'	'46+'
3556	'Vrouw'	'46+'
2773	'Vrouw'	'46+'
3058	'Vrouw'	'46+'
3344	'Vrouw'	'46+'
3493	'Vrouw'	'46+'
3297	'Vrouw'	'46+'
3360	'Vrouw'	'46+'
3228	'Vrouw'	'46+'
3277	'Vrouw'	'46+'
3851	'Vrouw'	'46+'
3067	'Vrouw'	'46+'
3692	'Vrouw'	'46+'
3402	'Vrouw'	'46+'
3995	'Vrouw'	'46+'
3318	'Vrouw'	'46+'
2720	'Vrouw'	'46+'
2937	'Vrouw'	'46+'
3580	'Vrouw'	'46+'
2939	'Vrouw'	'46+'
2989	'Vrouw'	'46+'
3586	'Vrouw'	'46+'
3156	'Vrouw'	'46+'
3246	'Vrouw'	'46+'
3170	'Vrouw'	'46+'
3268	'Vrouw'	'46+'
3389	'Vrouw'	'46+'
3381	'Vrouw'	'46+'
2864	'Vrouw'	'46+'
3740	'Vrouw'	'46+'
3479	'Vrouw'	'46+'
3647	'Vrouw'	'46+'
3716	'Vrouw'	'46+'
3284	'Vrouw'	'46+'
4204	'Vrouw'	'46+'
3735	'Vrouw'	'46+'
3218	'Vrouw'	'46+'
3685	'Vrouw'	'46+'
3704	'Vrouw'	'46+'
3214	'Vrouw'	'46+'
3394	'Vrouw'	'46+'
3233	'Vrouw'	'46+'
3352	'Vrouw'	'46+'
3391	'Vrouw'	'46+'




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=308527&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=308527&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=308527&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
means3864.842-393.427-115.86810.533

\begin{tabular}{lllllllll}
\hline
ANOVA Model \tabularnewline
Response ~ Treatment_A * Treatment_B \tabularnewline
means & 3864.842 & -393.427 & -115.868 & 10.533 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=308527&T=1

[TABLE]
[ROW][C]ANOVA Model[/C][/ROW]
[ROW][C]Response ~ Treatment_A * Treatment_B[/C][/ROW]
[ROW][C]means[/C][C]3864.842[/C][C]-393.427[/C][C]-115.868[/C][C]10.533[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=308527&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=308527&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
means3864.842-393.427-115.86810.533







ANOVA Statistics
DfSum SqMean SqF valuePr(>F)
1
Treatment_A18320137.298320137.2986.3870
Treatment_B1723599.977723599.9777.5130.007
Treatment_A:Treatment_B11598.6411598.6410.0170.898
Residuals23322440818.07596312.524

\begin{tabular}{lllllllll}
\hline
ANOVA Statistics \tabularnewline
  & Df & Sum Sq & Mean Sq & F value & Pr(>F) \tabularnewline
 & 1 &  &  &  &  \tabularnewline
Treatment_A & 1 & 8320137.29 & 8320137.29 & 86.387 & 0 \tabularnewline
Treatment_B & 1 & 723599.977 & 723599.977 & 7.513 & 0.007 \tabularnewline
Treatment_A:Treatment_B & 1 & 1598.641 & 1598.641 & 0.017 & 0.898 \tabularnewline
Residuals & 233 & 22440818.075 & 96312.524 &   &   \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=308527&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]8320137.29[/C][C]8320137.29[/C][C]86.387[/C][C]0[/C][/ROW]
[ROW][C]Treatment_B[/C][C]1[/C][C]723599.977[/C][C]723599.977[/C][C]7.513[/C][C]0.007[/C][/ROW]
[ROW][C]Treatment_A:Treatment_B[/C][C]1[/C][C]1598.641[/C][C]1598.641[/C][C]0.017[/C][C]0.898[/C][/ROW]
[ROW][C]Residuals[/C][C]233[/C][C]22440818.075[/C][C]96312.524[/C][C] [/C][C] [/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=308527&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=308527&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_A18320137.298320137.2986.3870
Treatment_B1723599.977723599.9777.5130.007
Treatment_A:Treatment_B11598.6411598.6410.0170.898
Residuals23322440818.07596312.524







Tukey Honest Significant Difference Comparisons
difflwruprp adj
Vrouw-Man-377.98-458.102-297.8570
46+-20-46-110.36-189.999-30.7210.007
Vrouw:20-46-Man:20-46-393.427-546.667-240.1870
Man:46+-Man:20-46-115.868-256.18824.4520.145
Vrouw:46+-Man:20-46-498.762-654.366-343.1590
Man:46+-Vrouw:20-46277.559134.229420.8890
Vrouw:46+-Vrouw:20-46-105.335-263.65952.9880.315
Vrouw:46+-Man:46+-382.894-528.749-237.0390

\begin{tabular}{lllllllll}
\hline
Tukey Honest Significant Difference Comparisons \tabularnewline
  & diff & lwr & upr & p adj \tabularnewline
Vrouw-Man & -377.98 & -458.102 & -297.857 & 0 \tabularnewline
46+-20-46 & -110.36 & -189.999 & -30.721 & 0.007 \tabularnewline
Vrouw:20-46-Man:20-46 & -393.427 & -546.667 & -240.187 & 0 \tabularnewline
Man:46+-Man:20-46 & -115.868 & -256.188 & 24.452 & 0.145 \tabularnewline
Vrouw:46+-Man:20-46 & -498.762 & -654.366 & -343.159 & 0 \tabularnewline
Man:46+-Vrouw:20-46 & 277.559 & 134.229 & 420.889 & 0 \tabularnewline
Vrouw:46+-Vrouw:20-46 & -105.335 & -263.659 & 52.988 & 0.315 \tabularnewline
Vrouw:46+-Man:46+ & -382.894 & -528.749 & -237.039 & 0 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=308527&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]-377.98[/C][C]-458.102[/C][C]-297.857[/C][C]0[/C][/ROW]
[ROW][C]46+-20-46[/C][C]-110.36[/C][C]-189.999[/C][C]-30.721[/C][C]0.007[/C][/ROW]
[ROW][C]Vrouw:20-46-Man:20-46[/C][C]-393.427[/C][C]-546.667[/C][C]-240.187[/C][C]0[/C][/ROW]
[ROW][C]Man:46+-Man:20-46[/C][C]-115.868[/C][C]-256.188[/C][C]24.452[/C][C]0.145[/C][/ROW]
[ROW][C]Vrouw:46+-Man:20-46[/C][C]-498.762[/C][C]-654.366[/C][C]-343.159[/C][C]0[/C][/ROW]
[ROW][C]Man:46+-Vrouw:20-46[/C][C]277.559[/C][C]134.229[/C][C]420.889[/C][C]0[/C][/ROW]
[ROW][C]Vrouw:46+-Vrouw:20-46[/C][C]-105.335[/C][C]-263.659[/C][C]52.988[/C][C]0.315[/C][/ROW]
[ROW][C]Vrouw:46+-Man:46+[/C][C]-382.894[/C][C]-528.749[/C][C]-237.039[/C][C]0[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=308527&T=3

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=308527&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-377.98-458.102-297.8570
46+-20-46-110.36-189.999-30.7210.007
Vrouw:20-46-Man:20-46-393.427-546.667-240.1870
Man:46+-Man:20-46-115.868-256.18824.4520.145
Vrouw:46+-Man:20-46-498.762-654.366-343.1590
Man:46+-Vrouw:20-46277.559134.229420.8890
Vrouw:46+-Vrouw:20-46-105.335-263.65952.9880.315
Vrouw:46+-Man:46+-382.894-528.749-237.0390







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

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

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