This post Estimate error on slope of linear regression given data with associated uncertainty gives the function for the linear regression in the case where both x- and y- data are affected by errors.
I wonder if someone known/has a function that does the same but for the case of no-constant term (similar to the option IncludeConstantBasis -> False
in LinearModelFit
).
Thanks.
Edit: Random Data Sample
SeedRandom[1]
n = 10;
x = Range[n];
y = x + 0.1 RandomVariate[NormalDistribution[], n];
data = {x, y}\[Transpose]
ex = Abs[0.03*RandomVariate[NormalDistribution[], n]];
ey = Abs[0.1 RandomVariate[NormalDistribution[], n]];
err = {ex, ey}\[Transpose]