YorkFit


LinearModelFit alternative, that allows to fit to data with X and Y errors. Based on York 2004:

http://aapt.scitation.org/doi/pdf/10.1119/1.1632486


 (*testing cases*)

 data = {{0, 5.9}, {0.9, 5.4}, {1.8, 4.4}, {2.6, 4.6}, {3.3, 
     3.5}, {4.4, 3.7}, {5.2, 2.8}, {6.1, 2.8}, {6.5, 2.4}, {7.4, 
     1.5}};
 errs = {{1000., 1.}, {1000., 1.8}, {500., 4.}, {800., 8.}, {200., 
      20.}, {80., 20.}, {60., 70.}, {20., 70.}, {1.8, 100.}, {1, 
      500.}} // Sqrt[1/#] &;

 << YorkFit`

 fit = YorkFit[data, "Errors" -> errs]
 lin = fit["fit"];
 sm = fit["\[Sigma]b"];
 sk = fit["\[Sigma]a"];
 Show[
  OListPlot[data, ErrorBars -> errs],
  (*Plot[ fit["a"] + x *fit["b"], {x,Min[data\[LeftDoubleBracket]All,1\
 \[RightDoubleBracket]], Max[data\[LeftDoubleBracket]All,1\
 \[RightDoubleBracket]]}],*)

  Plot[{lin[x], lin[x] - sm x - sk, lin[x] + sm x + sk}, {x, -1, 9}, 
   PlotStyle -> {Directive[Thick, Red], Directive[Dashed, Gray], 
     Directive[Dashed, Gray]}]
  ]

title