www.crosshyou.info

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

UCI の Adult データの分析5 - R の FNN パッケージで、k-nearest neighbors での Classification

Generated by Bing Image Creator: 広い野原に小川と小道があって、菜の花がいっぱい咲いていて、空は青空の写真 www.crosshyou.info の続きです。 今回は、R の FNN パッケージで、k-nearest neighbors での分類をします。 まずは、FNN パッケージの読み込…

UCI の Adult データの分析4- R の glmnet パッケージを使って、 LASSO, Ridge, Elastic-Net Regression で income の分類に挑戦

Generated by Bing Image Creator: Photo of old times, beautiful mountains scenery, blue sky and white clouds, cheerful flowers www.crosshyou.info の続きです。前回は、 glmnet パッケージで income の分類をするための前準備でした。今回は、実際に…

UCI の Adult データの分析3 - R の glmnet パッケージを使って LASSO, Ridge, Elastic-Net Regression で分類するための前準備

Generated by Bing Image Creator: Long wide view of green grass field. Blue sky and a few white clouds. red flower, yellow flower and blue flower are shining. Photo www.crosshyou.info の続きです。前回と前々回で income と他の変数との関係をグ…

UCI の Adult データの分析2 - 2つのカテゴリカルデータの関係性は geom_col() でバーチャートで。

Generated by Bing Image Creator: Long wide view, wild garden of colorful flowers www.crosshyou.info の続きです。 前回は、データを R に読み込んで、income というカテゴリーデータと数値データの関係性を geom_histogram() でヒストグラムにしてみま…

UCI の Adult データの分析1 - R にデータを取り込み、ヒストグラムで分布を確認

Generated by Bing Image Creator: Very large cherry blossoms, long view from the blue sky, phot 今回は、UCI の Adult のデータを使って、Rの練習をしてみようと思います。 income が年間 $50k を超えるか、超えないかを判別するタスクです。 Becker,Ba…

読書記録 - 「無限と連続」 遠山 啓 著 (岩波新書)

無限と連続 (岩波新書) 作者:遠山 啓 岩波書店 Amazon 1952年に出版された本で、私が買った本は2022年3月の第67刷でした。 無限にも大小がある、ということが不思議でした。 ほかにもいろいろ面白いことが書かれていましたが、正直、半分も理解できていない…

都道府県別のパソコン所有数量のデータ分析9 - RのrpartパッケージでClassification

Generated by Bing Image Creator: Long view of beach and hibiscus flowers, photo, blue sky and white cloud www.crosshyou.info の続きです。今回は R の rpart パッケージで Classification をしてみましょう。まず、必要なパッケージの読み込みをしま…

都道府県別のパソコン所有数量のデータ分析8- Rのglmnetパッケージで Elastic-Net Multinomial Regression で Classification

Generated by Bing Image Creator: Beautiful close up phot, bulue tulips.www.crosshyou.info の続きです。今回はRのglmnetパッケージで multinomial recgression の方法で都道府県の classification を実行してみます。 まず、glmnet パッケージの読み込…

読書記録 - 「三国志 演義から正史、そして史実へ」 渡邊 義浩 著 (中公新書)

三国志 演義から正史、そして史実へ (中公新書) 作者:渡邉義浩 中央公論新社 Amazon 三国志の時代は、日本でいうと邪馬台国の卑弥呼の時代だというのが驚きです。 昔の中国と比べると日本はずいぶん遅れていたんだなと思います。 私は、吉川英治の「三国志」…

都道府県別のパソコン所有数量のデータ分析7 - RのFNNパッケージで、knn(k-Nearest Neighbor) Classification

Generated by Bing Image Creator: Beautiful long view of wild forest, many sunflowers, blue sky and white cloud, photo www.crosshyou.info の続きです。 しばらく回帰分析をしていたので、今回は気分を変えてclassificationをやってみましょう。 df_r…

都道府県別のパソコン所有数量のデータ分析6 - Rでパネルデータ分析 - 趣味・娯楽の時間とパソコン所有数量の関係

Generated by Bing Image Creator: A beautiful shiny long view of green grass field and colorful tiny flowers, photo. www.crosshyou.info の続きです。 今回は、仕事の平均時間や、趣味・娯楽の平均時間との関連性を調べてみましょう。 仕事の時間や、…

都道府県別のパソコン所有数量のデータ分析5 - Rでパネルデータ分析 - 大学・大学院卒者の割合とパソコン所有数量の関係

Generated by Bing Image Creator: A long quiet and joyful view of blue morning glory flowers and red rose flowers. www.crosshyou.info の続きです。 前回は1人当たり県民所得とパソコン所有数量の関係をパネルデータ分析の手法で調べてみました。今回…

都道府県別のパソコン所有数量のデータ分析4 - Rでパネルデータ分析 - 1人当たり県民所得とパソコン所有数量の関係

Generated by Bing Image Creator: A beautiful long and quiet view of cherry blossoms and rape blossoms from afarLandscape photo www.crosshyou.info の続きです。 今回はパネルデータ分析の手法で1人当たり県民所得とパソコン所有数量の関係を調べて…

読書記録 - 「感染症の歴史学」 飯島 渉 著 (岩波新書)

感染症の歴史学 (岩波新書) 作者:飯島 渉 岩波書店 Amazon この本では、新型コロナウィルス、天然痘、ペスト、マラリアの4つの感染症について社会がどのように対応してきたのか、を医史学(医学史)の観点から描いています。 医史学という学問分野があることを…

都道府県別のパソコン所有数量のデータ分析3 - Rのlm()関数で回帰分析。所得や大学・大学院卒者の割合、趣味・娯楽の時間が大きいほど、パソコン所有数量も大きい。

Generated by Bing Inage Creator: flower of Lysichiton camtschatcensis schott, photo www.crosshyou.info の続きです。今回は回帰分析でパソコン所有数量が1人当たり県民所得などの変数と関連があるかを調べてみます。 まず、前回と同じように各変数の調…

都道府県別のパソコン所有数量のデータの分析2 - Rのggplot2パッケージでデータを視覚化して全体像をとらえる。

Generated by Bing Image Creator: Lavender Field photo, with blue sky and white clouds in the background www.crosshyou.info 今回のポストは上のポストの続きです。前回はデータをRに取り込むところまでやりました。今回はデータを視覚化してみましょ…

読書記録 - 「戦後世界経済史 自由と平等の視点から」 猪木 武徳 著 (中公新書)

戦後世界経済史 自由と平等の視点から (中公新書) 作者:猪木武徳 中央公論新社 Amazon 2009年に出版された本です。 自由と平等の視点から、という副題にあるように、自由と平等という相反することをどのように両立させていくかが難しいけれども大事なことだ…

都道府県別のパソコン所有数量のデータの分析1 - Rにデータを読みこむ。

Generated by Bing Image Creator: picture of flower garden in the future, more realistic 今回は都道府県別のパソコン所有数量のデータの分析をしてみたいと思います。 まず、政府統計の総合窓口 e-stat のウェブサイトデータ表示 | 都道府県データ | 社…

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…

OECD Household savings data analysis 5 - Analyzing savings and per capita GDP using 'infer' package workflow.

Generated by Bing Image Creator: Photographic of real violet flowers on the flower garden, background is fine sky www.crosshyou.info This post is following of the above post. In this post I will analyze relationship between household savin…

OECD Household savings data analysis 4 - Join World Bank per capita GDP data using R inner_join() function

Generated by Bing Image Creator: Photographs of rape blossoms like an illustrated book, more shiny and green www.crosshyou.info This post is following of above post. In the previous post, I found year 2000 is a special year for household s…

読書記録 - 「文学は地球を想像する エコクリティシズムの挑戦」 結城 正美 著 (岩波新書)

文学は地球を想像する エコクリティシズムの挑戦 (岩波新書 新赤版 1988) 作者:結城 正美 岩波書店 Amazon エコクリティシズムという学問分野があるのは知りませんでした。文学を環境との係りの観点から分析、考察していくものだそうです。 ソローの「森の生…

OECD Household savings data analysis 3 - Using R reveals Year 2020 is special year for Household savings.

Generated by Bing Image Creator:Lovely photograph of beautiful sunflowers in a city www.crosshyou.info This post is following of the above post. In the above post, I made a subset data frame, which is balanced panel data. Let's see time tr…

OECD Household savings data analysis 2 - Data visualization, histogram, bar chart and box plot with R ggplot2

Generated by Bing Image Creator: photo of real iris flower garden www.crosshyou.info This post is following of the above post. In the previous post, I make a tidy data frame. In this post, I will do visualization to get the feeling of what…

読書記録 - 「ジェンダー格差 実証経済学は何を語るか」 牧野 百恵 著 (中公新書)

ジェンダー格差 実証経済学は何を語るか (中公新書) 作者:牧野百恵 中央公論新社 Amazon ジェンダーとは、社会・文化的に意味づけされた性別のことで、生物学的な性別はセックスというそうです。 この本では、その社会・文化的に意味づけされた性別の格差を…

読書記録 - 「社会学の新地平 ウェーバーからルーマンへ」佐藤 俊樹 著 (岩波新書)

社会学の新地平 ウェーバーからルーマンへ (岩波新書) 作者:佐藤 俊樹 岩波書店 Amazon 「この」産業社会がどのように発生していったのかを考えていったのがウェーバーとルーマンということですが、正直言ってよくわからなかったです。 何故かというと、「こ…

OECD Household savings data analysis 1 - Import CSV file data into R using read_csv() function.

Generated by Bing Image Creator:Beautiful scientific natural flowers on the moon, photo In this post, I will analyse OECD Household savings data with R. I downloaded below CSV fril from OECD web site. I use R to analyze above data. To begi…

都道府県別の睡眠の平均時間のデータの分析5 - Rで回帰分析 - 睡眠時間の平均値と県民一人当り県内総生産額は関連なさそう。

Generated by Bing Image Creator:beautiful clear phot of a flower, wisteria, background is Technopolis www.crosshyou.info の続きです。 前回は、男子と女子では、女子のほうが睡眠時間が短いこと、2001年と2011年では2011年のほうが睡眠時間が短いこ…

都道府県別の睡眠の平均時間のデータの分析4 - Rのt.test()関数で平均値の差の検定とinferパッケージでANOVA。女子のほうが睡眠時間が短い。

Generated by Bing Imae Creator:realistic photo of a Chimonanthus praecox www.crosshyou.info の続きです。前回までで、だいたいの睡眠時間の様子がわかりましたので、今回は男性と女性で睡眠時間に差があるのかどうかを調べてみましょう。 平均値の違い…

都道府県別の睡眠の平均時間のデータの分析3 - Rのdplyrパッケージでグループ化して最大値・最小値を並び替え。

Generated by Bing Image Creator:Realistic Photo of winter flower park www.crosshyou.info の続きです。今回はRのdplyrパッケージで、データフレームをgroup_by()関数でグループ化して、slice_max()関数やslice_max()関数でグループごとの最大値や最小値…