Hot answers tagged

10

You can use code like the following (making use of the as_latex function) to output a regression result to a tex file but it doesn't stack them neatly in tabular form the way that outreg2 does: import pandas as pd import statsmodels.formula.api as smf x = [1, 3, 5, 6, 8, 3, 4, 5, 1, 3, 5, 6, 8, 3, 4, 5, 0, 1, 0, 1, 1, 4, 5, 7] y = [0, 1, 0, 1, 1, 4, 5, 7,0, ...


5

I use all three programs. Python can do everything that R can do and R can do everything that Python does, but I must say R is superior to Python when it comes to the packages. For that reason for most econometric analysis I usually default to R. I find also producing nice standard statistics graphics with R easier (but for maps I prefer Python). However, ...


5

There is now a Python version of the well known stargazer R package, which does exactly this. See also this related question: https://stackoverflow.com/q/35051673/2858145


3

You can use the stargazer package (install with pip install stargazer). From https://github.com/mwburke/stargazer/blob/master/examples.ipynb: import pandas as pd from sklearn import datasets import statsmodels.api as sm from stargazer.stargazer import Stargazer from IPython.core.display import HTML diabetes = datasets.load_diabetes() df = pd.DataFrame(...


2

I agree with Dan it is likely a typo. Some definitions (using your notations) Investment : $f_0$ Investment one year later : $f_1$ Net income : $f_1 - f_0$ ROI: $-1 + \frac{f_1}{f_0}$ It follows that the correct code should be ROI = (goog/goog.tshift(-365) -1)*100


2

The matchingMarkets package in the R software now implements two constraint encoding functions to find all stable matchings in the three most common matching problems: hri: college admissions problem (including the student and college-optimal matchings) and stable marriage problem (including men and women-optimal matching) sri: stable roommates problem. ...


2

Patrick Prosser has some great java code at http://www.dcs.gla.ac.uk/~pat/roommates/distribution/ which, among other things, can compute all the stable matchings in roommate problems. The code is for roommates problems, but Patrick's code allows preferences over roommates to include unacceptable roommates. To implement a two-sided market, just make sure any ...


1

I'd rate my experience: Stata 9/10, Python 7/10, R 3/10 on a) There are many econometric approaches specific to a certain field for which packages have been developed for R and Stata, but not (yet) for Python. One example is the Heckman Selection approach in Labor Economics, which I had to do myself in Python. There are numerous other examples. on b) ...


1

I found one implementation of TTC in python at http://www.dreamincode.net/forums/topic/377004-algorithmic-game-theory-top-trading-cycle-procedure/?ref=dzone. However, it does not seem to include the two additional features I was mentionning. With of without these two features : I would still love to hear about more implementation of TTC, and about ...


Only top voted, non community-wiki answers of a minimum length are eligible