] [EMAIL PROTECTED]
To: r-help@stat.math.ethz.ch
Sent: Wednesday, September 27, 2006 12:51 PM
Subject: [R] Constrained OLS regression
Hello R helpers,
I am trying to do a linear OLS regression of y on two variables x1
and
x2. I want to constrain the coefficients of x1 and x2 to sum up to
1
Hello R helpers,
I am trying to do a linear OLS regression of y on two variables x1 and
x2. I want to constrain the coefficients of x1 and x2 to sum up to 1.
and therefore run a constrained OLS. Can anybody help with this? (I have
seen some answers to similar questions but it was not clear to me
Have a look at the linear.hypothesis function in the car package. For example:
mod.duncan - lm(prestige ~ income + education, data=Duncan)
linear.hypothesis(mod.duncan, income + education = 1)
Linear hypothesis test
Hypothesis:
income + education = 1
Model 1: prestige ~ income + education
://med.kuleuven.be/biostat/
http://www.student.kuleuven.be/~m0390867/dimitris.htm
- Original Message -
From: Mesomeris, Spyros [CIR] [EMAIL PROTECTED]
To: r-help@stat.math.ethz.ch
Sent: Wednesday, September 27, 2006 12:51 PM
Subject: [R] Constrained OLS regression
Hello R helpers,
I am