Re: [R] Checking for orthogonal contrasts

2010-12-05 Thread peter dalgaard
On Dec 3, 2010, at 17:17 , S Ellison wrote: > David, > > Thanks for the comments. > > I think, though, that I have found the answer to my own post. > >> Question: How would one check, in R, that [contrasts .. are >> 'orthogonal in the row-basis of the model matrix'] for a particular >> fitted

Re: [R] Checking for orthogonal contrasts

2010-12-03 Thread S Ellison
David, Thanks for the comments. I think, though, that I have found the answer to my own post. >Question: How would one check, in R, that [contrasts .. are >'orthogonal in the row-basis of the model matrix'] for a particular >fitted linear model object? ?lm illustrates the use of crossprod() fo

Re: [R] Checking for orthogonal contrasts

2010-12-03 Thread Mike Rennie
There's a pretty good section in the R book by Crawley on contrast statements in R, including some discussion of the contrasts being orthogonal. I would say you should just make your own table and sort it out there- if you have equal sample sizes, then the contrast coefficients along the row shoul

Re: [R] Checking for orthogonal contrasts

2010-12-03 Thread Ista Zahn
Hi Steve, The short answer is that there is typically no reason to check (beyond looking to see what contrasts have been defined for the factors in the model; see ?contrasts) because the rules are pretty simple. 1) the design matrix is orthogonal on the row-basis (i.e., the columns sum to zero) whe

[R] Checking for orthogonal contrasts

2010-12-03 Thread S Ellison
A common point made in discussion of contrasts, type I, II, III SS etc is that for sensible comparisons one should use contrasts that are 'orthogonal in the row-basis of the model matrix' (to quote from http://finzi.psych.upenn.edu/R/Rhelp02/archive/111550.html) Question: How would one check, in