# NonlinearModelFit to data with error bars in two dimenions...

**URL:** <https://community.wolfram.com/t/nonlinearmodelfit-to-data-with-error-bars-in-two-dimenions/8169>\
**Category:** Questions\
**Tags:** data-science, graphics-and-visualization, modeling\
**Created:** [March 20, 2016, 3:21am UTC](https://community.wolfram.com/t/nonlinearmodelfit-to-data-with-error-bars-in-two-dimenions/8169 "2016-03-20T03:21:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![douglasjbuettner](https://avatars.discourse-cdn.com/v4/letter/d/97f17d/32.png) [@douglasjbuettner](https://community.wolfram.com/u/douglasjbuettner)\
**Post date:** [March 20, 2016, 3:21am UTC](https://community.wolfram.com/t/nonlinearmodelfit-to-data-with-error-bars-in-two-dimenions/8169/1 "2016-03-20T03:21:11Z")

</div>

I’m looking at examples for using NonlinearModelFit but I can’t see any examples for doing fits when the data has measurement error bars in two dimensions, they only seem to show how to do this with error bars along a single dimension (usually along the y-axis). For example: [http://mathematica.stackexchange.com/questions/25646/using-nonlinearmodelfit-to-fit-data-with-errors](http://mathematica.stackexchange.com/questions/25646/using-nonlinearmodelfit-to-fit-data-with-errors), and [Fit Models with Measurement Errors—Wolfram Documentation](https://reference.wolfram.com/language/howto/FitModelsWithMeasurementErrors.html) are two examples I’ve found online and in the documentation, but how do I extend this for two dimensional error bars?

Thanks!

---

<div class="post-metadata">

**Author:** ![douglasjbuettner](https://avatars.discourse-cdn.com/v4/letter/d/97f17d/32.png) [@douglasjbuettner](https://community.wolfram.com/u/douglasjbuettner)\
**Post date:** [June 3, 2017, 1:26pm UTC](https://community.wolfram.com/t/nonlinearmodelfit-to-data-with-error-bars-in-two-dimenions/8169/2 "2017-06-03T13:26:44Z")

</div>

I’m going to answer my own question on this one. After some trial and error what is needed is to create an RMS error from the error bars in each dimension and then use that as an error weight.
