[R] Type 3 sum of squares

Liviu Andronic landronimirc at gmail.com
Mon Aug 16 20:33:42 CEST 2010


Hello 

On Mon, 16 Aug 2010 11:17:41 -0700
Dennis Fisher <fisher at plessthan.com> wrote:
> Colleagues,
> 
> R 2.11.1, OS X.  Please forgive my ignorance of some issues related
> to ANOVA.  
> 
This has already been discussed at length on this list. You might try
searching the archives and using Rseek. There are two pointers that can
get you started: 
http://myowelt.blogspot.com/2008/05/obtaining-same-anova-results-in-r-as-in.html
(type iii ss, marginality)
http://www.stats.ox.ac.uk/pub/MASS3/Exegeses.pdf (type iii ss,
marginality)


Regards
Liviu


> I am trying to replicate some SAS analyses that use type 3
> sum of squares.  The model that I am using is: lm(YVAR ~ DATA$SEQ +
> DATA$SEQ %in% DATA$ID + DATA$PERIOD + FRAME$FORMULATION) The intent
> is to use SEQ, PERIOD, FORMULATION and (SEQUENCE nested in ID) as
> factors in the ANOVA.
> 
> I can replicate the sum of squares for model / error / total.  I have
> two questions: 1.  SAS reports type 3 sum of squares for each of the
> factors.  How can I obtain these?
> 
> 	2.  I am not sure that the coding of nesting in the formula
> is correct: DATA$SEQ %in% DATA$ID
> 	Any advice on this would be appreciated.
> 
> Dennis
> 
> 
> Dennis Fisher MD
> P < (The "P Less Than" Company)
> Phone: 1-866-PLessThan (1-866-753-7784)
> Fax: 1-866-PLessThan (1-866-753-7784)
> www.PLessThan.com
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html and provide commented,
> minimal, self-contained, reproducible code.



More information about the R-help mailing list