# linear regression accounting for standard errors of variables

I am trying to figure out what is the best way to estimate beta why accounting for the uncertainty in x and y. For example, I have

x = rnorm(10,0,2)
x.se = rnorm(10,0,0.7)
y = 20*x
y.se = rnorm(10,0,1)

fit <- lm(y~x+0)


However, I would like to account for the standard errors of x and y. Ideally, I would like to estimate beta which takes into account this uncertainty. Any suggestions on how best to do this?

• Its call Deming or errors in variables regression: en.wikipedia.org/wiki/Errors-in-variables_models – user75138 Oct 22 '15 at 20:54
• this may be a naive question, but why would you have variability in y, are you just referring to to measurement error? – k6adams Oct 22 '15 at 20:59
• Yes, measurement error. I looked at Deming in MethComp (finzi.psych.upenn.edu/library/MethComp/html/Deming.html). However, I dont want to assume a flat standard error across all points. Also, is there a way to use the model with no intercept with deming. – user19758 Oct 22 '15 at 21:09