I am trying to calculate the confidence band about a regression line using the top answer here: Understanding shape and calculation of confidence bands in linear regression
I don't entirely understand the answer, but I am calculating the confidence interval as:
$\sqrt \frac{\Sigma_i^n (Y_i - \hat{Y})^2}{n-2} \sqrt{\frac{1}{n} + \frac{(X-\bar{X})^2}{\Sigma_i^n (X_i-\bar{X})^2}}$
I assume that this will give me a 1-sigma confidence interval. My question is: Is there a way to include the uncertainty on my data points in my confidence interval expression above? (My best fit line is weighted by the uncertainty on my data points.)