Announcement

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

  • Bootstrap with 2SLS and difference in differences: insufficient observations

    Dear all,
    I am running the following program of the 2SLS estimation by hand, where
    DV is a binary dependant variable
    Y is an endogenous variable for which I am using treat*post as an instrument.
    treat*post is the instrument of Y where treat = 1 if the county has the policy and 0 otherwise, post =1 if it's after 1998 (the year of the policy implementation) and 0 otherwise.

    Using ivprobit does not work for me, it gives me the following error: "could not find initial values", ivprobit works if I either drop province by year fixed effects i.provinceXyear or county fixed effects i.coun.


    For this reason I am opting for a 2SLS estimation by hand. The problem is that when bootstraping to correct for the SE it gives the following error: "insufficient observations to compute bootstrap standard errors
    no results will be saved" even when using the nodrop option.

    I think that this is happening may be because when subsampling, Stata is not taking enough random values before the policy and after the policy. Can this be the problem? if so how can I tell Stata to take obsevations before treat*post and after treat*post in each subsample? Please guide me. Thank you in advance.

    This is my code:

    Code:
    program my2sls
    *first step:
    reg Y  treat*post  other_control_vars i.provinceXyear i.coun, cluster(coun)
    predict Y_hat, xb
    gen residual = Y- Y_hat if e(sample)
    * second step:
    probit DV Y residual other_control_vars i.provinceXyear i.coun, cluster(coun)
    drop Y_hat residual
    end
    
    set seed 12358
    bootstrap, reps(100) nodrop: my2sls

  • #2
    See whether what Fernando shows on this thread here is not solving your problem:
    https://www.statalist.org/forums/for...otstrap-sample

    Comment


    • #3
      Dear Joro Kolev, thank you so much for your answer. specifiying eclass or rclass for my program does not change anything, I still get the error message of insufficient observations.
      However, I now noticed that the program works if I drop both i.coun (the county fixed effects) and i.provinceXyear (the province by year fixed effects). What do you think can be the reason for this?
      I also forget to say that I have repeated cross sections in my data (meaning that different individuals are observed in different years, its not a panel data).

      Comment

      Working...
      X