How to perform regression with different error variances I have two series of measurements values, first series is X and second is Y.
I need to model Y as a function of X, where I know the method that was used to measure X is two times better then the method used for measure Y in terms of error variance.
I red about regression with error term in the independent variable, but I'm not sure what to do when there is also error term in the dependent variable and they are different.
Which technique/tools/constraints should I use for this sort of case?
 A: Well, in Bayesian world, you could do something like this (bugs/JAGS notation):
intcept ~ dnorm(0, 0.01)
sigma ~ dunif(0, 10)
X_SE ~ dunif(0, 10)
Y_SE <- X_SE * sqrt(2) # measurement error variance of X is supposed to be two times lower than of X

b ~ dnorm(0, 0.01)

for (i in 1:N) {
    X_real[i] ~ dnorm(X[i], 1/X_SE^2)
    Y_real_exp[i] <- intcept + b * X_real[i]
    Y_real[i] ~ dnorm(Y_real_exp[i], 1/sigma^2)
    Y[i] ~ dnorm(Y_real[i], 1/Y_SE^2)
}

The X[i] and Y[i] are your measurements; X_real and Y_real are the real values, which you don't know. X_SE and Y_SE are your measurement errors of X and Y. This is actually beautiful in bayesian models, that you can model this very easily. And the regression itself is done on those latent (unknown) values of X_real and Y_real. It is advised to standardize X.
Not sure how to do this in non-bayesian setting. Gaussian processes should be also able to handle uncertain input data, but I have no experience with that.
EDIT: I realized that this model would have an issue to identify the parameters X_SE and Y_SE. It can only be applied if you have some estimate how big these errors are since the model has no information how to tell how big these errors actually are.
A: So you know that $X$ is measured with half the error variance as $Y$. Then you should used weighted regression, and it is known that the optimal weights (for  least squares) is proportional to inverse variance.
With useful software the regression function have have an argument for the weights. I R with lm that is the argument weights=. With your two responses in vectors x and y this can be:
n <- length(x);   m <- length(y)    
Z <- c(x,y)
mod.wlm <- lm(Z ~ <your predictors>, weights=c(rep(0.5,n), rep(1,m)), ... )

Any good book about linear regression would have a chapter on weighted regression. 
