4
$\begingroup$

I am using the estimated county-level poverty measure from the Small Area Income and Poverty Estimates (SAIPE) as the dependent variable in a regression analysis. This value is itself the result of a model and comes complete with upper and lower 90% confidence interval bounds. To be clear, each of my 3000+ observations has an estimated value and its own confidence interval based on the sample size for that county (targeted at 2.5% of population)

I am wondering about the best way to incorporate the uncertainty in my dependent variable into my regression model.

One way I have imagined is doing a random draw from a distribution using the estimated value and confidence interval for each observation. I would then re-run my regression using this simulated value for the dependent variable in my regression analysis and compare model outcomes to the model using the estimated value. By simulating new values and comparing many times I would gain an understanding of how sensitive my findings are to the estimates on the dependent variable.

A key component of this is pulling a random number based on the estimated value and the upper and lower confidence intervals. The data is left and right censored at 0 and 100 and the estimated value is not centered within the confidence interval that is: abs(estimate-cl) != abs(estimate-cu)

I was intrigued by the discussion here: Sampling random numbers from a distribution with asymmetric confidence intervals generated by a bootstrapped estimate

but a modified version of the code just generates the estimated value Here is an example using the first 6 records from the 2008 SAIPE

sample.size<-c(1258.850,4405.300,745.900,539.725,1444.850,273.02)
POV08L90<-c(8.77,8.24,18.08,13.90,10.55,22.45)
POV08H90<-c(12.54,11.18,24.82,20.87,15.27,33.83)
POV08<-c(10.7,9.9,24.5,18.5,13.1,33.6)
test.data<-data.frame(sample.size,POV08L90,POV08H90,POV08)

gammaGenerate<-function(dat){
  for(i in 1:length(dat$sample.size)){
    n<-dat[i,"sample.size"]
    cl<-dat[i,"POV08L90"]
    cu<-dat[i,"POV08H90"]
    barx<-dat[i,"POV08"]
    talpha = qt(p=0.95,df=n-1)
    s = (cu - cl)*sqrt(n)/(2*talpha)
    kappa = 6*s*s*n*( cl - barx + talpha*s/sqrt(n) )
    gamma.shape = 4/(kappa*kappa)
    gamma.scale = s/sqrt(gamma.shape)
    gamma.shift = barx - gamma.shape*gamma.scale
    print(c(barx,(rgamma(n = 5, shape = gamma.shape) + gamma.shift)))    
  }
}
gammaGenerate(test.data)

Any help you can offer--either directing me to a better method of dealing with the uncertainty in my dependent variable, or an explanation for why my rgamma always lands at 0 would be very welcome.

$\endgroup$
3
  • $\begingroup$ I guess simulation is always a possibility but if you have the values for all the observed independent and dependent variables and you assume a Gaussian noise term you can directly compute the variance of the estimated Y. Are you looking for a situation where only group averages are available? Then I could see a problem. $\endgroup$ Commented May 9, 2012 at 19:24
  • $\begingroup$ Michael, to clarify, I don't have any of the variables that went into estimating the Y value. I just have the estimate and its confidence interval. The independent variables I use in my own regression (with the estimated Y from SAIPE as the dependent variable) are all observed (rather than modeled/estimated). What I want to do is see how important the uncertainty inherent in using an estimated value as a dependent variable is to the outcomes of my own model. Does your suggestion of modeling the variance still apply here? $\endgroup$
    – csfowler
    Commented May 9, 2012 at 21:21
  • $\begingroup$ Then you can't do the calculations that I was suggesting. Maybe simulation is a workable idea. You definitely lose accruacy if you only have summary information. $\endgroup$ Commented May 9, 2012 at 22:08

1 Answer 1

1
$\begingroup$

The problem this is going to cause you in your regression is that different observations will have different uncertainties. This is known as "heteroskedasticity". Ignoring it in a regression context leads to inefficient estimates, although if the degree of heteroskedasticity is small, the inefficiency is small too. You can also get biased estimates of covariances etc. The rule of thumb I learned ("rule of thumb" = "no citation" in this response) was that if max(error variance)/min(error variance) < about 3, there wasn't likely to be much gained by attempting to correct for it.

Typically you would correct for this by using a weighted regression, e.g., weighted least squares, where, in the case of least squares, the weights are proportional to the inverse of the variances of the observations. In your case, you don't know the latter, because it's a combination of the "true" error variance and the measurement error variance. If you think the uncertainty in the dependent variable is large relative to the true error variance of your model, say as big or bigger, you could just apply weights derived from the uncertainties using the weights= option in lm and other regression functions. In fact, you could do that and compare the output to the unweighted estimates to see if there's any substantive difference.

Either way, I'd suggest using a heteroskedasticity-consistent covariance matrix estimator, for example, the one in the sandwich package. You might also find this answer to a somewhat-related question helpful if you are going to do hypothesis testing.

$\endgroup$
4
  • $\begingroup$ As I understand you I would use the variance (derivable from the confidence interval I have?) in the estimate of each individual observation as a weight for how much that observation should be counted towards model fit? But this over-values observations for populous counties (with larger sample sizes and tighter Conf. Intervals). Just because we have less uncertainty on the dependent variable for these counties doesn't make them more important overall. Short: can I estimate var. from conf. interval and is your solution dependent on var. not being systematically related to certain kinds of obs? $\endgroup$
    – csfowler
    Commented May 9, 2012 at 21:11
  • $\begingroup$ 1) They are more important for developing accurate estimates of your parameters, not in any moral sense. Check the link (added to the answer above, too: en.wikipedia.org/wiki/Heteroscedasticity. 2) The solution is not dependent on var. not being systematically related... but you could, with more work, use that relationship to get a better estimate of the var. 3) I'd just use the square of the length of the confidence interval as the estimate, or something proportional to that; R rescales the weights anyway, so it's not essential that the weights add to anything in particular. $\endgroup$
    – jbowman
    Commented May 9, 2012 at 21:20
  • $\begingroup$ This helps. Thanks. I am still hoping someone will explain why my daliance with rgamma didn't work out as expected, but I think your answer leads me appropriately down the path of good statistics easily explained to a reviewer or reader. Accepted with thanks $\endgroup$
    – csfowler
    Commented May 9, 2012 at 21:25
  • $\begingroup$ Oops! Forgot to actually answer the question! Basically, your calculated standard deviations for the gamma dist'n are very, very small, and the shape parameter is being driven close to 0 I suspect something is amiss with your kappa calculation, or with dividing by kappakappa on the next line (note ssn is $O(n^2)$, so kappakappa is $O(n^4$)). As an additional note, the data appears to be strongly negatively skewed, but the gamma is positively skewed, so it may not be that good a choice of dist'n here. $\endgroup$
    – jbowman
    Commented May 9, 2012 at 21:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.