Re: [R] how to put constraint in R?

From: Spencer Graves <spencer.graves_at_pdf.com>
Date: Fri 23 Dec 2005 - 04:36:26 EST

          What are you trying to do?

          Suppose, for example, that you have a categorical variable representing 3 different age groups, and you want to estimate a linear model. As long as R recognizes the variable as categorical (of class

"factor" or "ordered factor", R handles this automatically using 
"contrasts".  If this is your question, I suggest you read about 
"factors", "Formulae for Statistical Models" and "Contrasts" in "An 
Introduction to R", which is the upper-left choice after 'help.start()' in recent versions of R (or downloadable from www.r-project.org -> Documentation -> Manuals).

          If you would like more help from this group, I believe you will increase your chances of getting quickly the information you seek in you PLEASE do read the posting guide! "www.R-project.org/posting-guide.html".

	  hope this helps.
	  spencer graves

Oana Mocila wrote:

> Dear all,
>
> I have a problem when I was working on Age-Period-Cohort study in R. I tried
> to put constraint to
> two coefficients on age (so that to solve the identification problem due to
> linear dependency). But
> I don't know how to do this in R(put constraint). If you could give me some
> suggestion, it will be very helpful!
>
> Oana
>
> ______________________________________________
> 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

-- 
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 Fri Dec 23 07:05:54 2005

This archive was generated by hypermail 2.1.8 : Fri 23 Dec 2005 - 09:43:16 EST