crosshyou

主にクロス表(分割表)分析をしようかなと思いはじめましたが、あまりクロス表の分析はできず。R言語の練習ブログになっています。

OECD Business confidence Index(BCI) data analysis 5 - Time-Series Regression using R, Finite Distributed Lag(FDL) Model

f:id:cross_hyou:20211030093021j:plain

Photo by JuniperPhoton on Unsplash 

www.crosshyou.info

This post is follwong of abovr post.
In this post, I will examone Finite Distributed Lag(FDL) Model.

Firstly, I make a ts object from df_avg objrect.

f:id:cross_hyou:20211030094351p:plain

Then, I use dynlm() function to make a FDL model.

f:id:cross_hyou:20211030094712p:plain

Next, let's check if there is serial correlation.

f:id:cross_hyou:20211030095445p:plain

f:id:cross_hyou:20211030095456p:plain

L(resid_fdl) coefficient p-value is almost 0. We see there is serial correlation.

So, let's use Cochrane-Orcutt estimation using cochrane.orcutt() function.

f:id:cross_hyou:20211030100122p:plain

All right, let's compare mod_fdl and mod_fdl_orcutt with stargazer() function.

f:id:cross_hyou:20211030100443p:plain

Now, I made 4 models.

mod_static, mod_orcutt, mod_fdl and mod_fdl_orcutt.

Let's compare those models' fitted values.

f:id:cross_hyou:20211030102313p:plain

All four models have good fitting, I think.
That's it. Thank you!

Next post is

 

www.crosshyou.info

 



To read from the 1st post,

 

www.crosshyou.info