Solved – Dataset for vector autoregression in R

I am using R for vector autoregression. I can't find data that can fit the model. Can you help me please? Or can you suggest another alternative such as how to get my own data?

There is a dataset Canada in "vars" package in R. The dataset is used as an example dataset to illustrate how different functions in that package work. You can create the data variable called Canada by typing data(Canada). From then on you can use Canada for creating a VAR model using the function VAR. For example,

data(Canada) model=VAR(Canada,3) 

will estimate a VAR(3) model for the variables contained in Canada. You can view the estimated model by typing print(model).

Similar Posts:

Rate this post

Leave a Comment