1

I am trying to replicate an econ paper using python: The authors use following models (codes). Is there similar codes on statsmodels in python or how can I use similar models in python

Stata codes:

**First model**

`wls0` *dependent_variable* *independent_variables*, `wvar`(some_variable) `type(abse)` 


**Second Model:**

`reg` *dependent_variable* *independent_variables* [`pweight` = some_variable], `vce`(`cluster` some_variable)
MERose
  • 4,048
  • 7
  • 53
  • 79
  • 1
    https://stackoverflow.com/help/mcve way will get traction for your question. – Bussller Jul 16 '20 at 02:54
  • I know nothing about Python but flag that what is distinctive about the `reg` (meaning `regress`) call is the use of survey weights and cluster standard errors. `wls0` is a community-contributed command and I wouldn't bet on anyone wanting to clone it in Python, but the underlying Stata code is not long (in Stata `type https://stats.idre.ucla.edu/stat/stata/ado/analysis/wls0.ado`) and you don't need all of it. – Nick Cox Jul 16 '20 at 09:16
  • Look at this post: https://stackoverflow.com/questions/54349525/clustered-standard-errors-in-statsmodels-with-categorical-variables-python – Kailash Raj Pandey Jul 17 '20 at 18:05

0 Answers0