2021-09-01から1ヶ月間の記事一覧
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歳以上人口割合、就業者率、…
Photo by T o T on Unsplash www.crosshyou.info This post is following of above post. In this post, I will check if there is serial correlation in the previous regression model. First, I make residual with resid() function. Then, let's make …
Photo by Ashutosh Saraswat on Unsplash www.crosshyou.info This post is following of aabove post.In this post, I will do some time-series regression with R. First, I made JPN only dataframe. Let's see df_jpn. Then, I make ts object form df_…
Photo by corina ardeleanu on Unsplash www.crosshyou.info This post is following of above post. I have GDP data like below CSV file. So, let's combine this GDP data and Meat Consumption data. Next, I use inner_join() function to combine df2…
Photo by Casey Horner on Unsplash www.crosshyou.info This post is following of above post.In this post, let's draw scatter plots using R ggplot2::geom_point.First of all, let's see correlations about 4 KG_CAPs. bekg: BEEF KG_CAP and pokg: …
Photo by Claiton Conto on Unsplash www.crosshyou.info This post is following of above post.Let's see KG_CAP data as country average. Firstly, bekg: BEEK KG_CAP ARG is the highest beef consumption country. IND is the lowest. How about pikg:…
Photo by Nathan Anderson on Unsplash www.crosshyou.info This post is following of above post. Let's see coun: country. We see all country have 40 observations. Let's see year We see all year have 38 observations.So, df2 data frame is 40 co…
Photo by boris misevic on Unsplash www.crosshyou.info This post is following above post.Now, we now there are 4 sunjects and 2 measures. 4 subjects are BEEG, PIG, POULTRY and SHEEP. 2 measures are KG_CAP and THND_TONNE.So, we have 8 combin…
Photo by Wolfgang Hasselmann on Unsplash Hello! This post, I will anaysis OECD Meat Consumption data using R. I got a CSV file like below from OECD web site(Agricultural output - Meat consumption - OECD Data) Firstly, I load tidyverse pack…
Photo by Xavier von Erlach on Unsplash www.crosshyou.info の続きです。 こんどは、male_m: 男性の仕事の平均時間(分)を回帰分析してみます。 P-valueが0.703ということなので、有意なモデルではないです。 step関数でモデルを単純化してみます。 female_…
Photo by catrina farrell on Unsplash www.crosshyou.info の続きです。 各都道府県の 女性(15~64歳)の人口 / 男性(15~64歳)の人口の比率は西日本のほうが高いとわかりましたが、東日本全体の女性(15~64歳)の人口/東日本全体の男性(15~64歳)の人口と、西日…
Photo by Mark Harpur on Unsplash www.crosshyou.info rafalab.github.io というものでRidge Plotというものを知りましたので、忘れないうちに実践です。 Ridge Plotはあるデータ(身長、体重、所得など)の分布をグループごとに見るときに便利です。 早速、…
Photo by Manson Yim on Unsplash www.crosshyou.info の続きです。 前回の分析で西日本のほうが、女性の人口(15~64歳)/男性の人口(15~64歳)の比率が高い傾向にあることがわかりました。 統計的に有意に違うのか検定してみます。 p-valueは1.125e-06とかなり…
Photo by Dileep M on Unsplash www.crosshyou.info の続きです。 前回、女性の仕事時間 / 男性の仕事時間 という変数をfmという名前で作りました。 女性の人口 (15~64歳)/ 男性の人口(15~64歳) の変数をfm_popという名前で作ります。 こうしてみると東日本…
Photo by Edrick Krozendijk on Unsplash www.crosshyou.info の続きです。 男性の仕事の平均時間の長いところ、短いところはどこでしょうか? 鹿児島県、香川県、新潟県などが長い時間働いています。 山梨県、愛媛県、高知県が短いです。 同じ四国でも香川…
Photo by frank mckenna on Unsplash 今回は都道府県別の仕事の平均時間のデータを分析しようと思います。 データは、政府統計の総合窓口(www.e-stat.go.jp)から取得しました。 47の都道府県を選択します。 取得するデータは、 15~64歳人口(男)(人) 15~64歳…
Photo by BP Miller on Unsplash www.crosshyou.info This post is following of the above psot. In this post, let's test if there is serial correlation. Firdt of all, load lmtest package. All right, let's start with model1. p-value of lag resi…
Photo by Masako Ishida on Unsplash www.crosshyou.info This post is following of the above post. Which chountry has many observations? NZL has 22 observations. AUT, BEL, DNK, FIN, NOR and SWE have 16 observations. Let's see NZL data. We see…
Photo by Damien TUPINIER on Unsplash www.crosshyou.info This post is following of above post.Let's see which year has many observations. Okay, 2014, 2010, 2006 and 2018 have over 20 observations. Let's see those years more. First, emp dens…