Announcement

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

  • Probit Instrumental Variable with Interaction term

    Dear all,

    I have been reading a lot of time about how to deal with my problem, but I could not find a solution to my problem. I am trying to estimate the next equation for my sample of firms:
    Code:
    Exporter = b0 + b1*corr11 + b2*j2 + b3*corr11*j2 + controls + u
    exporter is a dummy variable that takes value of 1 when the firm is an exporter, 0 otherwise. corr11 which is my main independent variable is also a dummy variable that takes value of 1 when the firm consider the corruption an obstacle for doing business, 0 otherwise. j2 is a continuous variables that measures the time that the firm spends in bureaucracy stuffs. However, an according to the literature of my field, corr11 is potentially a endogenous regressor, as a consequence I want to estimate my model by using IV approach. As instrument for corr11 I have the variable mean_indreg_corr which is a continuos variable, and for the interaction term corr11*j2 I am using as an instrument mean_indreg_corr*j2. With all this on hand I show you the code that I am using:

    Code:
    gen corr11Xj2 = corr11#c.j2
    ivprobit exporter (corr11 corr11Xj2 = c.mean_indreg_corr c.mean_indreg_corr#c.j2) c.j2  c.lnwk14 i.year [pw = wt], vce(cl indus_region) first
    However, in other posts I have read that for using ivprobit the endogenous variable must be a continuous one, so, is the code that am I using incorrect? In afirmative case, what method do you recommend me?

    Here I show you an extract of my data:

    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input float(exporter corr11) double j2 float mean_indreg_corrup double wt float lnwk14 double year float indus_region
    0 .   .  .3753685  2.145357847213745  3.178054 2008  6360
    0 0   .  .3811453 1.3810902833938599  5.043425 2008  6360
    0 0   0  .6303345 5.4219794273376465 2.1972246 2008  8055
    0 1   .  .7982829 3.0827088356018066  4.029806 2008  5040
    1 0   . .09067751 1.2318933010101318  4.867535 2008  5550
    0 1   0   .577652  1.468322515487671 2.0476928 2008  8055
    0 0   . .09520593  5.458652973175049 2.1202636 2008  5550
    0 1   0 .57658935 1.6569938659667969  3.295837 2008  8055
    0 1   0  .5787058 1.2802809476852417  4.550362 2008  8055
    0 1   .  .7982829 3.0827088356018066 4.0073333 2008  5040
    0 0   . .51142734 24.242000579833984   1.94591 2008  6360
    0 0   . .09520593  5.458652973175049   3.10608 2008  5550
    1 1   . .57658935 1.6569938659667969  4.248495 2008  8055
    0 1   .  .7982829 3.0827088356018066  3.970292 2008  5040
    0 0   0 .09295917 3.4130375385284424 3.0910425 2008  5550
    1 0   0 .09067751 1.2318933010101318  6.052089 2008  5550
    0 0   0  .2862001 24.242000579833984  4.518159 2008 12660
    0 0   0 .27774113                 11 4.5712686 2008 12660
    1 1   . .26888573 1.3810902833938599  5.135798 2008 12660
    0 1   0  .7836605  13.33569622039795  2.484907 2008  5040
    1 0   .  .2717792 1.1717313528060913  5.087596 2008 12660
    0 .   .  .3753685  2.145357847213745  3.970292 2008  6360
    1 1   .  .3603078  2.145357847213745  3.465736 2019 6360
    1 0   0   .594837 1.1717313528060913  6.429719 2019  8055
    0 1  .1  .2492754  13.33569622039795 1.2039728 2019 12660
    1 0   . .09295917 3.4130375385284424  4.060443 2019  5550
    0 1   0   .577652  1.468322515487671  2.890372 2019  8055
    0 .   .  .5857432 1.2802809476852417  3.496508 2019  8055
    0 0   0  .5971838  1.468322515487671  2.397895 2008  8055
    0 1   0 .57776386 1.4483987092971802   3.78419 2008  8055
    0 1   0 .26888573 1.3810902833938599  5.628819 2008 12660
    0 0   0  .2825752 18.664459228515625 3.4552646 2008 12660
    0 0   0 .09520593  5.458652973175049 1.7917595 2008  5550
    0 0   . .09067751 1.2318933010101318  4.859812 2013  5550
    0 1   0  .5542067 5.4219794273376465  2.995732 2013  8055
    1 1   0  .5793117 1.1717313528060913  5.703783 2013  8055
    0 0   . .09520593  5.458652973175049  2.782951 2013 5550
    1 0   0 .09520593  5.458652973175049 2.8716795 2019  5550
    0 0   0  .8779454  13.33569622039795  1.609438 2008  5040
    0 1   .  .7982829 3.0827088356018066 4.0073333 2008  5040
    1 1   0  .5793117 1.1717313528060913  5.521461 2008  8055
    0 1   0 .07681484 1.2318933010101318  5.192957 2008  5550
    0 0   . .09520593  5.458652973175049  3.555348 2008  5550
    0 1   0 .26766273  2.145357847213745  2.730029 2008 12660
    0 1   0  .7836605  13.33569622039795 2.3025851 2008  5040
    1 0   .  .8231907 3.9277756214141846  6.109248 2008  5040
    0 0   0   .594837 1.1717313528060913  4.518159 2008  8055
    1 0   0  .5986864 1.6569938659667969 4.3609734 2008  8055
    0 1 .15  .7982829 3.0827088356018066 3.3322046 2008  5040
    0 1   0 .25318915                 11  4.323028 2008 12660
    0 1   .  .7982829 3.0827088356018066 4.0943446 2008  5040
    0 1   0  .3603078  2.145357847213745 3.7992275 2008  6360
    0 1   0 .57658935 1.6569938659667969 4.1108737 2008  8055
    1 1  .2 .36575565 1.3810902833938599  6.336826 2008  6360
    0 0   0  .2862001 24.242000579833984 2.6390574 2008 12660
    1 0   0 .09520593  5.458652973175049  3.218876 2008  5550
    1 0 .05 .09067751 1.2318933010101318  4.744932 2008  5550
    0 1   0  .7982829 3.0827088356018066  3.218876 2008  5040
    1 0   0  .5971838  1.468322515487671         . 2008  8055
    0 0  .1  .6303345 5.4219794273376465 1.7917595 2008  8055
    0 1   .  .7836605  13.33569622039795  2.484907 2008  5040
    1 0 .05 .27190354 1.3810902833938599 4.6051702 2008 12660
    0 0   0  .2862001 24.242000579833984  1.609438 2008 12660
    0 0   .  .2862001 24.242000579833984 2.0583882 2008 12660
    0 0   . .28932956 28.944726943969727         . 2008 12660
    0 1   0 .23044406 24.242000579833984  2.484907 2008 12660
    1 1   .  .7982829 3.0827088356018066  3.277145 2008  5040
    0 0   0  .2862001 24.242000579833984  2.944439 2008 12660
    0 0   0 .09520593  5.458652973175049 2.3025851 2008  5550
    0 0   . .09520593  5.458652973175049 2.3671236 2008  5550
    1 1   0  .2684447 1.6569938659667969 4.1972017 2008 12660
    0 1   0   .577652  1.468322515487671 2.3025851 2008  8055
    0 1   0 .23044406 24.242000579833984   1.89712 2008 12660
    0 1   0  .5542067 5.4219794273376465 1.6739764 2019  8055
    0 0   0  .2825752 18.664459228515625  3.465736 2019 12660
    0 0   0  .5986864 1.6569938659667969  2.995732 2019  8055
    1 0   0 .09520593  5.458652973175049  2.944439 2008  5550
    0 0   0  .2862001 24.242000579833984  2.833213 2008 12660
    0 0   0 .09295917 3.4130375385284424  3.912023 2008  5550
    0 0   0  .5971838  1.468322515487671   2.70805 2013  8055
    0 0   .  .3844191  2.145357847213745 2.1400661 2019  6360
    0 0   0 .27206755 1.6569938659667969 3.8501475 2019 12660
    0 1  .3  .7836605  13.33569622039795 2.6855774 2019  5040
    1 0   0 .09295917 3.4130375385284424  3.772761 2019  5550
    1 0   0 .27774113                 11 4.3820267 2008 12660
    0 0   0  .2825752 18.664459228515625  3.135494 2008 12660
    0 1   0   .577652  1.468322515487671         . 2008  8055
    0 0   0  .2862001 24.242000579833984 1.9694406 2008 12660
    1 1   . .24019106 18.664459228515625 3.0445225 2008 12660
    1 0   0 .27774113                 11  5.192957 2008 12660
    0 1 .02  .7836605  13.33569622039795 1.3862944 2008  5040
    0 1   .    .14896 24.242000579833984   2.70805 2008  6360
    1 1  .1 .26766273  2.145357847213745 3.4011974 2008 12660
    0 1   .  .3603078  2.145357847213745 4.3820267 2008  6360
    0 0   0  .6303345 5.4219794273376465 2.1400661 2008  8055
    0 1 .07  .7836605  13.33569622039795 2.3025851 2008  5040
    0 0   .  .3811453 1.3810902833938599  5.147494 2008  6360
    0 0   0 .09295917 3.4130375385284424  3.232121 2013  5550
    0 1   0 .57776386 1.4483987092971802   3.64632 2019  8055
    0 0   0 .51142734 24.242000579833984 2.3025851 2019  6360
    end
    label values j2 J2
    label def J2 0 "No time was spent", modify


    Thank you!
    Ibai
    Last edited by Ibai Ostolozaga Falcon; 22 May 2024, 02:49.
Working...
X