I'd like to fit a Nonlinear curve to a dataset, which has an uncertainties vector associated. The problem is that I'd also like to add Weights to the fit. Lets say that my dataset is:
data={{-2., 1.00884}, {-1.5, 2.75486}, {-1., 4.00577}, {-0.5,
4.75401}, {0., 5.00771}, {0.5, 4.7533}, {1., 4.00055}, {1.5,
2.75478}, {2., 1.0017}}
and my measurement errors (or uncertainties) are:
u={0.041, 0.0235, 0.011, 0.0035, 0.001, 0.0035, 0.011, 0.0235, 0.041}
There is some documentation at wolfram's website that show me how to handle it. But I'd like to add Weights to my fit. Lets say:
weights={0.4, 1.1, 1.6, 1.9, 2., 1.9, 1.6, 1.1, 0.4}
Meaning that my central is more important for my fit. Any idea of how can I do this? I know how to do the easy part of the job:
NonlinearModelFit[...., Weights -> weights]
? $\endgroup$Weights -> weights/u
orWeights -> weights/u^2
. $\endgroup$