Dear Peng Yu,

Perhaps you're referring to my text, Applied Linear Regression Analysis and
Generalized Linear Models, since I seem to recall that you sent me a number
of questions about it. See Section 9.1.2 on linear contrasts for the answer
to your question.

I hope this helps,
 John

--------------------------------
John Fox
Senator William McMaster 
  Professor of Social Statistics
Department of Sociology
McMaster University
Hamilton, Ontario, Canada
web: socserv.mcmaster.ca/jfox


> -----Original Message-----
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
On
> Behalf Of Peng Yu
> Sent: November-08-09 4:52 PM
> To: r-h...@stat.math.ethz.ch
> Subject: Re: [R] reference on contr.helmert and typo on its help page.
> 
> On Sun, Nov 8, 2009 at 11:28 AM, Peter Dalgaard
> <p.dalga...@biostat.ku.dk> wrote:
> > Gabor Grothendieck wrote:
> >>
> >> On Sun, Nov 8, 2009 at 11:59 AM, Peng Yu <pengyu...@gmail.com> wrote:
> >>>
> >>> On Sun, Nov 8, 2009 at 10:11 AM, Duncan Murdoch <murd...@stats.uwo.ca>
> >>> wrote:
> >>>>
> >>>> On 08/11/2009 11:03 AM, Peng Yu wrote:
> >>>>>
> >>>>> I'm wondering which textbook discussed the various contrast matrices
> >>>>> mentioned in the help page of 'contr.helmert'. Could somebody let me
> >>>>> know?
> >>>>
> >>>> Doesn't the reference on that page discuss them?
> >>>
> >>> It does explain what the functions are. But I need a more basic and
> >>> complete reference. For example, I want to understand what 'Helmert
> >>> parametrization' (on page 33 of 'Statistical Models in S') is.
> >>>
> >>
> >> Just google for: Helmert contrasts
> >
> > Or,
> >
> >> contr.helmert(5)
> >  [,1] [,2] [,3] [,4]
> > 1   -1   -1   -1   -1
> > 2    1   -1   -1   -1
> > 3    0    2   -1   -1
> > 4    0    0    3   -1
> > 5    0    0    0    4
> >
> >> MASS::fractions(MASS::ginv(contr.helmert(5)))
> >     [,1]  [,2]  [,3]  [,4]  [,5]
> > [1,]  -1/2   1/2     0     0     0
> > [2,]  -1/6  -1/6   1/3     0     0
> > [3,] -1/12 -1/12 -1/12   1/4     0
> > [4,] -1/20 -1/20 -1/20 -1/20   1/5
> >
> > and apply brains.
> >
> > I.e., except for a slightly odd multiplier, the parameters represent the
> >  difference between each level and the average of the preceding levels.
> 
> I realized that my questions are what a contrast matrix is and how it
> is related to hypothesis testing. For a give hypothesis, how to get
> the corresponding contrast matrix in a systematical way? There are
> some online materials, but they are all diffused. I have also read the
> book Applied Linear Regression Models, which doesn't give a complete
> descriptions on all the aspects of contrast and contrast matrix. But I
> would want a textbook that gives a complete description, so that I
> don't have to look around for other materials.
> 
> ______________________________________________
> R-help@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.

______________________________________________
R-help@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.

Reply via email to