2021-01-01から1年間の記事一覧
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…
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…
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…
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 …
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 私たちが住んでいる太陽系以外にある惑星を系外惑星と呼ぶそうです。 昔は、私たちの太陽系の地球は特別な星だと考えられていましたが、実際はそうでもなくて、地球と同じ大きさぐらいの惑星はか…
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…
Photo by Nat Fernández on Unsplash www.crosshyou.info の続きです。 前回作成した、df_mardivのデータフレームのサマリーを見てみます。 pop: 人口とsch: 中学校数もすべての年でデータがそろっていますね。 とりあえず、これらNAの無い変数だけのデータ…
Photo by James Wheeler on Unsplash www.crosshyou.info の続きです。 いままでは2001年度だけのデータで分析して、西日本のほうが離婚レシオが高いとわかりました。 今回は違う年度でもそうなのか調べてみます。 まず、marとdivのデータがある行だけのデー…
Photo by Aaron Burden on Unsplash www.crosshyou.info の続きです。 前回の分析でdiv_mar: 離婚レシオは西日本のほうが高いことがわかりました。 R言語のlm()関数で重回帰分析をしてみます。 被説明変数がdiv_marで、説明変数がlei: 旅行・レジャーの行動…
日本の先史時代-旧石器・縄文・弥生・古墳時代を読みなおす (中公新書 2654) 作者:藤尾 慎一郎 中央公論新社 Amazon 旧石器時代から、縄文時代、弥生時代、古墳時代へとどのように日本が移ってきたのかを説明しています。 これらの時代の区分が研究者によっ…
Photo by Free Nature Stock on Unsplash www.crosshyou.info の続きです。 まず、あらかじめ用意してある、各地域の属性のデータを読み込みます。 east: 東日本なら1,西日本なら0のダミー変数 big6: 東京都、神奈川県、千葉県、埼玉県、愛知県、大阪府な…
Photo by Adam Śmigielski on Unsplash www.crosshyou.info の続きです。 複数のグラフを一度に表示したいので、gridExtraというパッケージを読み込みます。 続いて、各変数の密度分布グラフを描きましょう。 まず、pop: 総人口(人)です。populationのpopで…
Photo by Boris Smokrovic on Unsplash 今回は都道府県別の婚姻件数と離婚件数を調べてみます。 政府統計の総合窓口(www.e-stat.go.jp)からデータを取得します。 まず、47都道府県を選択します。 婚姻件数・離婚件数の他に総人口、県内総生産額、中学校数、…
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…
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…
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…
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…
Photo by Michael D Beckwith on Unsplash www.crosshyou.info This post is following of above post. Let's see time-series distribution for 15_29_MEN and 15_29_WOMEN It is a bit difficult to see trends.So, I divided before 2010 and after 2011 …
Photo by Chris Briggs on Unsplash www.crosshyou.info This post is following of above post. There are many SUBJECTs, so let's focus 15_29 first. It is NEET percentage among 15_29 old young people. Firstly, let's see a histogram. There is a …
Photo by 懒 羊羊 on Unsplash In this BLOG series, I will investigae NEET data. Firstly, I get data from OECD web site. CSV file is like below. Let's load this data into R.Firstly, I load tidyverse package and will use read_csv function. Al…
Photo by Dillon Austin on Unsplash www.crosshyou.info の続きです。 今回はoldr: 65歳以上人口割合の他の変数がhosp: 人口千人当たり通院者率に影響があるかどうかを調べようと思います。 まず。各変数の観測年を確認します。 こうしてみると、hosp, worr…
Photo by Ricardo Gomez Angel on Unsplash www.crosshyou.info の続きです。 前回は、hosp: 通院者率をoldr: 65歳以上人口割合と年ダミーを入れて回帰分析してみました。 hosp = β0 + β1oldr + β2year + β3oldr:year + u という回帰式でした。 今回はhospと…
法医学者の使命 「人の死を生かす」ために (岩波新書 新赤版 1890) 作者:吉田 謙一 岩波書店 Amazon 60件ぐらいの法医学者が関わった死亡案件がこの本には載っています。 まず、思ったのは死亡原因を決めるはとても難しいことなんだ、ということと、 検察官…
Photo by Aaron Burden on Unsplash www.crosshyou.info の続きです。 前回はhosp: 人口1000人当たりの通院者率をoldr: 65歳以上人口割合(%)で回帰分析しました。oldrが1ポイント高くなると、約8人通院者率が増えることがわかりました。 今回は回帰式にyear:…
Photo by Sana Ullah on Unsplash www.crosshyou.info の続きです。 通院者率は、oldr: 65歳以上の人口割合がと関係があるかどうかを調べてみます。 やっぱり歳をとってくると病院のお世話になることが若いときよりも多くなると思うんですよね。 oldrがある…
Photo by John Lee on Unsplash www.crosshyou.info の続きです。 hosp: 人口1000人当たりの通院者率は何年に調査しているのかを確認します。 1989年が一番古く、2019年が最新です。1995年と2016年は観測数が46とひとつ足りないです。 2019年では、どの都道…
Photo by Julia Zolotova on Unsplash www.crosshyou.info の続きです。 今回は各変数の経年変化をグラフにしてみてみます。 まずは、hosp: 人口千人当たりの通院者率のデータです。 まず、summary関数で平均値などを確認します。 平均値は327.7人です。最小…
Photo by Ana Markovych on Unsplash 今回は都道府県別の通院者率のデータを分析してみようと思います。 データは、政府統計の総合窓口(e-stat)から取得しました。www.e-stat.go.jp まず、47都道府県を選択しました。 続いて、65歳以上人口割合、就業者率、…