Now I have some data, and some have symmetric errorbars , but some just have a asymmetric errorbars (upper limit or lower limit).
Can lmfit do a fit with these data?
Hm,
interesting question. Do I understand correctly that some of the
*data* has asymmetric errorbars and you want that reflected in the
weighting done for the fit?
Obviously (I hope), for data with
symmetric errorbars one can use the standard error as the weighting of
the residual. I'm not sure how one best uses the full asymmetric
errorbars to weight the residual in any fit, not just with lmfit.
I suppose one could do a calculation in the objective function that was somewhat more involved than
residual = (data - model) / epsilon
that
changed the value of epsilon for each data point based on the sign of
(data - model). I'd be sort of surprised to see a case where that
makes a very big difference, and it doing a point-by-point check (or
even using numpy's where function) of (data - model) to decide on
epsilon would have a performance hit.
You could also
perform many fits to "data" taken from samples of your data+errorbars,
Monte Carlo style, and use the composite of those results. That could
easily support asymmetric errorbars on the data.