Re: [R] Constraint on coefficient when fitting with lm, glm etc ...

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Fri 09 Dec 2005 - 10:04:03 EST

I've just answered a similar question from Richard O'Keefe.

MASS p.445 shows you how to do this for logistic regression, and the example is easy to modify.

On Thu, 8 Dec 2005, Devred, Emmanuel wrote:

> Dear R-users,
>
> I would like to know if there is any way to constraints optimized parameters
> using the function lm, glm or others that are written in the form:
> Lm( formula, data ...)
> As I understand, formula are of the type y ~ X1 +X2+ ... Xi (where Y, X1, X2
> ..Xi are vectors). In my case I would like the estimates of this linear
> combination computed with lm to be positives.
> I haven't found anything about it in the documentation, I would like to use
> the lm.ridge function with positives estimates.
> Would anyone have already met this problem ?
>
> Thank you,
>
> Emmanuel
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> 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
>

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
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 09 10:13:32 2005

This archive was generated by hypermail 2.1.8 : Fri 09 Dec 2005 - 14:29:52 EST