title: Panel probit in Python
body: <p>My dataset (<em>"prob"</em>) is an unbalanced panel, looking like:</p>
  
  <pre><code>     index                               x1      x2      x3     y (dummy 0/1)
  (100, Timestamp('2016-01-26 09:10:00')) 19.9    13.44  -0.006   0
  (100, Timestamp('2016-01-26 09:15:00')) 17.2    13.25  -0.046   0                     
  (200, Timestamp('2016-01-26 09:20:00')) 19.4    19.06   0.04    1                        
  </code></pre>
  
  <p>I would like to estimate a panel probit model in Python (y is my left-hand side variable, x1, x2, x3 are the right-hand side variables). Panel entity shoud be the IDs, which are in the first part of dataframe index (100, 200, etc.) As far as I understand, I need a Python function similar to Stata's <em>"xtprobit"</em>.</p>
  
  <p>The only way I came up with is:</p>
  
  <blockquote>
    <p>mod = PanelOLS(prob.dummy, prob[['x1', 'x2', 'x3']], entity_effects=True)<br>
    res = mod.fit(cov_type='clustered', cluster_entity=True)<br>
    print(res)</p>
  </blockquote>
  
  <p>Is this a panel probit model? </p>
  
  <p>The output looks different than that of the probit model (received via "sm.Probit" function from <em>statsmodels</em>), and I do not know how I can estimate probit marginal effects. Or, I should somehow modify "sm.Probit" to make it a panel probit? (now I know only how to use it in "time-series" manner for one entity only).  </p>