Hi Kate and others,
thanks for the info.
Btw, you sent the different
methods to analyze the data: nls, nls.lm and nlrob. Comparing the
results visually nlrob performed better then nls, but nls.lm (using the
0.9 quantile of residuals) was still better than nlrob. My data may
have a rather large amo
f your goal is to minimize sum( (observed -
> predicted)^2), the function you give nls to minimize (optim.fun in your
> case) should return the vector (observed - predicted), not the scalar sum(
> (observed - predicted)^2). You may want to see the nls.lm function in
> package minpack.lm f
Greetings R users, maybe there is someone who can help
me with this problem:
I define a function "optim.fun" and want as output the
sum of squared errors between predicted and measured
values, as follows:
optim.fun <- function (ST04, SM08b, ch2no, a, b, d, E)
{
predR <-
(a*SM08b^I
3 matches
Mail list logo