[R] Help with nonlinear regressional

LuriFax luri-fax at hotmail.com
Wed Sep 3 17:41:21 CEST 2008


Thank you very much for your time and thorough answers, Dieter Menne and
Daniel Malter.

It has to be said that I lack some of the basic statistical background and
don´t have a "gut feeling" if the tings I do is correct or not. Also, I use
SigmaPlot for the fitting, since I am not that familiar with R. The reason
that I choose the R help forum is that I know R is highly regarded among
statisticians and I probably will, in the future, use R in stead of
SigmaPlot. 

-I forgot to mention what equation I use for fitting: y0+a*(1-exp(-b*x)), 
and for the halftime calculation I use: ln(2)/b

1.
I have tried fitting a double exponential equation (
y0+a*(1-exp(-b*x))+c*(1-exp(-d*x)) ) and that of course give a better fit,
but it makes the the biological interpretations more difficult. 
Is it then possible to separate the two fraction/ parts (a fast diffusing
and a slow diffusing component, in my example) to modell the curves
independent of each other? (for calculation of halftime etc).

2.
In SigmaPlot I get the R, Rsqr (in my example figure in the first post those
are 0,983 and 0,967 respectively) and I wonder if these values is enough for
evaluation of the fit? 
I have seen that chi-square previously has been used for this in FRAP
literature and "Probability Q tells you if the chi-square calculated from
the fitting results are reasonably within the range of possible measurement
errors. Q > 0.1 can be considered a good fit, Q > 0.01 is a moderately good
fit, and Q < 0.01 recommends you either to think about different model
equation or..." (Igor Pro manual). Then what is the relation between Rsqr
and chi-square, and is there a general threshold for a good/bad fit?

3.
If you have 12 independent examples (equal x-value (time)) should you:
a, fit all single experiments and find the average halftime, or
b, calculate the average value for each time-point and base the fit on the
average - and then find the halftime, or
c, import all the curves in SigmaPlot and do the fitting based on multiple
values and best fit for each time-point?
What will the outcome be in these different approaches?


I know my questions may seem trivial for you, but I really appreciate some
constructive feedback. 

Thank you in advance!



Daniel Malter wrote:
> 
> With that you should probably get advice from your local stats department.
> Although you describe your procedure, we do not know your data. And in
> particular, we do not know what you do in R. 
> 
> Just from inspecting your graph, it looks that your estimated function
> undershoots/overshoots the fitted values systematically for certain
> intervals of the fit. For example, over the entire last part of the fitted
> curve, the actual data points lie predominantly above the fitted curve and
> for a long interval before that they lie predominantly below the fitted
> curve. This should not be so, which indicates that your fitted function,
> despite its relative fit, may not reflect your data generating process
> well.
> 
> Regarding fixing the function in the first observation/data point: That's
> wrong. This point would then carry an infinitely greater amount of
> information than all the other points (because you assume zero error for
> this point). Just imagine you would have a second point like this
> somewhere
> else on the timeline. Then you could perfectly fit your nonlinear function
> with two data points. You could only do that if your first point is
> nonstochastic, i.e. if there is no error and you would get the EXACT same
> value at that point in time every time you run your experiment.
> 
> Again, I think it's a question the definition of your function.
> 
> Best,
> Daniel
> 
> -------------------------
> cuncta stricte discussurus
> -------------------------
> 
> -----Ursprüngliche Nachricht-----
> Von: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] Im
> Auftrag von LuriFax
> Gesendet: Tuesday, September 02, 2008 8:06 AM
> An: r-help at r-project.org
> Betreff: [R] Help with nonlinear regressional
> 
> 
> Dear All,
> 
> I am doing experiments in live plant tissue using a laser confocal
> microscope. The method is called "fluorescence recovery after
> photo-bleaching"  (FRAP) and here follows a short summary:
> 
> 1. Record/ measure fluorescence intensity in a defined, round region of
> interest (ROI, in this case a small spot) to determine the initial
> intensity
> value before the bleaching. This pre-bleach value is also used for
> normalising the curve (pre-bleach is then set to 1).
> 
> 2. Bleach this ROI (with high laser intensity).
> 
> 3. Record/ measure the recovery of fluorescence over time in the ROI until
> it reaches a steady state (a plateau).
> .
> n. Fit the measured intensity for each time point and mesure the half time
> (the timepoint which the curve has reached half the plateau), and more...
> 
> The recovery of fluorescence in the ROI is used as a measurement of
> protein
> diffusion in the time range of the experiment. A steep curve means that
> the
> molecules has diffused rapidly into the observed ROI and vice versa.
> 
> 
> 
> 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).
> 
> My question is simply: can I constrain the fitting so that the first point
> used in fitting is equal to the measured first point? Also, is this method
> of fitting statistically justified / a correct way of doing it when it
> comes
> to statistical error? 
> 
> Since the first point in the curve is critical for the calculation of the
> halftime I get a substantial deviation when I compare the halftime from a
> "automatically" fitted curve (let software decide) and a fitting with a
> constrained first-point (y0).
> 
> I assume that all measured values have the same amount of noise and
> therefore it seems strange that the first residual deviates that strongly
> (the curve fit is even not in the range of the standard deviation of the
> first point). 
> 
> 
> I will greatly appreciate some feedback. Thank you.
> 
> -----------------------
> http://www.nabble.com/file/p19268931/CurveFit_SigmaPlot.png
> --
> View this message in context:
> http://www.nabble.com/Help-with-nonlinear-regressional-tp19268931p19268931.h
> tml
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 
> 

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



More information about the R-help mailing list