Pergunta

Some coworkers who have been struggling with Stata 11 are asking for my help to try to automate their laborious work. They mainly use 3 commands in Stata:

tsset (sets a time series analysis)

as in: tsset year_column, yearly

varsoc (Obtain lag-order selection statistics for VARs)

as in: varsoc column_a column_b

vec (vector error-correction model)

as in: vec column_a column_b, trend(con) lags(1) noetable


Does anyone know any scientific library that I can use through python for this same functionality?

Foi útil?

Solução

I believe both scikits.timeseries and econpy / pytrix implement vector autoregression methods, but I haven't put either through their paces.

Outras dicas

scikits.timeseries is mainly for data handling and has only some statistical, econometric analysis and no vectorautoregression. pytrix has some econometrics functions but also no VAR. (At least last time I looked.)

scikits.statsmodels and pandas both have VAR, pandas also does the data handling for time series. I haven't seen any vector error correction models in python yet, but scikits.statsmodels is getting close.

http://groups.google.ca/group/pystatsmodels?hl=en&pli=1

Check out scikits.statsmodels.tsa.api.VAR (may need to get the latest development version--use Google) and, in check out the documentation for it:

http://statsmodels.sourceforge.net/devel/vector_ar.html#var

These models integrate with pandas also. I'll be working in the coming months to improve integration of pandas with the rest of statsmodels

Vector Error Correction Models have not been implemented yet but are on the TODO list!

Use Rpy2 and call the R var package.

I have absolutely no clue what any of those do, but NumPy and SciPy. Maybe Sage or SymPy.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top