inhoue
2011-Jan-30 09:28 UTC
[R] Using the vars package to find time series corelations or impact
Hi you all, I have couple of questions regarding how to use the vars package (the vector autoregression model) to find co-relation/ impact between multiple time series. I am not majoring in economic, I just want to use vars to check how those time series I had impacting each other. I also hope this post can give those non-economic majors a step by step guide on how to start using the vars package. I have googling all over the web and try to get a "VAR 101/ tutorial/ how to apply var step by step guide" but I couldn't find any. I am wondering what should be the steps to approach what I need to achieve. I have read ~300 posts here about vars trying to see if similar questions have already been asked, but I didn't see any. The followings are my main questions and I have put them into steps on how I should use vars to find the co-relation between my time series data: Step 1. Check if the input data are stationary: MY QUESTION: As far as I understand, before I even use the vars package, I need to test and see if all my time series data are stationary, is it correct? If it is not stationary, I cannot use vars? or I need to take log for all my time series data? Is the vars package provide any testing command for that? If so, will that command return T/F to the test? Or I need to interpret some output numbers? Step 2. Pick the lag value: I also need to pick a lag value and the VARSselect from the vars package can help on this, I am sure about this step. Step 3. Use the VAR() command: I have read some book chapters on vars and I have read part of the paper from Dr. Bernhard Pfaff on how to use the vars package. In the paper, he talks about how to use different commends of the vars. I am especially interested in running the following commands and have questions on them:> library(vars) #<---- use the vars package > data(Canada) #<---- use the Canada data> var.2c <- VAR(Canada, p=2, type="const") #<---- execute the var command > and store the result in var.2c> summary(var.2c) #<---- I do NOT really understand how to interpret the > output of the summary command. There are 4 columns for the output: > Estimate, Std. Error, t value, and Pr(> l t l).MY QUESTION: How are these value helps to find the co-relation/ impact of each time series to each other???> plot(var.2c) #<---- 4 graphs are shown for each time series: Diagram > of fit for "one time series", Residuals, ACF Residuals, PACF Residuals.MY QUESTION: I am not sure how to read those graphs and how will they help to find the time series data impact to each other. The graphs are shown in page 6 of this document: VARS_how_to_use.pdf (To find it: put this pdf file name in google.) MY QUESTION: Is there any other commands I need to run to find the time series data impact to each other? Above I listed 3 steps, is there anymore step I need? If you all have any idea on ANY of the above questions, please feel free to jump in! I am really appreciate on any help from you all. Thanks, Vince. -- View this message in context: http://r.789695.n4.nabble.com/Using-the-vars-package-to-find-time-series-corelations-or-impact-tp3246982p3246982.html Sent from the R help mailing list archive at Nabble.com.
inhoue
2011-Jan-30 23:09 UTC
[R] Using the vars package to find time series corelations or impact
Also, if any of you all came across any tutorial that guide reader through how to use VAR with the result interpretation (may be also using this package or other package), please post it here. Thanks so much! -- View this message in context: http://r.789695.n4.nabble.com/Using-the-vars-package-to-find-time-series-corelations-or-impact-tp3246982p3247780.html Sent from the R help mailing list archive at Nabble.com.
Possibly Parallel Threads
- couple of how-to-do it in R questions regarding corelations and mean and SD of likert items
- couple of how-to-do it in R questions regarding corelations and mean and SD of likert items
- "Vars" package: impulse response function
- simulating stable VAR process
- prediction of sales with VAR model