{"id":1652,"date":"2016-12-31T15:41:35","date_gmt":"2016-12-31T06:41:35","guid":{"rendered":"http:\/\/www.con3.com\/rinlab\/?p=1652"},"modified":"2018-09-02T20:47:52","modified_gmt":"2018-09-02T11:47:52","slug":"r%e3%81%a7pisa2015","status":"publish","type":"post","link":"https:\/\/www.con3.com\/rinlab\/?p=1652","title":{"rendered":"R\u3067PISA2015"},"content":{"rendered":"<p>\u3000<a href=\"https:\/\/www.oecd.org\/pisa\/\" target=\"_blank\">PISA2015<\/a>\u306e\u300cICT\u6d3b\u7528\u8abf\u67fb\u300d\u306e\u5206\u6790\u8a18\u4e8b\u304c\u8a71\u984c\u306b\u306a\u3063\u3066\u3044\u307e\u3059\uff61<\/p>\n<ul>\n<li>OECD PISA2015\u306e\u3010ICT\u89aa\u548c\u6027\u9805\u76ee\u3011\u306e\u5206\u6790\u30fb\u8003\u5bdf\uff08<a href=\"http:\/\/i-learn.jp\/archives\/623\">1<\/a>, <a href=\"http:\/\/i-learn.jp\/archives\/640\">2<\/a>, <a href=\"http:\/\/i-learn.jp\/archives\/656\">3<\/a>, <a href=\"http:\/\/i-learn.jp\/archives\/667\">4<\/a>, <a href=\"http:\/\/i-learn.jp\/archives\/677\">5<\/a>, <a href=\"http:\/\/i-learn.jp\/archives\/691\">6<\/a>, <a href=\"http:\/\/i-learn.jp\/archives\/707\">7<\/a>, <a href=\"http:\/\/i-learn.jp\/archives\/719\">8<\/a>\uff09<\/li>\n<li>OECD\u306b\u3088\u308b\u5b66\u7fd2\u5230\u9054\u5ea6\u8abf\u67fb\uff08PISA\uff09\u306e\u30c7\u30fc\u30bf\u3092\u89e6\u3063\u3066\u611f\u3058\u305f\u3053\u3068<br \/><a href=\"http:\/\/ascii.jp\/elem\/000\/001\/407\/1407179\/\">\u65e5\u672c\u306e\u5b50\u4f9b\u306f\u8ce2\u3044\u304c\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u30fc\u304c\u4f7f\u3048\u306a\u3044<\/a><\/li>\n<li>\u65e5\u672c\u306e\u5b50\u4f9b\u306f\u8ce2\u3044\u304c\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u30fc\u304c\u4f7f\u3048\u306a\u3044\uff08\u7d9a\uff09<br \/><a href=\"http:\/\/ascii.jp\/elem\/000\/001\/410\/1410256\/\">OECD\u3001PISA\u306e\u7d50\u679c\u3092\u307f\u308b\u3068\u65e5\u672c\u306f\u3082\u306f\u3084\u201c\u30aa\u30bf\u30af\u201d\u3067\u3059\u3089\u306a\u3044<\/a><\/li>\n<\/ul>\n<p>\u00a0\u3000OECD\u306eWeb\u30b5\u30a4\u30c8\u306b\u306f\uff0c\u5404\u7a2e\u5831\u544a\u66f8\u3068\u3068\u3082\u306b\u30c7\u30fc\u30bf\u30d5\u30a1\u30a4\u30eb\u3082\u7d71\u8a08\u30bd\u30d5\u30c8\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u516c\u958b\u3055\u308c\u3066\u3044\u3066\uff0c<a href=\"https:\/\/www.oecd.org\/pisa\/data\/2015database\/\" target=\"_blank\">\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/a>\u3059\u308c\u3070\u81ea\u5206\u3067\u96c6\u8a08\u51e6\u7406\u3092\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\uff61\uff08\u96c6\u8a08\u6982\u8981\u306f\u300cCompendia\u300d\u3068\u3057\u3066Excel\u30d5\u30a1\u30a4\u30eb\u306b\u307e\u3068\u3081\u3089\u308c\u3066\u3044\u307e\u3059\uff61\uff09<\/p>\n<p>\u3000\u666e\u901a\u306b\u8a73\u7d30\u3092\u691c\u8a0e\u3059\u308b\u306a\u3089\uff0c\u6982\u8981\u30d5\u30a1\u30a4\u30eb\u3092Excel\u3067\u51e6\u7406\u3057\u305f\u65b9\u304c\u697d\u3060\u3068\u601d\u3044\u307e\u3059\u304c\uff0c\u305b\u3063\u304b\u304f\u306a\u306e\u3067\uff0cR\u3068\u3044\u3046\u7d71\u8a08\u74b0\u5883\u306b\u6311\u6226\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\uff61<\/p>\n<p>\u3000\uff08\u8ffd\u8a1820170114\uff1a\u300c<a href=\"http:\/\/www.con3.com\/rinlab\/?p=1713\" target=\"_blank\">R\u3067PISA2015\u3008\u305d\u306e2\u3009<\/a>\u300d\u3082\u3054\u89a7\u4e0b\u3055\u3044\uff09<\/p>\n<p>&#8212;<\/p>\n<p>\u3000<a href=\"https:\/\/www.r-project.org\">R<\/a>\u306f\uff0c\u7d71\u8a08\u5206\u6790\u306e\u305f\u3081\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u3067\u3059\uff61\u5e02\u8ca9\u306e\u7d71\u8a08\u30bd\u30d5\u30c8\u304c\u88cf\u5074\u3067\u51e6\u7406\u3057\u3066\u3044\u308b\u3053\u3068\u3092\u5229\u7528\u8005\u81ea\u8eab\u304c\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3059\u308b\u3053\u3068\u3067\uff0c\u5e0c\u671b\u306b\u5fdc\u3058\u305f\u7d71\u8a08\u5206\u6790\u51e6\u7406\u3092\u884c\u306a\u308f\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3068\u3044\u3046\u308f\u3051\u3067\u3059\uff61\u305d\u306e\u4ee3\u308f\u308a\uff0c\u30dc\u30bf\u30f3\uff11\u3064\u3067\u51e6\u7406\u3055\u305b\u308b\u3088\u3046\u306a\u624b\u8efd\u3055\u306f\u306a\u3044\u3068\u3044\u3046\u306e\u304c\u6577\u5c45\u306e\u9ad8\u3044\u3068\u3053\u308d\u3067\u3059\uff61<\/p>\n<p>\u3000\u3057\u304b\u3057\uff0cR\u8a00\u8a9e\u3068\u305d\u306e\u305f\u3081\u306e\u74b0\u5883\u3092\u69cb\u6210\u3059\u308b\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306f\uff0c\u30aa\u30fc\u30d7\u30f3\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3068\u3057\u3066\u7121\u511f\u3067\u516c\u958b\u3055\u308c\u3066\uff0c\u4e16\u754c\u4e2d\u306e\u5c02\u9580\u5bb6\u304c\u4ed5\u4e8b\u3067\u5229\u6d3b\u7528\u3057\u3066\u3044\u308b\u512a\u308c\u3082\u306e\u3067\u3059\uff61\u7814\u7a76\u3092\u751f\u696d\u3068\u3057\u3066\u3044\u308b\u3082\u306e\u3068\u3057\u3066\u306f\uff0c\u4e00\u5ea6\u306f\u3061\u3083\u3093\u3068\u89e6\u308c\u3066\u304a\u304d\u305f\u3044\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3067\u3059\uff61<\/p>\n<p>\u3000\u53d6\u3063\u4ed8\u304d\u96e3\u3055\u306f\u3042\u308c\u3069\uff0c\u5c0e\u5165\u624b\u7d9a\u306f\u7c21\u5358\u3067\u3059\uff61<\/p>\n<p>\u30001. R\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\uff61 \uff08\u305f\u3068\u3048\u3070\u3053\u3061\u3089\u304b\u3089 <a href=\"https:\/\/cran.ism.ac.jp\">https:\/\/cran.ism.ac.jp<\/a>\u00a0\uff09<\/p>\n<p>\u30002. RStudio\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\uff61\u00a0<a href=\"https:\/\/www.rstudio.com\/products\/RStudio\/\">https:\/\/www.rstudio.com\/products\/RStudio\/<\/a>\u00a0<\/p>\n<p>\u30003. R\u3068RStudio\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\uff61<\/p>\n<p>\u30004. RStudio\u3092\u8d77\u52d5\u3059\u308b\uff61<\/p>\n<p>\u3000\u3053\u308c\u3067\uff0c\u6e96\u5099\u304c\u51fa\u6765\u307e\u3057\u305f\uff61\u3042\u3068\u306f\uff0c\u30c7\u30fc\u30bf\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u8fbc\u3080\u306a\u3069\u3057\u3066\uff0c\u7d71\u8a08\u51e6\u7406\u3092\u547d\u4ee4\u3057\u3066\u3044\u304d\u307e\u3059\uff61<\/p>\n<p>\u3000\u3061\u306a\u307f\u306bR\u3068RStudio\u3067\u3059\u304c\uff0cR\u304c\u8a00\u8a9e\u547d\u4ee4\u3092\u51e6\u7406\u3059\u308b\u672c\u4f53\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3067\uff0cRStudio\u306f\u64cd\u4f5c\u306e\u3057\u3084\u3059\u3044\u7a93\u53e3\uff08\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\uff09\u3092\u63d0\u4f9b\u3059\u308b\u7d71\u5408\u74b0\u5883\u30bd\u30d5\u30c8\u3067\u3059\uff61<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" style=\"display: block; margin-left: auto; margin-right: auto;\" title=\"rstudio.png\" src=\"http:\/\/con3.xsrv.jp\/rinlab\/wp-content\/uploads\/2016\/12\/rstudio-1.png\" alt=\"RStudio\" width=\"400\" height=\"336\" border=\"0\" \/><\/p>\n<p>\u3000\u5de6\u4e0a\u304c\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u7de8\u96c6\u3059\u308b\u5834\u6240\uff0c\u5de6\u4e0b\u300c\u30b3\u30f3\u30bd\u30fc\u30eb\u300d\u304c\u5b9f\u969b\u306b\u547d\u4ee4\u3092\u3059\u308b\u5834\u6240\uff0c\u53f3\u4e0a\u306b\u3044\u308d\u3093\u306a\u30c7\u30fc\u30bf\u306e\u4e00\u89a7\uff0c\u53f3\u4e0b\u304c\u30d5\u30a1\u30a4\u30eb\u4e00\u89a7\u3067\u3059\u304c\uff0c\u30bf\u30d6\u3067\u5207\u308a\u66ff\u3048\u308b\u3068\u3044\u308d\u3093\u306a\u60c5\u5831\u3092\u8868\u793a\u3067\u304d\u307e\u3059\uff61<\/p>\n<p>&#8212;<\/p>\n<p>\u3000\u53c2\u8003\u60c5\u5831\u3068\u3057\u3066\u4e09\u91cd\u5927\u5b66\u306e\u5965\u6751\u5148\u751f\u306b\u3088\u308b\u300c<a href=\"https:\/\/oku.edu.mie-u.ac.jp\/~okumura\/stat\/pisa2015.html\">PISA 2015\u30c7\u30fc\u30bf\u3092\u8aad\u3080<\/a>\uff08\u672a\u5b8c\uff09\u300d\u3068\u3044\u3046Web\u30da\u30fc\u30b8\u304c\u8cb4\u91cd\u306a\u5165\u308a\u53e3\u3092\u793a\u3057\u3066\u304f\u3060\u3055\u3063\u3066\u3044\u307e\u3059\u306e\u3067\uff0c\u3053\u308c\u3092\u307e\u305a\u8a66\u3057\u3066\u307f\u307e\u3057\u3087\u3046\uff61<\/p>\n<p>\u3000\u521d\u3081\u3066\u3060\u3068\u300c\u53d6\u5f97\u304b\u3089\u8aad\u307f\u8fbc\u307f\u307e\u3067\u300d\u306e\u90e8\u5206\u3067\u97f3\u3092\u4e0a\u3052\u305d\u3046\u3067\u3059\u304c\uff0cR\u306f\u6a19\u6e96\u3067\u5099\u308f\u3063\u3066\u3044\u308b\u6a5f\u80fd\u3092\u547d\u4ee4\u3067\u547c\u3073\u51fa\u3059\u4ee5\u5916\u306b\u3082\uff0c\u30d1\u30c3\u30b1\u30fc\u30b8\u3068\u3044\u3046\u3082\u306e\u3092\u8db3\u3057\u3066\u3044\u304f\u3053\u3068\u3067\u6a5f\u80fd\u62e1\u5f35\u3055\u305b\u308b\u3053\u3068\u304c\u53ef\u80fd\u306a\u306e\u3067\uff0cPISA\u306e\u30c7\u30fc\u30bf\u30d5\u30a1\u30a4\u30eb\u304c\u4ed6\u306e\u30bd\u30d5\u30c8\u5411\u3051\u306e\u3082\u306e\u3067\u3082\uff0c\u8a72\u5f53\u3059\u308b\u30d1\u30c3\u30b1\u30fc\u30b8\u3055\u3048\u3042\u308c\u3070\u8aad\u307f\u8fbc\u3080\u6a5f\u80fd\u3092\u8ffd\u52a0\u3067\u304d\u307e\u3059\uff61\u305d\u3046\u3084\u3063\u3066\u8aad\u307f\u8fbc\u3093\u3067\u307f\u308b\u3068PISA\u30c7\u30fc\u30bf\u306f\u7d50\u69cb\u30e1\u30e2\u30ea\u98df\u3046\u306d\u3063\u3066\u8a71\u304c\u66f8\u3044\u3066\u3042\u308a\u307e\u3059\uff61<\/p>\n<p>\u3000\u3057\u304b\u3057\uff0c\u3053\u3053\u3067\u306fRStudio\u3068\u3044\u3046\u7d71\u5408\u74b0\u5883\u30bd\u30d5\u30c8\u3092\u4f7f\u3046\u3053\u3068\u306b\u3057\u305f\u306e\u3067\uff0c\u3053\u306e\u8fba\u3092\u304b\u306a\u308a\u697d\u306b\u30af\u30ea\u30a2\u3067\u304d\u3066\u3057\u307e\u3044\u307e\u3059\uff61<\/p>\n<p>\u3000macOS\u3067\u3042\u308c\u3070\uff0cPISA\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u5727\u7e2e\u30d5\u30a1\u30a4\u30eb\uff08\u305f\u3068\u3048\u3070\u00a0PUF_SPSS_COMBINED_CMB_STU_QQQ.zip\uff09\u3092\u5c55\u958b\u3057\u3066\u51fa\u6765\u4e0a\u304c\u3063\u305f\u30d5\u30a1\u30a4\u30eb\uff08Cy6_ms_cmb_stu_qqq.sav\uff09\u3092\u81ea\u5206\u306e\u30db\u30fc\u30e0\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u79fb\u52d5\u3055\u305b\u308c\u3070\uff0cRStudio\u306e\u30d5\u30a1\u30a4\u30eb\u4e00\u89a7\u753b\u9762\u3067\u78ba\u8a8d\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\uff61\u3053\u308c\u3092\u30c0\u30d6\u30eb\u30af\u30ea\u30c3\u30af\u306a\u3069\u3057\u3066\u958b\u3053\u3046\u3068\uff08\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u3088\u3046\u3068\uff09\u3059\u308b\u3068\uff0c\u5fc5\u8981\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u304b\uff1f\u3068\uff08\u82f1\u8a9e\u3067\u2026\uff09\u805e\u3044\u3066\u304d\u307e\u3059\u306e\u3067\uff0c\u305d\u306e\u6307\u793a\u306b\u5f93\u3063\u3066\u64cd\u4f5c\u3059\u308c\u3070\u8aad\u307f\u8fbc\u307f\u306b\u95a2\u3057\u3066\u306f\u5b8c\u4e86\u3057\u3066\u3057\u307e\u3044\u307e\u3059\uff61<\/p>\n<p>\u3000\u4e0a\u306e\u753b\u9762\u5199\u771f\u306e\u8d64\u3044\u77e2\u5370\u3042\u305f\u308a\u306b\u3042\u308b\u300cPacakges\u300d\u3068\u3044\u3046\u30bf\u30d6\u3067\u5207\u308a\u66ff\u3048\u308b\u3068\uff0c\u73fe\u5728\u624b\u5143\u306b\u3042\u308b\u30d1\u30c3\u30b1\u30fc\u30b8\u4e00\u89a7\u3068\u5229\u7528\u3059\u308b\u304b\u3069\u3046\u304b\u306e\u30c1\u30a7\u30c3\u30af\u30de\u30fc\u30af\u304c\u4e26\u3093\u3067\u3044\u3066\u78ba\u8a8d\u3067\u304d\u307e\u3059\uff61\u3053\u306e\u4e00\u89a7\u306b\u306a\u3044\u30d1\u30c3\u30b1\u30fc\u30b8\u306f\u300cinstall\u300d\u30dc\u30bf\u30f3\u3067\u63a2\u3057\u306b\u884c\u3063\u3066\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u307e\u3059\uff61<\/p>\n<p>\u3000\u300c<a href=\"https:\/\/oku.edu.mie-u.ac.jp\/~okumura\/stat\/pisa2015.html\">PISA 2015\u30c7\u30fc\u30bf\u3092\u8aad\u3080<\/a>\uff08\u672a\u5b8c\uff09\u300d\u3067\u306f\uff0c\u300cdata\u300d\u3068\u3044\u3046\u5909\u6570\uff08\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\uff09\u306b\u8aad\u307f\u8fbc\u3093\u3060\u30c7\u30fc\u30bf\u304c\u683c\u7d0d\u3055\u308c\u305f\u306e\u3067\u3059\u304c\uff0cRStudio\u3092\u4f7f\u3063\u3066\u4e0a\u8a18\u306e\u65b9\u6cd5\u3092\u3068\u308b\u3068\u300cCy6_ms_cmb_stu_qqq\u300d\u3068\u3044\u3046\u540d\u524d\u306b\u306a\u308b\u3093\u3058\u3083\u306a\u3044\u304b\u306a\u3068\u601d\u3044\u307e\u3059\uff61\u7d9a\u304f\u300c\u56de\u7b54\u306e\u5206\u6790\u300d\u306e\u89e3\u8aac\u3068\u547d\u4ee4\u306f\u305d\u306e\u90e8\u5206\u3092\u7f6e\u304d\u63db\u3048\u3066\uff0c\u30b3\u30f3\u30bd\u30fc\u30eb\u5185\u3067\u64cd\u4f5c\u3059\u308c\u3070Web\u30da\u30fc\u30b8\u901a\u308a\u306b\u306a\u308b\u3068\u601d\u3044\u307e\u3059\uff61<\/p>\n<p>&#8212;<\/p>\n<p>\u3000\u3055\u3066\uff0c\u554f\u984c\u306f\u3053\u3053\u304b\u3089\u5148\u3067\u3059\uff61<\/p>\n<p>\u3000\u4ed6\u306e\u8cea\u554f\u306b\u5bfe\u3059\u308b\u56de\u7b54\u96c6\u8a08\u3084\u9078\u629e\u80a2\u306e\u7570\u306a\u308b\u5834\u5408\u306e\u51e6\u7406\u306a\u3069\uff0c\u3069\u3046\u3084\u3063\u305f\u3089\u3044\u308d\u3044\u308d\u898b\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u3067\u3057\u3087\u3046\u304b\uff61\u3067\u304d\u308c\u3070Excel\u306e\u3088\u3046\u306b\u30b0\u30e9\u30d5\u4f5c\u6210\u3057\u305f\u3089\u30d1\u30c3\u3068\u8996\u899a\u7684\u306b\u78ba\u8a8d\u3067\u304d\u308b\u3068\u5b09\u3057\u3044\uff61<\/p>\n<p>\u3000\u3057\u304b\u3057\uff0cR\u306b\u6311\u6226\u3059\u308b\u5834\u5408\u306b\u306f\uff0c\u30d1\u30c3\u3068\u51fa\u308b\u306e\u3092\u300c\u81ea\u5206\u3067\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u300d\u3057\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u304b\u3089\uff0cR\u8a00\u8a9e\u3092\u4f7f\u3063\u3066\u8a66\u884c\u932f\u8aa4\u3059\u308b\u3053\u3068\u3068\u306a\u308a\u307e\u3059\uff61<\/p>\n<p>\u3000 \u5965\u6751\u5148\u751f\u306eWeb\u30da\u30fc\u30b8\u304c\u300c\uff08\u672a\u5b8c\uff09\u300d\u306a\u306e\u306f\uff0c\u7d4c\u9a13\u306e\u3042\u308b\u65b9\u3067\u3082\u305d\u308c\u306a\u308a\u306b\u6642\u9593\u3092\u304b\u3051\u308b\u4ed5\u4e8b\u306b\u306a\u308b\u304b\u3089\u3067\uff0c\u3055\u307e\u3056\u307e\u306a\u8cea\u554f\u5f62\u5f0f\u306ePISA\u30c7\u30fc\u30bf\u3092R\u3067\u8aad\u3080\u3068\u306a\u308b\u3068\u7169\u96d1\u3055\u306f\u3084\u3080\u3092\u5f97\u306a\u3044\u3068\u3053\u308d\u3067\u3059\uff61<\/p>\n<p>\u3000\u3068\u3044\u3046\u308f\u3051\u3067\uff0c\u79c1\u3082\u5b8c\u6210\u3068\u307e\u3067\u306f\u3044\u304d\u307e\u305b\u3093\u304c\uff0c\u5c11\u3057\u30c1\u30e3\u30ec\u30f3\u30b8\u3057\u305f\u6210\u679c\u3092\u4ee5\u4e0b\u306b\u8f09\u305b\u3066\u304a\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\uff61R\u8a00\u8a9e\u306f\u521d\u3081\u3066\u3067\u3059\u306e\u3067\uff0c\u5404\u6240\u306e\u304a\u77e5\u6075\u3092\u62dd\u501f\u3057\u3066\u7d44\u3093\u3067\u307f\u305f\uff0c\u3068\u308a\u3042\u3048\u305a\u52d5\u3044\u305f\u3068\u3044\u3046\u30ec\u30d9\u30eb\u3067\u3059\uff61R\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306e\u53c2\u8003\u306b\u306f\u306a\u308a\u307e\u305b\u3093\u304c\uff0c\u3068\u308a\u3042\u3048\u305aPISA\u30c7\u30fc\u30bf\u3092\u3044\u3058\u3063\u3066\u307f\u305f\u3044\u3068\u3044\u3046\u7686\u3055\u3093\u306e\u53c2\u8003\u306b\u306a\u308c\u3070\u3068\u601d\u3044\u307e\u3059\uff61\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u7de8\u96c6\u3059\u308b\u5834\u6240\uff08\u5de6\u4e0a\uff09\u306b\u8cbc\u308a\u4ed8\u3051\u3066\u5b9f\u884c\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\uff61<\/p>\n<p>\u3000\u306a\u304a\uff0c\u3053\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u5b66\u6821\u8cea\u554f\u7d19\u300cSC017Q07NA\u300d\u3068\u3044\u3046\u8cea\u554f\u306e\u30b0\u30e9\u30d5\u3092\u63cf\u304f\u3082\u306e\u3067\u3059\uff61\u8cea\u554f\u756a\u53f7\u3084\u30d5\u30a1\u30a4\u30eb\u3092\u5909\u3048\u3066\u6539\u826f\u3057\u3066\u304f\u3060\u3055\u3044\uff61<\/p>\n<p>&#8212;<\/p>\n<pre># For PISA2015 rev2<br \/># K.RIN<br \/><br \/>library(haven)<br \/>library(ggplot2)<br \/>library(plyr)<br \/>library(tidyverse)<br \/><br \/>#student_raw &lt;- read_sav(\"~\/Cy6_ms_cmb_stu_qqq.sav\")<br \/>school_raw &lt;- read_sav(\"~\/Cy6_ms_cmb_sch_qqq.sav\")<br \/><br \/>#\u8cea\u554f\u6587\uff08\u624b\u52d5\u3067\u8cea\u554f\u6587\u3092\u30b3\u30d4\u30da\uff09<br \/>q_title &lt;- \"Is your school\u2019s capacity to provide instruction hindered by any of the following issues?\\n[SC017Q07NA] A lack of physical infrastructure\\n (e.g.building, grounds, heating\/cooling, lighting and acoustic systems)\"<br \/>#\u56de\u7b54\u9078\u629e\u80a2\uff08\u624b\u52d5\u3067\u8a2d\u5b9a\u306e\u3053\u3068\uff09<br \/>ans_limits &lt;- c(\"1\",\"2\",\"3\",\"4\")<br \/>ans_labels &lt;- c(\"\u307e\u3063\u305f\u304f\\n\u3042\u3066\u306f\u307e\u3089\u306a\u3044\",\"\u3069\u3061\u3089\u304b\u3068\u3044\u3048\u3070\\n\u3042\u3066\u306f\u307e\u3089\u306a\u3044\",\"\u3069\u3061\u3089\u304b\u3068\u3044\u3048\u3070\\n\u3042\u3066\u306f\u307e\u308b\",\"\u3068\u3066\u3082\u3088\u304f\\n\u3042\u3066\u306f\u307e\u308b\")<br \/>#\u30e9\u30d9\u30eb<br \/>y_label &lt;- \"\u30d1\u30fc\u30bb\u30f3\u30c8 %\"<br \/>x_label &lt;- \"\u56fd\"<br \/>legend_label &lt;- \"\u56de\u7b54\"<br \/><br \/>#\u56de\u7b54\u30c7\u30fc\u30bf\u62bd\u51fa\uff08\u56fd\u5225\u30af\u30ed\u30b9\u96c6\u8a08\uff09<br \/>tmp &lt;- subset(school_raw, school_raw$SC017Q07NA != \"NaN\")<br \/>country_ans_table &lt;- table(tmp$CNT,tmp$SC017Q07NA)<br \/>ftable(country_ans_table)<br \/><br \/>#\u7e26\u9577df\u3078\u5909\u63db<br \/>country_ans_long &lt;- tbl_df(country_ans_table)<br \/>#\u6a2a\u9577df\u7248\u30af\u30ed\u30b9\u8868<br \/>country_ans_wide &lt;- spread(country_ans_long, Var2, n)<br \/>#\u56fd\u5225id\u3065\u3051\uff08\u3044\u307e\u306e\u3068\u3053\u308d\u5229\u7528\u305b\u305a\u2026\uff09<br \/>country_ans_wide &lt;- country_ans_wide %&gt;% rownames_to_column('id')<br \/>#id\u3092\u6587\u5b57\u304b\u3089\u6570\u5024\u3078\u30e2\u30fc\u30c9\u5909\u63db<br \/>mode(country_ans_wide$id) &lt;- \"integer\"<br \/>#\u56fd\u5225id\u4ed8\u304d\u7e26\u9577df<br \/>country_ans_long &lt;- gather(country_ans_wide, answer,count,-id,-Var1)<br \/><br \/>#\u4e26\u3079\u66ff\u3048\uff08\u8868\u793a\u306e\u95a2\u4fc2\u3067\u9006\u9806\u306b\uff09<br \/>country_ans_long &lt;- arrange(country_ans_long, desc(Var1), desc(answer))<br \/><br \/>#\u5217\u540d\u5909\u66f4<br \/>colnames(country_ans_long) &lt;- c(\"id\", \"CNT\", \"answer\", \"count\")<br \/>#\u30d1\u30fc\u30bb\u30f3\u30c8\u8a08\u7b97\uff08\u30b0\u30e9\u30d5\u63cf\u5199\u7528\uff09<br \/>country_ict &lt;- ddply(country_ans_long, \"CNT\", transform, percent = count \/ sum(count) * 100, 0.1)<br \/>#\u5c0f\u6570\u70b9\u4ee5\u4e0b\uff11\u6841\u51e6\u7406\uff08\u30e9\u30d9\u30eb\u8868\u793a\u7528\uff0c\u5408\u8a08\u304c100%\u306b\u306a\u3089\u306a\u3044\u3053\u3068\u3042\u308a\uff09<br \/>country_ict &lt;- ddply(country_ict, \"CNT\", transform, percent_rounded = round_any(count \/ sum(count) * 100, 0.1))<br \/>#\u30e9\u30d9\u30eb\u4f4d\u7f6e\u8a08\u7b97<br \/>country_ict &lt;- ddply(country_ict, \"CNT\", transform, percent_label_y = cumsum(percent)-0.5*percent)<br \/>country_ict &lt;- arrange(country_ict, desc(CNT), desc(answer))<br \/><br \/>#\u30d5\u30a9\u30f3\u30c8\u30d5\u30a1\u30df\u30ea\u30fc\u8a2d\u5b9a<br \/>quartzFonts(HiraKaku = quartzFont(rep(\"HiraginoSans-W3\", 4)))<br \/>par(family = \"HiraKaku\")<br \/><br \/>#\u30b0\u30e9\u30d5\u63cf\u753b<br \/>graph &lt;- ggplot(country_ict, aes(x = CNT, y = percent, fill = factor(answer))) + geom_bar(stat = \"identity\", position='stack') + scale_color_manual(values = rainbow(7)) + theme_bw() + geom_text(aes(y = percent_label_y, label = percent_rounded), color = \"white\", size = 3) + scale_y_reverse(breaks = c(100.0,75.0,50.0,25.0,0.0), labels = c(\"0%\",\"25%\",\"50%\",\"75%\",\"100%\")) + coord_flip(expand = FALSE) +<br \/> ggtitle(q_title) + scale_fill_discrete(limits = ans_limits, labels = ans_labels) + ylab(y_label) + xlab(x_label) + labs(fill = legend_label) + theme(legend.title = element_text(family = \"HiraKaku\", size = 10),plot.title = element_text(family = \"HiraKaku\", size = 10), legend.text = element_text(family = \"HiraKaku\", size = 7), axis.title = element_text(family = \"HiraKaku\", size = 9), axis.title.y = element_text(angle = 0, vjust = 0.5))<br \/><br \/>print(graph)<\/pre>\n<p>&#8212;<\/p>\n<p>\u53c2\u8003\u8cc7\u6599<\/p>\n<p>\u300c<a href=\"https:\/\/oku.edu.mie-u.ac.jp\/~okumura\/stat\/pisa2015.html\">PISA 2015\u30c7\u30fc\u30bf\u3092\u8aad\u3080\uff08\u672a\u5b8c\uff09<\/a>\u300d\uff08\u5965\u6751\u6674\u5f66\uff09<br \/>\u300e<a href=\"https:\/\/www.oreilly.co.jp\/books\/9784873115337\/\">R\u30af\u30c3\u30af\u30d6\u30c3\u30af<\/a>\u300f\uff08\u30aa\u30e9\u30a4\u30ea\u30fc\uff09<br \/>\u300e<a href=\"https:\/\/www.oreilly.co.jp\/books\/9784873116532\/\">R\u30b0\u30e9\u30d5\u30a3\u30c3\u30af\u30b9\u30af\u30c3\u30af\u30d6\u30c3\u30af<\/a>\u300f\uff08\u30aa\u30e9\u30a4\u30ea\u30fc\uff09<br \/>\u300c<a href=\"https:\/\/heavywatal.github.io\/rstats\/ggplot2.html\">ggplot2 \u2014 \u304d\u308c\u3044\u306a\u30b0\u30e9\u30d5\u3092\u7c21\u5358\u306b\u5408\u7406\u7684\u306b<\/a>\u300d\u300c<a href=\"https:\/\/heavywatal.github.io\/rstats\/tidyr.html\">tidyr \u2014 \u30b7\u30f3\u30d7\u30eb\u306a\u30c7\u30fc\u30bf\u5909\u5f62\u30c4\u30fc\u30eb<\/a>\u300d\uff08Heavy Watal\uff09<br \/>\u300c<a href=\"http:\/\/docs.ggplot2.org\/current\/\">ggplot2 documentation<\/a>\u300d\uff08Hadley Wickham\uff09<br \/>\u300c<a href=\"http:\/\/www.slideshare.net\/teramonagi\/tokyo-r30-20130420\">\u300cplyr\u30d1\u30c3\u30b1\u30fc\u30b8\u3067\u541b\u3082\u524d\u51e6\u7406\u30b9\u30bf\u2606\u300d\u6539\u3081\u300cplyr\u30d1\u30c3\u30b1\u30fc\u30b8\u5fb9\u5e95\u5165\u9580\u300d<\/a>\u300d\uff08tera monagi\uff09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3000PISA2015\u306e\u300cICT\u6d3b\u7528\u8abf\u67fb\u300d\u306e\u5206\u6790\u8a18\u4e8b\u304c\u8a71\u984c\u306b\u306a\u3063\u3066\u3044\u307e\u3059\uff61 OECD PISA2015\u306e\u3010ICT\u89aa\u548c\u6027\u9805\u76ee\u3011\u306e\u5206\u6790\u30fb\u8003\u5bdf\uff081, 2, 3, 4, 5, 6, 7, 8\uff09 OECD\u306b\u3088\u308b\u5b66\u7fd2\u5230\u9054\u5ea6\u8abf\u67fb\uff08PISA [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[2,5],"tags":[],"class_list":["post-1652","post","type-post","status-publish","format-standard","hentry","category-resources","category-topics"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4WGyZ-qE","jetpack_likes_enabled":false,"_links":{"self":[{"href":"https:\/\/www.con3.com\/rinlab\/index.php?rest_route=\/wp\/v2\/posts\/1652","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.con3.com\/rinlab\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.con3.com\/rinlab\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.con3.com\/rinlab\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.con3.com\/rinlab\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1652"}],"version-history":[{"count":1,"href":"https:\/\/www.con3.com\/rinlab\/index.php?rest_route=\/wp\/v2\/posts\/1652\/revisions"}],"predecessor-version":[{"id":2662,"href":"https:\/\/www.con3.com\/rinlab\/index.php?rest_route=\/wp\/v2\/posts\/1652\/revisions\/2662"}],"wp:attachment":[{"href":"https:\/\/www.con3.com\/rinlab\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1652"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.con3.com\/rinlab\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1652"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.con3.com\/rinlab\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1652"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}