Announcement

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

  • switch_probit

    Hello Statalist,

    I am trying to use switch_probit for an endogenous switching model. I once used it and have a regression saved in a do file from a couple years ago, but now Stata won't even recognize the command, and I can't find any help online on how to install it again. Appreciate any help.

  • #2
    . net sj 11-3 st0233

    ----------------------------------------------------------------------------------------------------------------------------------------
    package st0233 from http://www.stata-journal.com/software/sj11-3
    ----------------------------------------------------------------------------------------------------------------------------------------

    TITLE
    SJ11-3 st0233. Maximum likelihood estimation of...

    DESCRIPTION/AUTHOR(S)
    Maximum likelihood estimation of endogenous switching
    probit model
    by Michael Lokshin, The World Bank
    Zurab Sajaia, The World Bank
    Support: [email protected]
    After installation, type help switch_probit

    INSTALLATION FILES (type net install st0233)
    st0233/switch_probit.ado
    st0233/switch_probit.sthlp
    st0233/switch_probit_d2.ado
    st0233/switch_probit_p.ado

    ANCILLARY FILES (type net get st0233)
    st0233/switch_probit_example.do
    st0233/switch_probit_example.dta
    ----------------------------------------------------------------------------------------------------------------------------------------
    So

    Code:
    net install st0233

    Comment


    • #3
      Andrew --

      Thank you. Although when I use that I get:

      file http://fmwww.bc.edu/repec/bocode/s/st0233.pkg not found
      could not load st0233.pkg from http://fmwww.bc.edu/repec/bocode/s/

      It would seem that this package isn't available anymore at that university's site. But looking at http://fmwww.bc.edu/repec/bocode/s/ I can see a couple similarly named packages like switchoprobit. But I don't see much help on figuring it out.

      Is there a Stata-authored command that should do the same thing? That is, one that involves a binary endogenous treatment equation and main, also binary equation?

      Pat
      Last edited by Pat OBrien; 20 Sep 2021, 15:43.

      Comment


      • #4
        This command is available from the Stata Journal and not SSC. Did you type

        Code:
        net install st0233
        ?

        Comment


        • #5
          Yes I did. So why would this lead me to a third party site?

          . net install st0233
          file http://www.stata.com/st0233.pkg not found
          could not load st0233.pkg from http://www.stata.com/
          r(601);

          Comment


          • #6
            Sorry, that was confusing. Earlier when entered the code just as you put it it came back with what I posted with the bc.edu URLs. I restarted and tried again, and this time it goes to stata.com as I just posted prior to this, but as you can see it still can't load.

            Comment


            • #7
              I have no problems installing the program.

              Code:
              .  net install st0233
              checking st0233 consistency and verifying not already installed...
              installing into C:...
              installation complete.
              
              . which switch_probit
              C:\...
              *! version 1.0 14Jan2009 M. Lokshin, Z. Sajaia
              Do you have a Windows PC? Try

              Code:
              findit switch_probit
              and see if you can install clicking on the SJ links provided.

              Comment


              • #8
                Yes, that worked. Thank you!

                Comment


                • #9
                  Hello Sir,
                  I have very basic question in understanding the result by switch_probit. I have given the command as follows:

                  HTML Code:
                   switch_probit FARM $xlist, select(program $selection)
                  and result is as given below.
                  HTML Code:
                  Switching probit model    Number of obs    =     21,924
                      Wald chi2(15)    =    5669.24
                  Log likelihood = -21350.332    Prob > chi2    =     0.0000    
                  Coef.   Std. Err.    z    P>z    [95% Conf. Interval]
                          
                  program     
                  head_edu    .0371164    .002472    15.01   0.000    .0322714    .0419614
                  head_age    .0098915   .0009282    10.66   0.000    .0080723    .0117107
                  land_owned    .0010394   .0001837    5.66   0.000    .0006795    .0013994
                  _cons   -3.470054   .1939979    -17.89   0.000    -3.850283   -3.089825
                          
                  FARM_1            
                  age    .1079043   .0086594    12.46   0.000    .0909323    .1248764
                  age2   -.0012392   .0001117    -11.09   0.000    -.0014581   -.0010202
                  edu_years   -.0326016   .0035525    -9.18   0.000    -.0395643   -.0256389
                  _cons   -3.387048   .3727443    -9.09   0.000    -4.117613   -2.656482
                          
                  FARM_0            
                  age    .0918237    .010393    8.84   0.000    .0714537    .1121936
                  age2   -.0010055   .0001352    -7.44   0.000    -.0012705   -.0007405
                  edu_years   -.0188371   .0041628    -4.53   0.000    -.0269961   -.0106781
                  _cons   -4.336778   .4242766    -10.22   0.000    -5.168345   -3.505211
                          
                  /athrho1   -.4844595   .0613388        -.6046814   -.3642375
                  /athrho0   -.2446718   .0682499        -.3784391   -.1109045
                          
                  rho1   -.4498079   .0489283        -.5403724   -.3489411
                  rho0   -.2399035   .0643218        -.3613511    -.110452      
                  LR test of indep. eqns. (rho1=rho0=0):chi2(2)    =    64.01  Prob    > chi2 = 0.0000        
                  My question is that-
                  1) which test statistics is used to see the significance of rho1 and rho0 .
                  2) If I want to estimate the treatment effect for various subgroups. Do I need to run the model again and again for various subgroups. Or I can run the model on whole population and predict the treatment effect based on that model for whole individuals. From that predicted probabilities, we can tabulate predicted treatment effect for various groups. Please clarify these doubts . I am struggling with these minor problems from long time.

                  Comment

                  Working...
                  X