Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Correcting Measurement error using variance

    Dear all,

    I am working with a panel data, with 60 small states and and 30 years. I am basically replicating an other paper, where they say that gdp data has measurement errors, and to mitigate this issue they need to weight gdp measure by the variance of each single state.

    I guess I understand the logic of weighting for the variance, as higher variance should correspond to higher measurement errors.

    Can you suggest me any reference for this correction? I guess I should just transform gdp data, something like:

    Code:
    replace gdp=gdp/(function of variance)
    I guess I can't simply use this ratio and at the same time I guess the use of weights in the regressions is not correct.

    Thank you!










  • #2
    Rather than transforming the outcome, I think what you want to do here is use the inverse of the variance as an aweight. See -help aweight- for more details.

    Also, it is the norm in this community to use our real first and last names, so as to promote collegiality and professionalism. The Forum software does not enable you to change your username by editing your profile. But you can click on contact us below and send a message to the Forum administrator asking to have your name changed. Thank you.

    Comment


    • #3
      I excluded this option as I thought -aweight- was intended for sampling issues, not measurement errors, where we actually want to limit the bias caused by m.errors.

      However, I see that using weights as you suggest, would give higher "importance" in the regressions to states with lower variance in the gdp measure.


      Are you suggesting something like this?


      Code:
      egen weight=variance (d_log_gdp), by (state)
      
      reg ..... [aweight=1/weight]



      Thank you very much! Sorry for the name, I am new to this forum... I will ask to change my name or I will just register an other account with my university email.


      Comment


      • #4
        Something like that. There is no -egen, variance()- function, but you can get the standard deviation and square it. Then you can't put the calculation of 1/weight inside the -reg- command: you have to calculate it separately first. So something more like this:

        Code:
        egen weight = sd(d_log_gdp), by(state)
        replace weight = 1/(weight^2)
        reg ... [aweight = weight]

        Comment


        • #5
          Thank you veruy much, hopefully i will have a decent name soon...

          Comment


          • #6
            I have a feeling aweights is the way to go. But you might also check out -eivreg-. "eivreg fits errors-in-variables regression models when one or more of the independent variables are measured with error. To use eivreg, you must have an estimate of each independent variable's reliability or assume it is measured without error."
            -------------------------------------------
            Richard Williams, Notre Dame Dept of Sociology
            StataNow Version: 19.5 MP (2 processor)

            EMAIL: [email protected]
            WWW: https://www3.nd.edu/~rwilliam

            Comment

            Working...
            X