Skip to content

Linear Regressions with non-negativity constraint

1 message · Aleksandrovic, Aljosa (Pfaeffikon)

#
Hi all,

I hope you are doing well?

I'm currently using lm() to estimate a linear multi-factor (5 factors without intercept) model as follows ...

factor.lm <- lm(y~x1+x2+x3+x4+x5-1, data = data.frame.rbind)

Using nnls(A,b) I estimated the same model, extended by a non-negativity constraint on the 5 independent factors. It works quite well but unfortunately nnls() only returns the x estimates. Is there a way to extract the Std.Errors, t-values, p-valuess and R^2 as well?

Thanks in advance and kind regards, 
Aljosa



Aljosa Aleksandrovic, FRM, CAIA
Senior Quantitative Analyst - Convertibles
aljosa.aleksandrovic at man.com
Tel +41 55 417 76 03

Man Investments (CH) AG
Huobstrasse 3 | 8808 Pf?ffikon SZ | Switzerland


-----Original Message-----
From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of Aleksandrovic, Aljosa (Pfaeffikon)
Sent: Donnerstag, 28. April 2016 15:06
To: Gabor Grothendieck
Cc: r-help at r-project.org
Subject: Re: [R] Linear Regressions with constraint coefficients

Thx a lot Gabor!

Aljosa Aleksandrovic, FRM, CAIA
Quantitative Analyst - Convertibles
aljosa.aleksandrovic at man.com
Tel +41 55 417 76 03

Man Investments (CH) AG
Huobstrasse 3 | 8808 Pf?ffikon SZ | Switzerland


-----Original Message-----
From: Gabor Grothendieck [mailto:ggrothendieck at gmail.com]
Sent: Donnerstag, 28. April 2016 14:48
To: Aleksandrovic, Aljosa (Pfaeffikon)
Cc: r-help at r-project.org
Subject: Re: [R] Linear Regressions with constraint coefficients

The nls2 package can be used to get starting values.
On Thu, Apr 28, 2016 at 8:42 AM, Aleksandrovic, Aljosa (Pfaeffikon) <Aljosa.Aleksandrovic at man.com> wrote:
--
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com
______________________________________________
R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.