Re: [R] parameterization of factor in R

From: Spencer Graves <>
Date: Wed 28 Dec 2005 - 07:27:05 EST

          If you are not familiar with MASS (Modern Applied Statistics with S, 4th ed, Venables and Ripley 2002, Springer), I can assure you it is an excellent reference for learning R. There are many books on R that I have not read, but among the books in my personal library, I refer to MASS fairly frequently. If it is beyond your budget and not in a local library, I encourage you to investigate the possibility of having that library obtain a copy. If the library needs justification, please explain what you know of the book, how it became recommended for you, the problems you hope it will help you solve, etc.

          Spencer Graves

Prof Brian Ripley wrote:

> ?contr.sum
> And Chapter 6 of MASS would have explained all this to you, so if you have 
> further questions please consult it.
> On Tue, 27 Dec 2005, Oana Mocila wrote:

>>I encountered this problem with parameterization in R:
>>I have two factors in a regression. how about if I want to
>>set constraint so that for each factor, the sum of their
>>coefficients equals to zero(instead of choosing a reference
>>category)? for example, I have factor(variable) A(with three
>>categories) and factor(variable) B(with 4 categories), and I want
>>to parameterize so that the sum of the three coefficients of
>>A = 0, and sum of the four coefficients of B = 0? I
>>mean how to do it in R?
Spencer Graves, PhD
Senior Development Engineer
PDF Solutions, Inc.
333 West San Carlos Street Suite 700
San Jose, CA 95110, USA <>
Tel:  408-938-4420
Fax: 408-280-7915

______________________________________________ mailing list
PLEASE do read the posting guide!
Received on Wed Dec 28 07:33:27 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:41:42 EST