cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar

Residuals Query

Hi,

I'm currently working on some data that we are trying to fit a curve to, to create a formula that will allow us to extrapolate the data. None of the models were fitting well as they all had very high AIC and BIC values, so transformed my data using a log function. I then went back into the fit curve section and found a mechanical growth model works well as it produced very good AIC and BIC values however I noticed there was a pattern in the residuals as shown below (Y = Residual, X = Data). These residuals are showing a pattern as there is a slight curve however the figures are showing residuals of 0.1-0.05 when my actual figures in the data are range from 5-16. Does this make the pattern in the residuals insignificant as they are so small in comparison to the actual data? Each data point isn't independent of each other as well as it's essentially time series data if that plays into it? I've also attached below a graph of the results generated off my model (X) against the original data (Y) on a graph. Any feedback would be greatly appreciated, thanks.

SelectionIguana_0-1764671190169.png

SelectionIguana_1-1764671665265.png

 

 

3 REPLIES 3

Re: Residuals Query

Hi @SelectionIguana ,

 

Your data has a dependency over the X axis (i.e. the time) which is to be expected with curved data, these shapes can appear in near perfect 'functional' models and are a product of the systematic curvature because the relationship between X and Y is not linear. Even with a perfect fit, residuals can cluster in patterns due to the model’s shape (here's an example of a model below with RSq of 0.99 but different residuals). You'll also likely see greater variation at different parameters, ie the values may always be bigger at the asymptote vs. the location.

Ben_BarrIngh_0-1764677562598.png

 

I'm sure others will add to this, but unless there's an obvious trend difference that you can grab from the residuals, I would focus on the other model test parameters.

 

Thanks,
Ben

“All models are wrong, but some are useful”
dlehman1
Level VI

Re: Residuals Query

If the second graph is the actual data, I'm inclined to ignore the obvious pattern in the residuals - the linear fit looks pretty compelling.  From the residuals graph I'd certainly think there is a nonlinear pattern.  Whether to try to model that pattern or just rely on the linear fit really calls for more context about the data.  There aren't many data points, so I would want to understand what is being measured here and what the purpose of the model is.  Without that context, I think it is dangerous to rely either on the small size of the residuals or the clear pattern in the residuals as a reason to choose a model.  Can you say something about what is being measured and the purpose of the model?

rcast15
Level III

Re: Residuals Query

You mentioned the data is actually a time series so that consecutive measurements are not independent of each other. I think this also helps explain the pattern in the residuals you are seeing. There is most likely some autocorrelation between successive points, which then means that your residuals are not independent and thus appear in clusters over time, like we are seeing here. You can run a Durbin-Watson test to test for this, which is available in JMP.

Ultimately, the error structure in your model is wrong, not necessarily that your fit itself is wrong (we would need to see your raw X, Y data for this however).

Recommended Articles