Building a VAR Model in R

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ธ.ค. 2024

ความคิดเห็น • 63

  • @aizhasbeisembay
    @aizhasbeisembay 2 ปีที่แล้ว

    Best video I have ever seen. Thanks Justin. Much love

  • @ariszoleta5799
    @ariszoleta5799 4 ปีที่แล้ว +2

    This is great. This is very helpful for an entry-level graduate students in economics.

  • @miltonjomochirwa4611
    @miltonjomochirwa4611 2 ปีที่แล้ว +2

    Thumbs for you sir. Your materials are really helpful, especially with the dataset links you provided. You're a Genius 👏

  • @lavs8696
    @lavs8696 3 ปีที่แล้ว

    dude you are so amazing and thorough at explaining u have helped me so much, love u

  • @enzorodriguez9537
    @enzorodriguez9537 4 ปีที่แล้ว +1

    great video, so clear in how to use VAR packages!

  • @nilima.gautam
    @nilima.gautam 3 ปีที่แล้ว

    This video is very informative, good work.
    Thank you for sharing

  • @accountlastname1170
    @accountlastname1170 3 ปีที่แล้ว +19

    This was very helpful! But don't we have to check for stationarity first before using VAR? Thanks!

  • @Ddmmyy10
    @Ddmmyy10 3 ปีที่แล้ว

    This video is really helpful! thanks for sharing it!

  • @SloppyJoeFilling
    @SloppyJoeFilling 2 ปีที่แล้ว

    This is really useful stuff thank you very much!

  • @lindayang9094
    @lindayang9094 4 ปีที่แล้ว +1

    Hi Justin thank you for the video! Is there a reason why you chose 'const' for the type (instead of 'none', 'trend', or 'both')? I receive desirable results when the type is 'none' and was wondering if a VAR model is viable with a 'none' type (aka no intercept)? I get different optimal lags when changing this type value from 'const' to 'none' and was curious on which one to use to select the lag. Thanks again!

    • @JustinEloriaga
      @JustinEloriaga  4 ปีที่แล้ว +1

      Hi. No particular reason. It is fine if the type is none. It just means that there was no model intercept in the model which is normal in most cases.

  • @1adamc3
    @1adamc3 4 ปีที่แล้ว

    Great video, very clear!

  • @andrenovaisgoncalves7529
    @andrenovaisgoncalves7529 4 ปีที่แล้ว

    Thank you SO MUCH for this! You helped me a lot!

  • @hector5181
    @hector5181 3 ปีที่แล้ว +1

    Hi, what happen if the unit roots are not in the circle unit? there is any way to solve it? Thanks in advance

    • @JustinEloriaga
      @JustinEloriaga  3 ปีที่แล้ว +1

      Try and check if the data is stationary. You may use various tests such as the ADF or PP tests. Alternatively, you may do log transformations.

  • @christopherlefevre7927
    @christopherlefevre7927 4 ปีที่แล้ว +1

    Hi Justin, do you by any chance know what to do when I get this error after the 'summary()' : Error in solve.default(Sigma) :
    Lapack routine dgesv: system is exactly singular: U[5,5] = 0 ?

    • @JustinEloriaga
      @JustinEloriaga  4 ปีที่แล้ว

      Hi! It may be that the VAR system you specified is not solvable. As a remedial measure, might I suggest getting the natural log of the variables or differencing it. This may solve the problem! Cheers!

    • @christopherlefevre7927
      @christopherlefevre7927 4 ปีที่แล้ว

      @@JustinEloriaga Thanks for your answer, my variables are already in the form of returns though :/

  • @nickomanu
    @nickomanu 3 ปีที่แล้ว +2

    Hello, thank you very much for your videos, they're extremely useful! May I ask you a question, how do you choose "lag.max" in optimal lag selection. For example what is appropriate "lag.max" for a weekly data?

  • @ouamboceline3156
    @ouamboceline3156 4 ปีที่แล้ว

    earlier in the comment you said we could just add the variable when we run the cbind command if we have more than 2 variables,
    To add to this question what if one of the multiple variables is not in a percentage form. half of my variables are rates of returns and the other half are all different; example kilowatts for electricity, barrel for oil. what will you recommend I do?

  • @jhonheider9680
    @jhonheider9680 4 ปีที่แล้ว

    Hi, Justin. Hope you're fine.
    I'm trying to run a VAR model with financial data (return assets) as independent variables to explain the behavior of a implied volatility index according to the specific theory. To obtain the return of the assets, I need to transform the data applying the log calculus, which gives me missing data.
    As a strategy to overcome this problem, I just exclude the rows coitaning missing data using the command [-c(' specific rows') , ] while I'm constructing the dataset with the cbind command. The model was done, but when I try to get the information from the summary function I obtain the following message:
    'summary may be unreliableError in solve.default(Sigma)'.
    This problem doesn't occur when I exclude only one row from the transformed data (e.g., a return asset with one lag specification);
    Could you help me, please? Thank you so much.

  • @ivanartmarbas9182
    @ivanartmarbas9182 4 ปีที่แล้ว +2

    Great video Justin! Thank you. Just need to ask, since the VAR model includes lags of the same variables, should we also check for multicollinearity? And if multicollinearity is present, how should we proceed with the estimation? Thank you!

    • @JustinEloriaga
      @JustinEloriaga  4 ปีที่แล้ว +1

      Thank you for your comment. Regarding multicollinearity, yes potentially, however, the presence of multicollinearity merely inflates standard errors and doesn't necessarily lead to biased estimates. The inclusion of lags more likely induces autocorrelation which is more commonly tested for. Hope this helps, thanks!

    • @ivanartmarbas9182
      @ivanartmarbas9182 4 ปีที่แล้ว

      @@JustinEloriaga , thank you for the reply!

  • @karanwadekar3392
    @karanwadekar3392 2 ปีที่แล้ว +1

    Hi Justin. Thanks for such an informative video. The unemployment data has a structural break in 2005(3). Since that issue has not been addressed prior to VAR modeling, I would like to know whether VAR models are not affected by the structural break

  • @asmafiaz6590
    @asmafiaz6590 3 ปีที่แล้ว

    hello, Justin, it is a very helpful video thank you a lot. but kindly can you help in modeling the Markov regime-switching var model too.

  • @yudistiraeltonjhon9695
    @yudistiraeltonjhon9695 3 ปีที่แล้ว +1

    in simple graph, can I use more than 2 variables in one graph?

  • @nadyayuniar9465
    @nadyayuniar9465 3 ปีที่แล้ว

    Hello, sir. Is it for multivariate time series? If it is yes, in this video, you use acf and pacf to check stationary of the data. But in some papers, to check the stationary in multivariate time series cases, we need to check it with mccf and mpccf. Which the right one that I need to follow? Thank in advance🙏

  • @grazianodicapua7380
    @grazianodicapua7380 3 ปีที่แล้ว

    Very good video! Did you do one with multivariate VAR model? Thanks

  • @takundachibaya8042
    @takundachibaya8042 4 ปีที่แล้ว

    Thank you very much. may I have the link to the second video on forecasting and model diagnostics

    • @JustinEloriaga
      @JustinEloriaga  4 ปีที่แล้ว

      Hi! The link is this one: th-cam.com/video/UYRFYWNxX4c/w-d-xo.html

    • @conox555
      @conox555 4 ปีที่แล้ว

      @@JustinEloriaga in my case it links back to this video. Did I do something wrong or is there another link? Great video BTW :)

  • @rorydempsey8058
    @rorydempsey8058 3 ปีที่แล้ว

    Anyone know why I cannot load the library(vars) package?

  • @saradehghani1153
    @saradehghani1153 4 ปีที่แล้ว

    Hi Justin thanks for sharing this helpful video. in interepretion the result of Var result we omit the insignificant variables? and How I can model the residuals of GDP in var?

    • @JustinEloriaga
      @JustinEloriaga  4 ปีที่แล้ว

      Hi, thanks for your comment. In general, we interpret the applications of VAR (i.e. IRFs, FEVDs, and forecasts) more than the actual order and we can see their significance based on the results being significantly different from zero. In terms of modeling the residuals, I believe there are options for that. Hope this helps.

    • @saradehghani1153
      @saradehghani1153 4 ปีที่แล้ว

      @@JustinEloriaga I appreciate your response

  • @000Requiem
    @000Requiem 3 ปีที่แล้ว

    Were those series stationary??? I think a Dickey Fuller test here is missed.....

  • @JBellottS
    @JBellottS 2 ปีที่แล้ว

    do you have an application for a threshold var or vecm?

  • @estaykylyshbek8347
    @estaykylyshbek8347 3 ปีที่แล้ว

    Great video! Could you please explain why the results are not significant? The P-values are quite big numbers.

  • @alisarnakour7451
    @alisarnakour7451 9 หลายเดือนก่อน

    Hello! I really need an answer asap, did you create this data by yourself or did you get it somewhere else?

  • @IZE85
    @IZE85 4 ปีที่แล้ว

    great video!

  • @masoumehsolgi7974
    @masoumehsolgi7974 4 ปีที่แล้ว

    hi,thank you for video,but i do not know this is my problem or it is some thing general,the screnn and codes are so much unclear and small.unfortunately i could not recognise some of them .

    • @JustinEloriaga
      @JustinEloriaga  4 ปีที่แล้ว

      Hi! You may refer to the list of codes found in the link in the description box below. Thank you!

    • @masoumehsolgi7974
      @masoumehsolgi7974 4 ปีที่แล้ว

      thank you so much for your reply ,there is code for SVAR but i could not find any for VAR,may i ask you check it please?

  • @makotoinoue2614
    @makotoinoue2614 3 ปีที่แล้ว

    Thank you sir!

  • @dennismalit4395
    @dennismalit4395 4 ปีที่แล้ว

    Thank you so Much. This was really helpfull.

  • @florinaliu3979
    @florinaliu3979 3 ปีที่แล้ว

    Congradulation for a wonderful explanation. My question is: if my data are non-stationary , can i perform the VAR model? Or i should tranform them first.

  • @ForsakenPrayers
    @ForsakenPrayers 4 ปีที่แล้ว

    Great video. Curious what IDE you're using?

    • @JustinEloriaga
      @JustinEloriaga  4 ปีที่แล้ว

      Hi! Thanks for your comment. This is RStudio with a dark theme. Hope this helps

    • @ForsakenPrayers
      @ForsakenPrayers 4 ปีที่แล้ว

      @@JustinEloriaga Much appreciated

  • @thetruthsreality
    @thetruthsreality 3 ปีที่แล้ว

    Very helpful video :) thanks. Errors are shown during coding as not all the packages are included in the demo, as fpp2 and fpp3 for autoplot. (a beginner comment)

    • @thetruthsreality
      @thetruthsreality 3 ปีที่แล้ว

      or need of packages astsa, vars, etc. Anyway it after searching the errors we could go on.... :)

  • @christopherlefevre7927
    @christopherlefevre7927 4 ปีที่แล้ว

    Thanks a lot mate, I'm new to this and you're making it really clear ! I was wondering, how does this work if I have more than 2 variables ?

    • @JustinEloriaga
      @JustinEloriaga  4 ปีที่แล้ว

      Just add the variable when you run the cbind command and you're good to go. Hope this helps!

    • @christopherlefevre7927
      @christopherlefevre7927 4 ปีที่แล้ว

      Ok great !

  • @nicolasmartinez2818
    @nicolasmartinez2818 4 ปีที่แล้ว

    THANK YOU!

  • @renatatsoi4546
    @renatatsoi4546 4 ปีที่แล้ว

    Hello Justin, it's a great idea to share your knowledge and skills with us. I really appreciate it and I think other people too! And I want to ask you a question. My question is not related to this video lesson, but I try to find any information... I need to build a Time-varying VAR model (TV VAR) for my research, but I can't find information or tutorial about how to build this model. If you are familiar with TV VAR, can you send me please a link for some paper or tutorial about this model or just briefly explain to me. Thank you for your attention!

  • @apsulistiono
    @apsulistiono 4 ปีที่แล้ว

    Thanks a lot!

  • @sadhanasingh8983
    @sadhanasingh8983 2 ปีที่แล้ว

    Sir kindly share the commands

  • @caiot.a.4347
    @caiot.a.4347 4 ปีที่แล้ว

    I couldn't read a line. Too dark.