Python Forum
Python write result of VAR to excel file
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python write result of VAR to excel file
#1
Hi for all,
i am working on creation of model VAR(Vector Auto Regressive) using python.
here is the pseudo code
model = VAR(MyDataFrame)
results = model.fit(maxlags=7, method='ols', ic='aic', trend='c', verbose=False)
res2=results.summary()
print(res2)
print(type(res2))
exit()
the result that i have got is shown below:
Output:
Summary of Regression Results ================================== Model: VAR Method: OLS Date: Sat, 13, Jul, 2019 Time: 02:39:36 -------------------------------------------------------------------- No. of Equations: 10.0000 BIC: 18.5402 Nobs: 4010.00 HQIC: 17.8205 Log likelihood: -91127.2 FPE: 3.69610e+07 AIC: 17.4253 Det(Omega_mle): 3.10114e+07 -------------------------------------------------------------------- Results for equation TMIN ========================================================================== coefficient std. error t-stat prob -------------------------------------------------------------------------- const 51.900181 10.849815 4.784 0.000 L1.TMIN 0.283955 0.037289 7.615 0.000 L1.TMAX 0.352748 0.032167 10.966 0.000 ... Results for equation TMAX ========================================================================== coefficient std. error t-stat prob -------------------------------------------------------------------------- const 11.231979 17.159595 0.655 0.513 L1.TMIN 0.061324 0.058975 1.040 0.298 L1.TMAX 0.892760 0.050875 17.548 0.000 L1.UMIN 0.079147 0.013430 5.893 0.000 ..... #result of print(type(res2)) is: <class 'statsmodels.tsa.vector_ar.output.VARSummary'>
Error:
my problem is how can i write the above result to excel file??i tried to google my problem but unfortunately i did not found an appropriate solution so any help will be appreciated.
Thank you in advance.
Reply


Messages In This Thread
Python write result of VAR to excel file - by wissam1974 - Jul-12-2019, 11:50 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Write from dictionary to excel divon 3 3,803 Jun-11-2023, 10:37 AM
Last Post: Larz60+
  Data Sorting and filtering(From an Excel File) PY_ALM 0 1,056 Jan-09-2023, 08:14 PM
Last Post: PY_ALM
  Split excel file and write output at specific row and set sheet position DSCA 0 2,004 May-12-2022, 07:29 PM
Last Post: DSCA
  [Pandas] Write data to Excel with dot decimals manonB 1 5,905 May-05-2021, 05:28 PM
Last Post: ibreeden
  Python - Merge existing cells of Excel file created with xlsxwriter manonB 0 3,727 Mar-10-2021, 02:17 PM
Last Post: manonB
  Creating more than one excel File at once malvarez1976 0 1,821 Dec-15-2020, 02:04 AM
Last Post: malvarez1976
  Convert Excel to .txt - Need each excel row to be separate .txt file cowboykevin05 2 4,806 Jan-03-2020, 06:29 PM
Last Post: Larz60+
  [split] Converting excel file to txt file unexceptionalhobby 2 4,376 Oct-16-2019, 06:34 PM
Last Post: unexceptionalhobby
  Read exel with merged cells and write to another excel SriMekala 0 2,991 Aug-10-2019, 07:14 AM
Last Post: SriMekala
  how read and write merged cells in excel SriMekala 1 15,151 Aug-07-2019, 11:27 PM
Last Post: scidam

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020