Announcement

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

  • The Lewbel (2012) heteroscedasticity approach for identification

    Dear Stata community,

    I aim to investigate the impact of the number of police officers (log-transformed as ln_police) on the reported number of crimes (log-transformed as ln_crime) using city-level panel data. My dataset includes past crime occurrence experience (past_crime_exper) and future expected crime levels (future_crime_freq_codes), which is a categorical variable with values: 0 "Decreasing," 1 "Uncertain," 2 "Increasing," 3 "None," and 4 "Not expected to happen in the future". Additionally, I have year fixed effects (year) and city fixed effects (city_name). How can I utilize Lewbel's (2012) heteroscedasticity-based identification approach to establish the causal effect of police presence (the endogenous ln_police)on crime reports? Please note that the same city could experience different types of crimes within the same year, so I do not use the year variable to declare xtset. I only use city_name.

    The model without addressing endogeneity is given as follows:
    ppmlhdfe ln_crime ln_police i.past_crime_exper, absorb (year city_name) irr nolog cluster (city_name)

    and the example data is given below. Thanks for your insights!

    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input str87 city_name float(year ln_crime ln_police past_crime_exper future_crime_freq_codes)
    "Aarhus Kommune"                  2021 1.8184465 1.8184465 1 2
    "Aarhus Kommune"                  2021 1.8184465 1.8184465 1 2
    "Aarhus Kommune"                  2021 1.8184465 1.8184465 1 2
    "Aarhus Municipality"             2022         .  .8813736 1 2
    "Aarhus Municipality"             2023  .8813736  .8813736 0 2
    "Abasan Al-Kabira Municipality"   2019   2.49178   2.49178 1 2
    "Abasan Al-Kabira Municipality"   2019   2.49178   2.49178 1 0
    "Abasan Al-Kabira Municipality"   2019   2.49178   2.49178 1 2
    "Abasan Al-Kabira Municipality"   2019   2.49178   2.49178 0 2
    "Abasan Al-Kabira Municipality"   2019   2.49178   2.49178 1 2
    "Abasan Al-Kabira Municipality"   2019   2.49178   2.49178 1 0
    "Abasan Al-Kabira Municipality"   2020   2.49178   2.49178 0 2
    "Abasan Al-Kabira Municipality"   2020   2.49178   2.49178 1 2
    "Abasan Al-Kabira Municipality"   2020   2.49178   2.49178 1 0
    "Abasan Al-Kabira Municipality"   2020   2.49178   2.49178 1 2
    "Abasan Al-Kabira Municipality"   2020   2.49178   2.49178 1 0
    "Abasan Al-Kabira Municipality"   2020   2.49178   2.49178 1 2
    "Abasan Al-Kabira Municipality"   2021   2.49178   2.49178 1 0
    "Abasan Al-Kabira Municipality"   2021   2.49178   2.49178 1 2
    "Abasan Al-Kabira Municipality"   2021   2.49178   2.49178 1 2
    "Abasan Al-Kabira Municipality"   2021   2.49178   2.49178 1 2
    "Abasan Al-Kabira Municipality"   2021   2.49178   2.49178 1 2
    "Abasan Al-Kabira Municipality"   2021   2.49178   2.49178 1 0
    "Abasan Al-Kabira Municipality"   2022 2.3124382 2.3124382 1 2
    "Abasan Al-Kabira Municipality"   2022 2.3124382 2.3124382 1 2
    "Abasan Al-Kabira Municipality"   2022 2.3124382 2.3124382 1 2
    "Abasan Al-Kabira Municipality"   2022 2.3124382 2.3124382 1 2
    "Abasan Al-Kabira Municipality"   2022 2.3124382 2.3124382 1 2
    "Abasan Al-Kabira Municipality"   2023 2.3124382 2.3124382 . 2
    "Abasan Al-Kabira Municipality"   2023 2.3124382 2.3124382 . 2
    "Abasan Al-Kabira Municipality"   2023 2.3124382 2.3124382 . 2
    "Abasan Al-Kabira Municipality"   2023 2.3124382 2.3124382 . 2
    "Abasan Al-Kabira Municipality"   2023 2.3124382 2.3124382 . 2
    "Abejorral"                       2022         .  .8813736 . .
    "Aberdeenshire Council"           2023  2.776472  2.776472 1 2
    "Aberdeenshire Council"           2023  2.776472  2.776472 1 2
    "Aberdeenshire Council"           2023  2.776472  2.776472 1 2
    "Aberdeenshire Council"           2023  2.776472  2.776472 1 2
    "Aberdeenshire Council"           2023  2.776472  2.776472 1 2
    "Aberdeenshire Council"           2023  2.776472  2.776472 1 2
    "Aberdeenshire Council"           2023  2.776472  2.776472 1 2
    "Aberdeenshire Council"           2023  2.776472  2.776472 1 2
    "Abington Township"               2019 1.4436355 1.4436355 . .
    "Abington Township"               2019 1.4436355 1.4436355 . .
    "Abington Township"               2020  2.644121  2.644121 1 2
    "Abington Township"               2020  2.644121  2.644121 1 1
    "Abington Township"               2020  2.644121  2.644121 1 2
    "Abington Township"               2020  2.644121  2.644121 1 2
    "Abington Township"               2020  2.644121  2.644121 1 1
    "Abington Township"               2020  2.644121  2.644121 0 1
    "Abington Township, PA"           2019         . 2.3124382 1 1
    "Abington Township, PA"           2019         . 2.3124382 1 1
    "Abington Township, PA"           2019         . 2.3124382 1 2
    "Abington Township, PA"           2019         . 2.3124382 1 2
    "Abington Township, PA"           2019         . 2.3124382 1 2
    "Abington Township, PA"           2021  2.644121  2.644121 1 1
    "Abington Township, PA"           2021  2.644121  2.644121 1 2
    "Abington Township, PA"           2021  2.644121  2.644121 1 2
    "Abington Township, PA"           2021  2.644121  2.644121 1 2
    "Abington Township, PA"           2021  2.644121  2.644121 0 1
    "Abington Township, PA"           2021  2.644121  2.644121 1 1
    "Abington Township, PA"           2022         . 2.3124382 1 2
    "Abington Township, PA"           2022         . 2.3124382 1 1
    "Abington Township, PA"           2022         . 2.3124382 1 2
    "Abington Township, PA"           2022         . 2.3124382 1 2
    "Abington Township, PA"           2022         . 2.3124382 1 2
    "Abington Township, PA"           2023 2.0947125 2.0947125 . 2
    "Abington Township, PA"           2023 2.0947125 2.0947125 1 2
    "Abington Township, PA"           2023 2.0947125 2.0947125 . 2
    "Abington Township, PA"           2023 2.0947125 2.0947125 0 2
    "Abuja Federal Capital Territory" 2019         .  .8813736 . 2
    "Abuja Federal Capital Territory" 2020  .8813736  .8813736 1 2
    "Abuja Federal Capital Territory" 2021  .8813736  .8813736 1 2
    "Abuja Federal Capital Territory" 2022         .  .8813736 . .
    "Abuja Federal Capital Territory" 2023  .8813736  .8813736 . .
    "Accra Metropolitan Assembly"     2019 1.4436355 1.4436355 1 2
    "Accra Metropolitan Assembly"     2019 1.4436355 1.4436355 1 2
    "Accra Metropolitan Assembly"     2020 1.4436355 1.4436355 1 2
    "Accra Metropolitan Assembly"     2020 1.4436355 1.4436355 1 2
    "Accra Metropolitan Assembly"     2021 1.4436355 1.4436355 1 2
    "Accra Metropolitan Assembly"     2021 1.4436355 1.4436355 1 2
    "Accra Metropolitan Assembly"     2022         . 1.4436355 1 .
    "Accra Metropolitan Assembly"     2022         . 1.4436355 1 .
    "Accra Metropolitan Assembly"     2023 1.4436355 1.4436355 . .
    "Accra Metropolitan Assembly"     2023 1.4436355 1.4436355 . .
    "Adana Metropolitan Municipality" 2020         .  .8813736 1 0
    "Adana Metropolitan Municipality" 2021         .  .8813736 1 0
    "Addis Ababa City Administration" 2019 1.8184465 1.8184465 1 2
    "Addis Ababa City Administration" 2019 1.8184465 1.8184465 1 .
    "Addis Ababa City Administration" 2019 1.8184465 1.8184465 1 2
    "Addis Ababa City Administration" 2020 1.8184465 1.8184465 1 2
    "Addis Ababa City Administration" 2020 1.8184465 1.8184465 1 2
    "Addis Ababa City Administration" 2020 1.8184465 1.8184465 1 2
    "Addis Ababa City Administration" 2021 1.8184465 1.8184465 1 2
    "Addis Ababa City Administration" 2021 1.8184465 1.8184465 1 2
    "Addis Ababa City Administration" 2021 1.8184465 1.8184465 1 2
    "Addis Ababa City Administration" 2022 1.8184465 1.8184465 1 2
    "Addis Ababa City Administration" 2022 1.8184465 1.8184465 1 2
    "Addis Ababa City Administration" 2022 1.8184465 1.8184465 1 2
    "Addis Ababa City Administration" 2023 1.8184465 1.8184465 . 2
    end



  • #2
    ivreg2h is the command, but it looks like you want to use poisson. You could just take the log of Y (assuming no zeros) and estimate by ivreg2h. You've done that. The Y in ppmlhdfe should not be a natural log (it will do that for you).

    also, ivreg2h allows you to store the created instruments, which might be useful for some other approach (or might not).

    Comment


    • #3
      Dear George,
      Thank you for your response. I had a problem due to factor variable issues, and now it seems resolved.

      Comment


      • #4
        Some ssc code doesn't like factor specifications. You have to create dummies.

        Comment


        • #5
          Thank you George. It works with the categorical variables as well as long as I begin the code with xi: as follows:

          xi: ivreg2h ln_crime (ln_police=) i.past_crime_exper i.future_crime_freq_codes i.year i.city_name , first cluster (city_name)

          I have another question. Is it possible to see the interactive effect of the endogenous ln_police with an exogenous past_crime_exper dummy using the Lewbel's (2012) identification approach? If so, how could I modify this code to fit into that. Thank you again.



          Comment


          • #6
            try, but your asking a lot me thinks.

            (ln_police c.ln_police#c.past_crime_exper = )

            Comment


            • #7
              Many thanks George! It helps a lot.

              Comment


              • #8
                Which Lewbel Ivreg2h results do i need to report on paper between? I have results showing GenInst , and a set of results showing me stdIV, GenInst, and GenExtInsta. Please assist.

                thank you

                Comment


                • #9
                  The primary results are at the top. The GenInst are the same. Report the KP states for under/weak identification, the Hansen J stat, and the Endogeneity test.

                  Comment

                  Working...
                  X