I have several (partially overlapping) data curves of oscilloscope-measured detector voltage as a function of time (very simple hypothetical example as follows):
There is an underlying physics process that is known to be smooth (but is too complex to model parametrically over the entire range) and the derivative of this curve is the quantity of interest. In order to calculate this derivative, one of several nonlinear regression methods can be employed to fit these curves. For simplicity let's assume it's a cubic spline fit (example below):
The derivative is then calculated from this spline fit as follows:
Due to the nature of the measurement techniques, the residuals do not have constant variance and thus the standard procedures for deriving prediction bounds don't apply. I have spent a lot of time reading up on this but with minimal stats experience/understanding, it is very difficult to ascertain which methods are best, and more importantly which are valid. I feel that maybe bootstrapping is my best bet, but the complexities of my case make me unsure on how to implement it. I have come up with the following possible strategy:
- Composite voltage data; perform spline fit and obtain residuals.
- Using a moving window, estimate a time-dependent local variance.
- Create N (thousands) resampled curves using this variance and re-fit the spline to these data curves.
- Calculate derivatives for original fit and each of the resampled fits to give a spread of data (if the number of resamples is high enough, these should be normally distributed about the mean).
- For the final derivative curve, use the mean of all the fit derivatives and use the variance of the spread of fits to define the prediction bounds using standard equations, or the delta method.
My questions (arising from my ignorance) are as follows:
- Is this even a correct way of implementing (moving block) bootstrapping, or is there a better way?
- Would it be better to do a regression fit on each individual curve and composite the derivatives, fit the composited curves and then bootstrap?
- Is a rolling window local variance just a massive fudge?
Any constructive advice would be greatly appreciated.