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

  • Generating a dummy for a measurement change in one independent variable

    Dear Statalist,

    I am currently writing my dissertation and have encountered some difficulties that are related to a measurement change in one of my data sets. I am investigating the effect of several variables on GDP during the time period of 1990-2015, with the use of Stata 16. The data covers multiple countries and is therefore in a panel data format.

    However, although the data on my trade variable is provided by the same source, the data is divided into two sets (1990-2005 and 2006-2015) due to a measurement change. I am therefore interested in creating a dummy variable that accounts for this change and is specifically related to the trade variable as well as the years after 2005. Due to confidentiality reasons, I am unfortunately not able to post my output files, but I hope that you will still be able to provide me with some advice on how to resolve this issue.

    Kind regards,

    Camille Smith
    Last edited by Camille Smith; 08 Apr 2021, 03:07.

  • #2
    Should be as simple as

    gen wanted= year>=2006


    • #3
      Dear Andrew,

      Thank you for your answer. I have tried the code and although it is working for indicating the change, I wonder if the dummy can be directly connected with the trade variable. This is since the measurement change only occurs in the trade data and not throughout the other variables of interest.


      • #4
        In this case, you believe that measurement change in the trade variable has an impact on your model. Including the indicator in your regression equation will tell you whether there is an expected change in the dependent variable between the two periods, after controlling for other regressors in the model. Of course, this does not rule out that the difference exists independent of the trade variable, but everything should be assessed in the context of your model. If you have panel data, you can test for a structural break and see if this coincides with the year that the trade data changed. See xtbreak from the 2020 Swiss Users Conference.
        Last edited by Andrew Musau; 08 Apr 2021, 03:55.


        • #5
          Thank you very much for your help! I will try your suggestions! Just to clarify, so there is no way of creating a dummy that would link to the trade variable and give meaningful results?


          • #6
            Just to clarify, so there is no way of creating a dummy that would link to the trade variable and give meaningful results?
            I do not know what your expectation is. There is no other way to create such an indicator different from what is shown in #2.