crosshyou

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

OECD NEET Data Analysis 5 - Regression analysis using R - NEET percentage and per capita GDP & GDP amount

f:id:cross_hyou:20211002200121j:plain

Photo by JD Rincs on Unsplash 

www.crosshyou.info

This post is gollowing of the above post.

In this post, I will do regression analysis using R.

I will check if GDP, per capita GDP are statistically significant factor to NEET percentage.

First, let's check which year has the most observations.

f:id:cross_hyou:20211002200432p:plain

f:id:cross_hyou:20211002200526p:plain

2017 and 2018 have the most observations.
So, I will make a dataframe with 2017 and 2018 for regression analysis.

f:id:cross_hyou:20211002200646p:plain

Let's see correlations between variables.

f:id:cross_hyou:20211002200738p:plain

capi: per capita GDP has negative correlation to the both men_15_29 and women_15_29.

It is very interesting.

Let's see correlation plot using pairs.panles() function of psych packages.

f:id:cross_hyou:20211002201111p:plain

f:id:cross_hyou:20211002201122p:plain

usd: GDP amount distribution is very skewd, maybe it is better to transform to logarithm.

f:id:cross_hyou:20211002201347p:plain

f:id:cross_hyou:20211002201359p:plain

Now, it looks better.

All right, let's do regression analysis using lm() function with R.

I use log(usd) instead of usd.

f:id:cross_hyou:20211002201551p:plain

capi has statistically significant coefficient. Its sigine is negative. It means that the higher capi, the lower the percentage of NEET. It makes sence. log(usd) is weak statistically significant and its signe is positive. It means that the larger GDP, the higher the percentage of NEET. It is interesting.

Let's display coefficient only.

f:id:cross_hyou:20211002202044p:plain

 

Now, let's see women_15_29.

f:id:cross_hyou:20211002202159p:plain

As well as men_15_29, capi has negative statistically coefficient and log(usd) has positive statistically coefficient.

Let's display coefficients only.

f:id:cross_hyou:20211002202412p:plain

women_15_29 is more sensitive than men_15_29 for capi and log(usd).
It is very interesting that large amount GDP cause higher NEET percentage while high per capita GDP lowers NEET percentage.

That's it. Thank you!

Next post is

 

www.crosshyou.info

 



To read from the 1st post,

 

www.crosshyou.info