s-news
[Top] [All Lists]

Re: sum of squares

To: "Liaw, Andy" <andy_liaw@merck.com>, s-news@lists.biostat.wustl.edu
Subject: Re: sum of squares
From: array chip <arrayprofile@yahoo.com>
Date: Fri, 25 Feb 2005 15:09:59 -0800 (PST)
Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; b=YQn45JmkRi+Zse7mxdUYfwIRhnK0KpU6idZUSIKDJUgdoJxgXxETP1nSHkt3VmfxLqYONmMWaq5+qAzgdu5hkQvnj3veaJ1xldTETaWsey600704iICmevQebJigz7WryI2G63n+G/gNdL03tsi91ut9a7WYHMPyc8QUwho7AmM= ;
In-reply-to: <3A822319EB35174CA3714066D590DCD50994E7A2@usrymx25.merck.com>
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

<Prev in Thread] Current Thread [Next in Thread>