Re: [R] Least Squares Restricted Estimator

From: Bert Gunter <gunter.berton_at_gene.com>
Date: Mon, 19 May 2008 09:36:11 -0700

Nelson:

  1. Please read the posting guide: your question is practically unintelligible. You are far more likely to get a useful response if you follow its recommendations.
  2. However, I'll make a stab. **If** what you mean is simply to be able to choose arbitrary contrasts to estimate in linear models see ?lm, ?contrasts, ?C -- it can already been done. You may also be interested in pp 146-149 (the section on Contrast Matrices)in V&R's MASS Fourth Edition (a most useful book to have on your shelf, IMHO), which I believe may be exactly what you're looking for. The gregmisc package/bundle, among others, may also contain some useful functions for you to fit arbitrary contrasts, I think.

Cheers,
Bert Gunter
Genentech

-----Original Message-----
From: r-help-bounces_at_r-project.org [mailto:r-help-bounces_at_r-project.org] On Behalf Of Villoria, Nelson B
Sent: Monday, May 19, 2008 8:25 AM
To: r-help_at_r-project.org
Subject: [R] Least Squares Restricted Estimator

It is there any implementation of a Least Squares Restricted Estimator for a single equation in R? I have seen in the list some examples in which linear constraints are embedded within the equation, but let's say that I have a large number of coefficients (on factors) that I want them to sum up to 0 (so I can include an intercept, the full set of factors, and avoid the dummy trap). Is there any way to impose the restrictions in some matrix fashion (i.e. Rb = q)?  

Thanks,  

Nelson Villoria  

        [[alternative HTML version deleted]]



R-help_at_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_at_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. Received on Mon 19 May 2008 - 17:36:01 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 19 May 2008 - 18:30:41 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive