Hello, I am running a vector auto-regression in Python. Below is the sample code.
import numpy as np import pandas import statsmodels.api as sm from statsmodels.tsa.api import VAR from statsmodels.tsa.base.datetools import dates_from_str mdata = sm.datasets.macrodata.load_pandas().data # prepare the dates index dates = mdata[['year', 'quarter']].astype(int).astype(str) quarterly = dates["year"] + "Q" + dates["quarter"] quarterly = dates_from_str(quarterly) mdata = mdata[['realgdp','realcons','realinv']] mdata.index = pandas.DatetimeIndex(quarterly) data = np.log(mdata).diff().dropna() # make a VAR model model = VAR(data) results = model.fit(2) print(results.summary()) I am trying to export the results to LaTeX, but nothing I've tried seems to work. I tried results.as_latex() and results.to_frame().to_latex(), in vain. Any idea how to solve this issue? Thanks a lot! -- You received this message because you are subscribed to the Google Groups "spyder" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/spyderlib. For more options, visit https://groups.google.com/d/optout.
