{"author_url":"https://blog.hatena.ne.jp/iDES/","blog_url":"https://ides.hatenablog.com/","type":"rich","blog_title":"\u4e95\u51fa\u8349\u5e73\u306e\u7814\u7a76\u30ce\u30fc\u30c8","title":"\u91cd\u56de\u5e30\u5206\u6790\u3068\u30ed\u30b8\u30b9\u30c6\u30c3\u30af\u56de\u5e30\u5206\u6790\u3092R\u3068Mplus\u3067\u3084\u3063\u3066\u6bd4\u8f03\u3059\u308b[Mplus][R]","categories":["R","Mplus","\u56de\u5e30\u5206\u6790","\u8a08\u91cf"],"published":"2020-08-29 22:08:11","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fides.hatenablog.com%2Fentry%2F2020%2F08%2F29%2F220811\" title=\"\u91cd\u56de\u5e30\u5206\u6790\u3068\u30ed\u30b8\u30b9\u30c6\u30c3\u30af\u56de\u5e30\u5206\u6790\u3092R\u3068Mplus\u3067\u3084\u3063\u3066\u6bd4\u8f03\u3059\u308b[Mplus][R] - \u4e95\u51fa\u8349\u5e73\u306e\u7814\u7a76\u30ce\u30fc\u30c8\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","version":"1.0","width":"100%","url":"https://ides.hatenablog.com/entry/2020/08/29/220811","provider_url":"https://hatena.blog","image_url":null,"author_name":"iDES","height":"190","description":"\u30c7\u30fc\u30bf\u306e\u6e96\u5099 AER\u30d1\u30c3\u30b1\u30fc\u30b8\u306eCPS1985\u30c7\u30fc\u30bf\u3092\u5229\u7528\u3059\u308b\u3002 library(AER) data(CPS1985) d1 <- CPS1985 caret\u30d1\u30c3\u30b1\u30fc\u30b8\u306edummyVars\u95a2\u6570\u3092\u7528\u3044\u3066\u3001factor\u578b\u306e\u3082\u306e\u3092\u3059\u3079\u3066\u30c0\u30df\u30fc\u5909\u6570\u5316\u3059\u308b\u3002 library(caret) dummy <- dummyVars(~.,data=d1) d2 <- as.data.frame(predict(dummy, d1)) str(d2) \u3053\u306e\u3088\u3046\u306b\u30c0\u30df\u30fc\u5909\u6570\u5316\u3055\u308c\u308b\u3002 'data.frame': 534 obs. of 24 variables: $ wage : num 5.1 4.95 6.6\u2026","provider_name":"Hatena Blog"}