Extrapolate using curvefit without plotting
BMangum
I am doing a lot of fitting in a loop, and don't need to actually plot the data.
As I would like to keep this fast, is there a way to have the output fit wave extend over a certain range without first plotting?
I know I could simply use the fit coefficients, but I am also extrapolating the prediction bands for which there are no coefficients generated.
Is there a method for extrapolating prediction bands using curvefit without plotting first?
Also, as I am doing a polynomial fit, I am aware that this is only an approximation. I am not extrapolating far, so this is a risk I am willing to take.
Thanks.
/W=2
flag should do the job, if I understand your question correctly. However, this should be the default option whencurvefit
is called from a procedure (since I see the words 'loop' and 'fast' -- see the IP7 help file -- looking at my IP6 code I'm not 100% sure if this is also true for the IP6 help file; Just test it).Anyway, existing plots *might* get updated (
doupdate
somewhere in the code) causing additional computation time. Minimize or kill/recreate the window in these cases.HJ
November 29, 2016 at 01:04 pm - Permalink
I am calling
curvefit
from a procedure and just want to extend the fit over a range that I can specify rather than plot the wave first.November 29, 2016 at 05:23 pm - Permalink
For an example of extrapolating a fit result, execute:
If that is not clear, go back to "Guided Tour 2 - Data Analysis" and do the tour through "Extrapolating a Fit After the Fit is Done".
Although this example involves plotting, the extrapolation part does not require it.
November 29, 2016 at 05:42 pm - Permalink
Extrapolating the fit itself is not an issue as the equation for the curve and the coefficients are reported out.
The problem I am having is extrapolation of prediction bands and confidence bands without first having to plot the data.
November 30, 2016 at 09:20 am - Permalink
The solution involves the covariance matrix and chi-square...
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
December 2, 2016 at 05:10 pm - Permalink
I would like to revisit this request.
I am in similar need. I would like to do a curvefit of permutations of the data and then extrapolate from those fits to a new condition. Additionally I would like to include the prediction interval of each fit at the extrapolate point. I can sort of do this using similar approaches with a graphed data set using the above mentioned flag.
Is there a more direct method available in IP8 or 9 to allow me to fully script this?
Andy
September 25, 2020 at 12:31 pm - Permalink