Rで何かをしたり、読書をするブログ

政府統計の総合窓口のデータや、OECDやUCIやのデータを使って、Rの練習をしています。ときどき、読書記録も載せています。

OECD Household savings data analysis 6 - Panel Data regression analysis using R plm package.

Generated by Bing Image Creator: Photograph of narcissus tazetta garden with spring shiny sky, more bright tone

www.crosshyou.info

This post is following of the above post. I will do panel data regression analysis in this post. I refert to Using R, Python and Julia for Introductory Econometrics (urfie.net)

First, I load 'plm' package.

Then, I convert df_subset data frame object to panel data frame object.

I will do "First Differenced Estimator". So, I make differenced variables.

All light, let's use lm() function for estimating regression model.

I use summary() function to see the result.

diff_per_capita_gdp is not statistically significant.

There is direct way for First Differenced Estimator with plm() function. Let's do it.

I needn't to calculate differenced value with plm() function with model = "fd".

Let's see the result.

The result is the same as mod_fd's result.
That's it! Thank you!

To read this series from the first post,

www.crosshyou.info