Re: [R] parameterization of factor in R

From: Oana Mocila <oanaom_at_hotmail.com>
Date: Thu 29 Dec 2005 - 04:52:03 EST


Dear Prof Brian Ripley and Graves,

Thank you for your replies. MASS has been very helpful!

Oana

>From: Spencer Graves <spencer.graves@pdf.com>
>To: Prof Brian Ripley <ripley@stats.ox.ac.uk>
>CC: Oana Mocila <oanaom@hotmail.com>, r-help@stat.math.ethz.ch
>Subject: Re: [R] parameterization of factor in R
>Date: Tue, 27 Dec 2005 12:27:05 -0800
>
> 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
>
>spencer.graves@pdf.com
>www.pdf.com <http://www.pdf.com>
>Tel: 408-938-4420
>Fax: 408-280-7915



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Dec 29 04:58:34 2005

This archive was generated by hypermail 2.1.8 : Thu 29 Dec 2005 - 09:38:28 EST