www.crosshyou.info

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

2021-10-01から1ヶ月間の記事一覧

OECD Business confidence Index(BCI) data analysis 8 - BCI and GDP Growth are positively correlated.

Photo by J Lee on Unsplash www.crosshyou.info This post is following of above post.In the previous post, I made panel data dataframe.Let's analyze this. Firstly, let's see correlation. g_gdp and g_capi are highly correlated. bci_sd are neg…

OECD Business confidence Index(BCI) data analysis 7 - making a panel dataframe using plm packages pdata.frame() function.

Photo by Samuel Mwamburi on Unsplash www.crosshyou.info This post is following of above post. I have GDP and per capita GDP data file like below. Let's use this data too. I load this data with read_csv() function. Then, I will merge gdp_da…

OECD Business confidence Index(BCI) data analysis 6 - There is no monthly/quarterly seasonality for BCI.

Photo by Juliane Liebermann on Unsplash www.crosshyou.info This post is following of above post. Now, let's see df dataframe object again. df have "time" variable as Date class. I will make year and month from time.I need lubridate package…

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

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. Then, I use dynlm() function to make…

OECD Business confidence Index(BCI) data analysis 4 - Time-Series Regression using R - static model

Photo by Elena Louca on Unsplash www.crosshyou.info This post is following of above post. Let's do time-series regression.Firstly, let's make a static time series model In time-series regression, we have to care about serial correlation of…

OECD Business confidence Index(BCI) data analysis 3 - time-series chart using ggplot() + geom_line()

Photo by NASA on Unsplash www.crosshyou.info This post is following of above post. Let's see time-series for bci average. Let's see time-series for good average. average bci and average good are both very volatile. what is the correlation …

OECD Business confidence Index(BCI) data analysis 2 - BCI average by region are the same but...

Photo by T S on Unsplash www.crosshyou.info This post is following of above post. I have another CSV flile like below. I read this file too. Let' merge this dataframe and previous dataframe. I convert region and sub.region to factor class.…

読書記録 - 「系外惑星と太陽系」 井田茂 著 岩波新書

系外惑星と太陽系 (岩波新書) 作者:井田 茂 岩波書店 Amazon 私たちが住んでいる太陽系以外にある惑星を系外惑星と呼ぶそうです。 昔は、私たちの太陽系の地球は特別な星だと考えられていましたが、実際はそうでもなくて、地球と同じ大きさぐらいの惑星はか…

OECD Business confidence Index(BCI) data analysis 1 - read CSV file data using R language read_csv() function

Photo by William Olivieri on Unsplash In this post, I will analyze OECD Business confidence index(BCI) using R. From the OECD web site, I download below CSV file. Firstly, I load tidyverse package. Then, I use read_csv() finction to read t…

都道府県別の婚姻件数と離婚件数のデータの分析6 - options(scipen = xxxx)で数値の表示を変更できる。

Photo by Nat Fernández on Unsplash www.crosshyou.info の続きです。 前回作成した、df_mardivのデータフレームのサマリーを見てみます。 pop: 人口とsch: 中学校数もすべての年でデータがそろっていますね。 とりあえず、これらNAの無い変数だけのデータ…

都道府県別の婚姻件数と離婚件数のデータの分析5 - 離婚レシオは上昇傾向だが、西日本のほうが高いことは変化なし。

Photo by James Wheeler on Unsplash www.crosshyou.info の続きです。 いままでは2001年度だけのデータで分析して、西日本のほうが離婚レシオが高いとわかりました。 今回は違う年度でもそうなのか調べてみます。 まず、marとdivのデータがある行だけのデー…

都道府県別の婚姻件数と離婚件数のデータの分析4 - R言語で重回帰分析をする。1人当たり県民所得が増えると離婚レシオは低下する。

Photo by Aaron Burden on Unsplash www.crosshyou.info の続きです。 前回の分析でdiv_mar: 離婚レシオは西日本のほうが高いことがわかりました。 R言語のlm()関数で重回帰分析をしてみます。 被説明変数がdiv_marで、説明変数がlei: 旅行・レジャーの行動…

読書記録 - 「日本の先史時代 旧石器・縄文・弥生・古墳時代を読みなおす」藤尾慎一郎 著 中公新書

日本の先史時代-旧石器・縄文・弥生・古墳時代を読みなおす (中公新書 2654) 作者:藤尾 慎一郎 中央公論新社 Amazon 旧石器時代から、縄文時代、弥生時代、古墳時代へとどのように日本が移ってきたのかを説明しています。 これらの時代の区分が研究者によっ…

都道府県別の婚姻件数と離婚件数のデータの分析3 - 西日本のほうが離婚レシオは高く、東京、大阪、愛知、神奈川、千葉、埼玉の都会のほうが離婚レシオは低い。

Photo by Free Nature Stock on Unsplash www.crosshyou.info の続きです。 まず、あらかじめ用意してある、各地域の属性のデータを読み込みます。 east: 東日本なら1,西日本なら0のダミー変数 big6: 東京都、神奈川県、千葉県、埼玉県、愛知県、大阪府な…

都道府県別の婚姻件数と離婚件数のデータの分析2 - R言語のmutate関数でデータフレーム内の変数を組み合わせて加工したり・変換する。

Photo by Adam Śmigielski on Unsplash www.crosshyou.info の続きです。 複数のグラフを一度に表示したいので、gridExtraというパッケージを読み込みます。 続いて、各変数の密度分布グラフを描きましょう。 まず、pop: 総人口(人)です。populationのpopで…

都道府県別の婚姻件数と離婚件数のデータの分析1 - R言語にデータを取り込む。

Photo by Boris Smokrovic on Unsplash 今回は都道府県別の婚姻件数と離婚件数を調べてみます。 政府統計の総合窓口(www.e-stat.go.jp)からデータを取得します。 まず、47都道府県を選択します。 婚姻件数・離婚件数の他に総人口、県内総生産額、中学校数、…

OECD NEET Data Analysis 7 - Panel Data Analysis with FD(First Differenced) Estimator

Photo by Jonas Allert on Unsplash www.crosshyou.info This post is following of the above post.In this post I will try panel data analysis, FD(First Differenced) estimator.I refere to "Using R for Introductory Econometrics" by Florian Heisi…

OECD NEET Data Analysis 6- Heteroskedasticity-Robust Inference using R

Photo by Gabriel Garcia Marengo on Unsplash www.crosshyou.info This post is following of the above post. Hello. In this post, I will do Heteroskedasiticity test usung R. In te previous post, I meade regression model using R. Let's plot fit…

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

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. Fi…

OECD NEET Data Analysis 4 - NEET percentage and per capita GDP has negative correlation

Photo by Stephanie LeBlanc on Unsplash www.crosshyou.info This post is following of the above post. Let's check how many observations each country has. Max observations is 24. Many country has more than 20 observations.So, let's see averag…