[R-SIG-Finance] curve fitting using lm with constraints
abe chan
abechan_99 at yahoo.com
Thu Apr 14 07:07:48 CEST 2011
Hi Everyone,
I am using "lm" to fit a curve with the form y=ax^2 + bx +c
out = lm(y~x+I(x^2)
My question is..if I have 2 set of equations that need to be satisfied at the
same time..
for example, the coefficients of a and b of the above regression need to
satisfy:
a+b=5
and a-b=2
How should I tackle this type of problem? I really appreciate if someone can
shed some light.
Thanks.
Imagineer.
More information about the R-SIG-Finance
mailing list