Andy,
Thanks. Yes, it is the same now. I just thought since
values of a and b are coded either 0 or 1, so
conceptually the model matrix should be the same
whether a and b are factorized. And the model matrix
are indeed the same with following commands:
model.matrix(aov(y~a*b))
model.matrix(aov(y~factor(a)*factor(b)))
then why the type I and III sum of squares are
different?
Thanks
--- "Liaw, Andy" <andy_liaw@merck.com> wrote:
> You need to make `a' and `b' factors.
>
> Andy
>
> > From: array chip
> >
> > Hi,
> >
> > for balanced 2-way ANOVA, type I SS should be
> equal to
> > Type III SS, this can be seen in the help page for
> > summary.aov() as well. However, with the following
> > simple example, I get different type I and III SS.
> can
> > anyone advise?
> >
> > y<-rnorm(16,10,3)
> > a<-c(rep(0,8),rep(1,8))
> > b<-c(rep(0,4),rep(1,4),rep(0,4),rep(1,4))
> > summary(aov(y~b*a),ssType=1)
> > summary(aov(y~b*a),ssType=3)
> >
> > Thanks
> >
> >
> >
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > Read only the mail you want - Yahoo! Mail
> SpamGuard.
> > http://promotions.yahoo.com/new_mail
> >
>
--------------------------------------------------------------------
> > This message was distributed by
> s-news@lists.biostat.wustl.edu. To
> > unsubscribe send e-mail to
> s-news-request@lists.biostat.wustl.edu with
> > the BODY of the message: unsubscribe s-news
> >
> >
>
>
>
------------------------------------------------------------------------------
> Notice: This e-mail message, together with any
> attachments, contains information of Merck & Co.,
> Inc. (One Merck Drive, Whitehouse Station, New
> Jersey, USA 08889), and/or its affiliates (which may
> be known outside the United States as Merck Frosst,
> Merck Sharp & Dohme or MSD and in Japan, as Banyu)
> that may be confidential, proprietary copyrighted
> and/or legally privileged. It is intended solely for
> the use of the individual or entity named on this
> message. If you are not the intended recipient, and
> have received this message in error, please notify
> us immediately by reply e-mail and then delete it
> from your system.
>
------------------------------------------------------------------------------
>
__________________________________
Do you Yahoo!?
Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250
|