[R] Help with nonlinear regressional

Dieter Menne dieter.menne at menne-biomed.de
Tue Sep 2 16:03:48 CEST 2008

LuriFax wrote:
>
>
> When I do a regressional curve fit without any constraints I get a huge
> deviation from the measured value and the fitted curve at the first data
> point in the curve (se the bottom picture).
>
Note that this is a text-only list; most people cannot see your figure, I
read it on Nabble where it is possible to view the data

LuriFax wrote:
>
> My question is simply: can I constrain the fitting so that the first point
> used in fitting is equal to the measured first point?
>
Yes, you can. Normalize all points by dividing through the first data point,
and fit the model with a fixed initial value set to 1.

LuriFax wrote:
>
> Also, is this method of fitting statistically justified / a correct way of
> doing it when it comes to statistical error?
>
No, no, no, don't do it. We have similar curves from gastric emptying
(http://www.menne-biomed.de/gastempt/index.html), and 20 years ago some
authority recommended that method of clamping to the first data point. With
the effect that American medical journals, who usually do not have
statistical referees (British do), simply refuse to publish anything that
does not follow that advice. If you look carefully, it is not the first
point that is wrong, but there is to much tension in the fit so that the
first part as a whole is off.

So you have two choices: Either accept the slight deviation of the fit; or
add another parameter. If you have many sets of data, and can use nlme to
give "borrowing strength", the latter approach could work. If you have only
one curve, be careful when adding another parameter. With nls, it is not
that dangerous because this brutal function simply refuses to converge when
there is too much correlation between coefficients. With SigmaPlot, you can
end up with seeminglingly good fits; only when you look at the coefficient
StdDevs, you may note that these are 3.0 plus/minus 4000 or so!

Dieter

--
View this message in context: http://www.nabble.com/Help-with-nonlinear-regressional-tp19268931p19270899.html
Sent from the R help mailing list archive at Nabble.com.