Re: [R] Constrained OLS regression

2006-09-28 Thread vito muggeo
] [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

[R] Constrained OLS regression

2006-09-27 Thread Mesomeris, Spyros [CIR]
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

Re: [R] Constrained OLS regression

2006-09-27 Thread David Barron
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

Re: [R] Constrained OLS regression

2006-09-27 Thread Dimitris Rizopoulos
://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