# Regression line envelope from Census ACS data

Context:

I’m working with the Census Bureau’s American Community Survey (ACS) data which are samples (not complete enumerations) aggregated at different spatial scales. Each ACS estimate is provided with a margin of error (which is easily converted to a standard error, SE). I’m attempting to generate a regression line ‘envelope’ by randomly generating X and Y values using the estimated values and associated SEs. In other words, I want to see what the regression line might look like given the level of uncertainty associated with both the X and Y estimates.

Problem:

My approach seemed simple at first: using Monte Carlo techniques, generate random x’s and y’s using the estimates (X and Y) and associated error distribution (X_SE and Y_SE), plot the OLS regression results, then plot the OLS results using the estimated values (X and Y) to get the central regression line. What I observed is that as the SE increases (relative to the estimate), the cluster of regression lines take on a ‘flatter’ slope—away from the regression line generated using the estimated values X and Y. Here’s an example (the grey lines are the regression lines from 1000 iterations and the red line is the regression for the estimates, x and y):

ID    X   X_SE Y Y_SE
1 22752 2350 644 31
2 20251 1554 498 27
3 31041 1982 868 22
4 20838 3643 544 58
5 26876 3665 725 57
6 24656 2501 626 31
7 25291 4052 726 55
8 28003 5795 772 70
9 21254 2442 606 44
10 22977 1639 669 31
11 19870 2560 524 95
12 26983 3577 782 64
13 20709 2781 593 46
14 22213 3116 647 71
15 19401 1875 496 70
16 27137 1812 814 42


After surfing the web, I’ve come across some helpful links. It appears that one assumption underlying the standard regression models is that “regressors [independent variables] have been measured exactly, or observed without error; as such, those models account only for errors in the dependent variables, or responses”. I believe that the problem I’m encountering is referred to as errors-in-variables models. Googling this term (as well as others I’ve come across such as regression dilution and attenuation) returns many links--mostly articles scattered across many disciplines. But none are shedding light into what exact course I should follow in addressing my problem, nor am I finding pertinent information in introductory or intermediate stats textbooks. So my questions are:

1. Is the MC approach I’m taking a good one in estimating the range of regression lines? If so can a standard regression model be used in the MC subroutine (assuming of course that pertinent data distribution requirements, other than a fixed independent variable, are met)?

2. How should I estimate the central regression line? I’ve come across some R libraries such as Deming and Model II that seem to address my problem, however, I don’t see an option in those routines that take into account each X’s SE values. But more importantly, I don’t fully understand what it is that those functions do exactly. Any lucid perspective on this would be greatly appreciated.

-
Yes, I think there is an "inherent flaw" in your approach. Your problem is in what rnorm does. You're generating a new dataset for each of those regression lines that are used for the "envelope" and the higher the specified standard deviation, the less likely the regression line from your model will fall within that envelope because the data will be more spread out relative to your data. Just try it with XSE <- 100 to illustrate what happens! The standard deviation of each of the datasets is not the standard error of the regression. Hopefully someone will explain the best approach. –  smillig Apr 11 '12 at 21:53
Thanks @smillig. I wondered about that too but just could not come up with another approach. –  MannyG Apr 11 '12 at 23:22
I've made some significant edits to this question since smillig's comments. –  MannyG Oct 9 '12 at 16:54