[R] Fitting to a sum

pj-uk paulsouthern at gmail.com
Thu Sep 23 14:47:16 CEST 2010


I've run into a problem with a fitting procedure I would like R to solve for
me. Basically I have to fit some data to an equation which includes a sum
within the formula e.g.

Y(x;a,b,c) = f_i(x;a,b,c_i) + m*x

where a,b are unknown and f_i(x) is the sum of another function over a known
interval in which c_i is changing for each element of the sum.  So in the
end i will be fitting to an equation that will look something like:

Y(x) = f_1(x,a,b,c_1) + f_2(x,a,b,c_2) + f_3(x,a,b,c_3) + ... +
f_n(x,a,b,c_n)

Any tips on how to approach this with R?  In a symbolic language such as
mathematica I could express Y(x) using a loop and then solve for a and b,
but struggling how to do this in R.

Thanks,
Paul
-- 
View this message in context: http://r.789695.n4.nabble.com/Fitting-to-a-sum-tp2551960p2551960.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list