{"id":1195,"date":"2023-07-27T08:19:55","date_gmt":"2023-07-27T08:19:55","guid":{"rendered":"https:\/\/statorials.org\/cn\/r%e4%b8%ad%e7%9a%84%e6%b3%a2%e5%b3%b0%e5%9b%9e%e5%bd%92\/"},"modified":"2023-07-27T08:19:55","modified_gmt":"2023-07-27T08:19:55","slug":"r%e4%b8%ad%e7%9a%84%e6%b3%a2%e5%b3%b0%e5%9b%9e%e5%bd%92","status":"publish","type":"post","link":"https:\/\/statorials.org\/cn\/r%e4%b8%ad%e7%9a%84%e6%b3%a2%e5%b3%b0%e5%9b%9e%e5%bd%92\/","title":{"rendered":"R\u4e2d\u7684\u5cad\u56de\u5f52\uff08\u4e00\u6b65\u4e00\u6b65\uff09"},"content":{"rendered":"<p><\/p>\n<hr>\n<p><span style=\"color: #000000;\"><a href=\"https:\/\/statorials.org\/cn\/\u5c71\u810a\u56de\u5f52\/\" target=\"_blank\" rel=\"noopener noreferrer\">\u5cad\u56de\u5f52<\/a>\u662f\u5f53\u6570\u636e\u4e2d\u5b58\u5728<a href=\"https:\/\/statorials.org\/cn\/\u591a\u91cd\u5171\u7ebf\u6027\u56de\u5f52\/\" target=\"_blank\" rel=\"noopener noreferrer\">\u591a\u91cd\u5171\u7ebf\u6027<\/a>\u65f6\u6211\u4eec\u53ef\u4ee5\u7528\u6765\u62df\u5408\u56de\u5f52\u6a21\u578b\u7684\u65b9\u6cd5\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u7b80\u800c\u8a00\u4e4b\uff0c\u6700\u5c0f\u4e8c\u4e58\u56de\u5f52\u8bd5\u56fe\u627e\u5230\u6700\u5c0f\u5316\u6b8b\u5dee\u5e73\u65b9\u548c (RSS) \u7684\u7cfb\u6570\u4f30\u8ba1\uff1a<\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong>RSS = \u03a3(y <sub>i<\/sub> \u2013 \u0177 <sub>i<\/sub> )2<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">\u91d1\u5b50\uff1a<\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\"><strong>\u03a3<\/strong> \uff1a\u5e0c\u814a\u7b26\u53f7\uff0c\u610f\u601d\u662f<em>\u548c<\/em><\/span><\/li>\n<li><span style=\"color: #000000;\"><strong>y <sub>i<\/sub><\/strong> \uff1a<sup>\u7b2c i \u4e2a<\/sup>\u89c2\u6d4b\u503c\u7684\u5b9e\u9645\u54cd\u5e94\u503c<\/span><\/li>\n<li><span style=\"color: #000000;\"><strong>\u0177 <sub>i<\/sub><\/strong> \uff1a\u57fa\u4e8e\u591a\u5143\u7ebf\u6027\u56de\u5f52\u6a21\u578b\u7684\u9884\u6d4b\u54cd\u5e94\u503c<\/span><\/li>\n<\/ul>\n<p><span style=\"color: #000000;\">\u76f8\u53cd\uff0c\u5cad\u56de\u5f52\u65e8\u5728\u6700\u5c0f\u5316\u4ee5\u4e0b\u56e0\u7d20\uff1a<\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong>RSS + \u03bb\u03a3\u03b2 <sub>j<\/sub> <sup>2<\/sup><\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">\u5176\u4e2d<em>j<\/em>\u4ece 1 \u5230<em>p \u4e2a<\/em>\u9884\u6d4b\u53d8\u91cf\u4e14 \u03bb \u2265 0\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u7b49\u5f0f\u4e2d\u7684\u7b2c\u4e8c\u9879\u79f0\u4e3a<em>\u63d0\u6b3e\u7f5a\u91d1<\/em>\u3002\u5728\u5cad\u56de\u5f52\u4e2d\uff0c\u6211\u4eec\u9009\u62e9\u4ea7\u751f\u5c3d\u53ef\u80fd\u6700\u4f4e\u7684 MSE \u68c0\u9a8c\uff08\u5747\u65b9\u8bef\u5dee\uff09\u7684 \u03bb \u503c\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u672c\u6559\u7a0b\u63d0\u4f9b\u4e86\u5982\u4f55\u5728 R \u4e2d\u6267\u884c\u5cad\u56de\u5f52\u7684\u5206\u6b65\u793a\u4f8b\u3002<\/span><\/p>\n<h3><span style=\"color: #000000;\"><strong>\u7b2c 1 \u6b65\uff1a\u52a0\u8f7d\u6570\u636e<\/strong><\/span><\/h3>\n<p><span style=\"color: #000000;\">\u5bf9\u4e8e\u6b64\u793a\u4f8b\uff0c\u6211\u4eec\u5c06\u4f7f\u7528 R \u7684\u5185\u7f6e\u6570\u636e\u96c6<strong>mtcars<\/strong> \u3002\u6211\u4eec\u5c06\u4f7f\u7528<strong>hp<\/strong>\u4f5c\u4e3a\u54cd\u5e94\u53d8\u91cf\uff0c\u5e76\u4f7f\u7528\u4ee5\u4e0b\u53d8\u91cf\u4f5c\u4e3a\u9884\u6d4b\u53d8\u91cf\uff1a<\/span><\/p>\n<ul>\n<li><span style=\"color: #000000;\">\u82f1\u91cc\/\u52a0\u4ed1<\/span><\/li>\n<li><span style=\"color: #000000;\">\u91cd\u91cf<\/span><\/li>\n<li><span style=\"color: #000000;\">\u62c9\u5c4e<\/span><\/li>\n<li><span style=\"color: #000000;\">\u5feb\u79d2<\/span><\/li>\n<\/ul>\n<p><span style=\"color: #000000;\">\u4e3a\u4e86\u6267\u884c\u5cad\u56de\u5f52\uff0c\u6211\u4eec\u5c06\u4f7f\u7528<strong>glmnet<\/strong>\u5305\u4e2d\u7684\u51fd\u6570\u3002\u8be5\u5305\u8981\u6c42<a href=\"https:\/\/statorials.org\/cn\/\u53d8\u91cf\u89e3\u91ca\u6027\u53cd\u5e94\/\" target=\"_blank\" rel=\"noopener noreferrer\">\u54cd\u5e94\u53d8\u91cf<\/a>\u662f\u4e00\u4e2a\u5411\u91cf\uff0c\u5e76\u4e14\u9884\u6d4b\u53d8\u91cf\u96c6\u662f<strong>data.matrix<\/strong>\u7c7b\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u4e0b\u9762\u7684\u4ee3\u7801\u5c55\u793a\u4e86\u5982\u4f55\u5b9a\u4e49\u6211\u4eec\u7684\u6570\u636e\uff1a<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <span style=\"color: #000000;\"><strong><span style=\"color: #008080;\">#define response variable<\/span>\ny &lt;- mtcars$hp\n\n<span style=\"color: #008080;\">#define matrix of predictor variables\n<\/span>x &lt;- data.matrix(mtcars[, c('mpg', 'wt', 'drat', 'qsec')])\n<\/strong><\/span><\/pre>\n<h3><span style=\"color: #000000;\"><strong>\u6b65\u9aa4 2\uff1a\u62df\u5408\u5cad\u56de\u5f52\u6a21\u578b<\/strong><\/span><\/h3>\n<p><span style=\"color: #000000;\">\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u4f7f\u7528<strong>glmnet()<\/strong>\u51fd\u6570\u6765\u62df\u5408 Ridge \u56de\u5f52\u6a21\u578b\u5e76\u6307\u5b9a<strong>alpha=0<\/strong> \u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u8bf7\u6ce8\u610f\uff0c\u5c06 alpha \u8bbe\u7f6e\u4e3a 1 \u76f8\u5f53\u4e8e\u4f7f\u7528 Lasso \u56de\u5f52\uff0c\u5c06 alpha \u8bbe\u7f6e\u4e3a 0 \u5230 1 \u4e4b\u95f4\u7684\u503c\u76f8\u5f53\u4e8e\u4f7f\u7528\u5f39\u6027\u7f51\u7edc\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u53e6\u8bf7\u6ce8\u610f\uff0c\u5cad\u56de\u5f52\u8981\u6c42\u5bf9\u6570\u636e\u8fdb\u884c\u6807\u51c6\u5316\uff0c\u4ee5\u4fbf\u6bcf\u4e2a\u9884\u6d4b\u53d8\u91cf\u7684\u5747\u503c\u4e3a 0\uff0c\u6807\u51c6\u5dee\u4e3a 1\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u5e78\u8fd0\u7684\u662f\uff0c <strong>glmnet()<\/strong>\u4f1a\u81ea\u52a8\u4e3a\u60a8\u5b8c\u6210\u6b64\u6807\u51c6\u5316\u5de5\u4f5c\u3002\u5982\u679c\u60a8\u5df2\u7ecf\u6807\u51c6\u5316\u4e86\u53d8\u91cf\uff0c\u5219\u53ef\u4ee5\u6307\u5b9a<strong>standardize=False<\/strong> \u3002<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <span style=\"color: #000000;\"><strong><span style=\"color: #008080;\"><span style=\"color: #000000;\"><span style=\"color: #993300;\">library<\/span> (glmnet)<\/span>\n\n#fit ridge regression model\n<\/span>model &lt;- glmnet(x, y, alpha = <span style=\"color: #008000;\">0<\/span> )\n\n<span style=\"color: #008080;\">#view summary of model\n<\/span>summary(model)\n\n          Length Class Mode   \na0 100 -none- numeric\nbeta 400 dgCMatrix S4     \ndf 100 -none- numeric\ndim 2 -none- numeric\nlambda 100 -none- numeric\ndev.ratio 100 -none- numeric\nnulldev 1 -none- numeric\nnpasses 1 -none- numeric\njerr 1 -none- numeric\noffset 1 -none- logical\ncall 4 -none- call   \nnobs 1 -none- numeric\n<\/strong><\/span><\/pre>\n<h3><span style=\"color: #000000;\"><strong>\u6b65\u9aa4 3\uff1a\u9009\u62e9 Lambda \u7684\u6700\u4f73\u503c<\/strong><\/span><\/h3>\n<p><span style=\"color: #000000;\">\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u4f7f\u7528<a href=\"https:\/\/statorials.org\/cn\/k\u6298\u4ea4\u53c9\u9a8c\u8bc1\/\" target=\"_blank\" rel=\"noopener noreferrer\">k \u6298\u4ea4\u53c9\u9a8c\u8bc1<\/a>\u6765\u786e\u5b9a\u4ea7\u751f\u6700\u4f4e\u6d4b\u8bd5\u5747\u65b9\u8bef\u5dee (MSE) \u7684 lambda \u503c\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u5e78\u8fd0\u7684\u662f\uff0c <strong>glmnet<\/strong>\u6709<strong>cv.glmnet()<\/strong>\u51fd\u6570\uff0c\u53ef\u4ee5\u4f7f\u7528 k = 10 \u6b21\u81ea\u52a8\u6267\u884c k \u500d\u4ea4\u53c9\u9a8c\u8bc1\u3002<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <span style=\"color: #000000;\"><strong><span style=\"color: #008080;\">#perform k-fold cross-validation to find optimal lambda value\n<\/span>cv_model &lt;- cv. <span style=\"color: #3366ff;\">glmnet<\/span> (x, y, alpha = <span style=\"color: #008000;\">0<\/span> )\n\n<span style=\"color: #008080;\">#find optimal lambda value that minimizes test MSE\n<\/span>best_lambda &lt;- cv_model$ <span style=\"color: #3366ff;\">lambda<\/span> . <span style=\"color: #3366ff;\">min<\/span>\nbest_lambda\n\n[1] 10.04567\n\n<span style=\"color: #008080;\">#produce plot of test MSE by lambda value<\/span>\nplot(cv_model) \n<\/strong><\/span><\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-11860 \" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/faiter1.png\" alt=\"R\u4e2d\u5cad\u56de\u5f52\u7684\u4ea4\u53c9\u9a8c\u8bc1\" width=\"443\" height=\"426\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p><span style=\"color: #000000;\">\u6700\u5c0f\u5316 MSE \u6d4b\u8bd5\u7684 lambda \u503c\u662f<strong>10.04567<\/strong> \u3002<\/span><\/p>\n<h3><span style=\"color: #000000;\"><strong>\u7b2c\u56db\u6b65\uff1a\u5206\u6790\u6700\u7ec8\u6a21\u578b<\/strong><\/span><\/h3>\n<p><span style=\"color: #000000;\">\u6700\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u5206\u6790\u6700\u4f18 lambda \u503c\u4ea7\u751f\u7684\u6700\u7ec8\u6a21\u578b\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u4ee3\u7801\u6765\u83b7\u5f97\u8be5\u6a21\u578b\u7684\u7cfb\u6570\u4f30\u8ba1\uff1a<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <span style=\"color: #000000;\"><strong><span style=\"color: #008080;\">#find coefficients of best model\n<\/span>best_model &lt;- glmnet(x, y, alpha = <span style=\"color: #008000;\">0<\/span> , lambda = best_lambda)\ncoef(best_model)\n\n5 x 1 sparse Matrix of class \"dgCMatrix\"\n                    s0\n(Intercept) 475.242646\nmpg -3.299732\nwt 19.431238\ndrat -1.222429\nqsec -17.949721<\/strong><\/span><\/pre>\n<p><span style=\"color: #000000;\">\u6211\u4eec\u8fd8\u53ef\u4ee5\u751f\u6210\u8ddf\u8e2a\u56fe\u6765\u53ef\u89c6\u5316\u7cfb\u6570\u4f30\u8ba1\u503c\u5982\u4f55\u56e0 lambda \u7684\u589e\u52a0\u800c\u53d8\u5316\uff1a<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <span style=\"color: #000000;\"><strong><span style=\"color: #008080;\">#produce Ridge trace plot<\/span>\nplot(model, xvar = \" <span style=\"color: #008000;\">lambda<\/span> \")<\/strong><\/span> <\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-11861 \" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/creter2.png\" alt=\"R \u4e2d\u7684\u5cad\u8ff9\" width=\"419\" height=\"411\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p><span style=\"color: #000000;\">\u6700\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u5728\u8bad\u7ec3\u6570\u636e\u4e0a\u8ba1\u7b97<a href=\"https:\/\/statorials.org\/cn\/\u826f\u597d\u7684-r-\u5e73\u65b9\u503c\/\" target=\"_blank\" rel=\"noopener noreferrer\">\u6a21\u578b\u7684 R \u5e73\u65b9<\/a>\uff1a<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <span style=\"color: #000000;\"><strong><span style=\"color: #008080;\">#use fitted best model to make predictions\n<\/span>y_predicted &lt;- <span style=\"color: #3366ff;\">predict<\/span> (model, s = best_lambda, newx = x)\n\n<span style=\"color: #008080;\">#find OHS and SSE<\/span>\nsst &lt;- <span style=\"color: #3366ff;\">sum<\/span> ((y - <span style=\"color: #3366ff;\">mean<\/span> (y))^2)\nsse &lt;- <span style=\"color: #3366ff;\">sum<\/span> ((y_predicted - y)^2)\n\n<span style=\"color: #008080;\">#find R-Squared\n<\/span>rsq &lt;- 1 - sse\/sst\nrsq\n\n[1] 0.7999513\n<\/strong><\/span><\/pre>\n<p> <span style=\"color: #000000;\">R \u5e73\u65b9\u7ed3\u679c\u4e3a<strong>0.7999513<\/strong> \u3002\u4e5f\u5c31\u662f\u8bf4\uff0c\u6700\u597d\u7684\u6a21\u578b\u80fd\u591f\u89e3\u91ca\u8bad\u7ec3\u6570\u636e\u54cd\u5e94\u503c\u7684<strong>79.99%<\/strong>\u7684\u53d8\u5316\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u60a8\u53ef\u4ee5<a href=\"https:\/\/github.com\/Statorials\/R-Guides\/blob\/main\/ridge_regression.R\" target=\"_blank\" rel=\"noopener noreferrer\">\u5728\u6b64\u5904<\/a>\u627e\u5230\u672c\u793a\u4f8b\u4e2d\u4f7f\u7528\u7684\u5b8c\u6574 R \u4ee3\u7801\u3002<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5cad\u56de\u5f52\u662f\u5f53\u6570\u636e\u4e2d\u5b58\u5728\u591a\u91cd\u5171\u7ebf\u6027\u65f6\u6211\u4eec\u53ef\u4ee5\u7528\u6765\u62df\u5408\u56de\u5f52\u6a21\u578b\u7684\u65b9\u6cd5\u3002 \u7b80\u800c\u8a00\u4e4b\uff0c\u6700\u5c0f\u4e8c\u4e58\u56de\u5f52\u8bd5\u56fe\u627e\u5230\u6700\u5c0f\u5316\u6b8b\u5dee\u5e73\u65b9 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-1195","post","type-post","status-publish","format-standard","hentry","category-11"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>R \u4e2d\u7684\u5cad\u56de\u5f52\uff08\u9010\u6b65\uff09<\/title>\n<meta name=\"description\" content=\"\u672c\u6559\u7a0b\u4ecb\u7ecd\u5982\u4f55\u5728 R \u4e2d\u6267\u884c\u5cad\u56de\u5f52\uff0c\u5305\u62ec\u5206\u6b65\u793a\u4f8b\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/statorials.org\/cn\/r\u4e2d\u7684\u6ce2\u5cf0\u56de\u5f52\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"R \u4e2d\u7684\u5cad\u56de\u5f52\uff08\u9010\u6b65\uff09\" \/>\n<meta property=\"og:description\" content=\"\u672c\u6559\u7a0b\u4ecb\u7ecd\u5982\u4f55\u5728 R \u4e2d\u6267\u884c\u5cad\u56de\u5f52\uff0c\u5305\u62ec\u5206\u6b65\u793a\u4f8b\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/statorials.org\/cn\/r\u4e2d\u7684\u6ce2\u5cf0\u56de\u5f52\/\" \/>\n<meta property=\"og:site_name\" content=\"Statorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-27T08:19:55+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/faiter1.png\" \/>\n<meta name=\"author\" content=\"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/statorials.org\/cn\/r%e4%b8%ad%e7%9a%84%e6%b3%a2%e5%b3%b0%e5%9b%9e%e5%bd%92\/\",\"url\":\"https:\/\/statorials.org\/cn\/r%e4%b8%ad%e7%9a%84%e6%b3%a2%e5%b3%b0%e5%9b%9e%e5%bd%92\/\",\"name\":\"R \u4e2d\u7684\u5cad\u56de\u5f52\uff08\u9010\u6b65\uff09\",\"isPartOf\":{\"@id\":\"https:\/\/statorials.org\/cn\/#website\"},\"datePublished\":\"2023-07-27T08:19:55+00:00\",\"dateModified\":\"2023-07-27T08:19:55+00:00\",\"author\":{\"@id\":\"https:\/\/statorials.org\/cn\/#\/schema\/person\/124e4e5b7c9f8dc0f1f95cc8c1db3261\"},\"description\":\"\u672c\u6559\u7a0b\u4ecb\u7ecd\u5982\u4f55\u5728 R \u4e2d\u6267\u884c\u5cad\u56de\u5f52\uff0c\u5305\u62ec\u5206\u6b65\u793a\u4f8b\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/statorials.org\/cn\/r%e4%b8%ad%e7%9a%84%e6%b3%a2%e5%b3%b0%e5%9b%9e%e5%bd%92\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/statorials.org\/cn\/r%e4%b8%ad%e7%9a%84%e6%b3%a2%e5%b3%b0%e5%9b%9e%e5%bd%92\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/statorials.org\/cn\/r%e4%b8%ad%e7%9a%84%e6%b3%a2%e5%b3%b0%e5%9b%9e%e5%bd%92\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u5bb6\",\"item\":\"https:\/\/statorials.org\/cn\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"R\u4e2d\u7684\u5cad\u56de\u5f52\uff08\u4e00\u6b65\u4e00\u6b65\uff09\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/statorials.org\/cn\/#website\",\"url\":\"https:\/\/statorials.org\/cn\/\",\"name\":\"Statorials\",\"description\":\"\u60a8\u7684\u7edf\u8ba1\u7d20\u517b\u6307\u5357\uff01\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/statorials.org\/cn\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/statorials.org\/cn\/#\/schema\/person\/124e4e5b7c9f8dc0f1f95cc8c1db3261\",\"name\":\"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/statorials.org\/cn\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/statorials.org\/cn\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg\",\"contentUrl\":\"https:\/\/statorials.org\/cn\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg\",\"caption\":\"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a\"},\"description\":\"\u5927\u5bb6\u597d\uff0c\u6211\u662f\u672c\u6770\u660e\uff0c\u4e00\u4f4d\u9000\u4f11\u7684\u7edf\u8ba1\u5b66\u6559\u6388\uff0c\u540e\u6765\u6210\u4e3a Statorials \u7684\u70ed\u5fc3\u6559\u5e08\u3002 \u51ed\u501f\u5728\u7edf\u8ba1\u9886\u57df\u7684\u4e30\u5bcc\u7ecf\u9a8c\u548c\u4e13\u4e1a\u77e5\u8bc6\uff0c\u6211\u6e34\u671b\u5206\u4eab\u6211\u7684\u77e5\u8bc6\uff0c\u901a\u8fc7 Statorials \u589e\u5f3a\u5b66\u751f\u7684\u80fd\u529b\u3002\u4e86\u89e3\u66f4\u591a\",\"sameAs\":[\"https:\/\/statorials.org\/cn\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"R \u4e2d\u7684\u5cad\u56de\u5f52\uff08\u9010\u6b65\uff09","description":"\u672c\u6559\u7a0b\u4ecb\u7ecd\u5982\u4f55\u5728 R \u4e2d\u6267\u884c\u5cad\u56de\u5f52\uff0c\u5305\u62ec\u5206\u6b65\u793a\u4f8b\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/statorials.org\/cn\/r\u4e2d\u7684\u6ce2\u5cf0\u56de\u5f52\/","og_locale":"zh_CN","og_type":"article","og_title":"R \u4e2d\u7684\u5cad\u56de\u5f52\uff08\u9010\u6b65\uff09","og_description":"\u672c\u6559\u7a0b\u4ecb\u7ecd\u5982\u4f55\u5728 R \u4e2d\u6267\u884c\u5cad\u56de\u5f52\uff0c\u5305\u62ec\u5206\u6b65\u793a\u4f8b\u3002","og_url":"https:\/\/statorials.org\/cn\/r\u4e2d\u7684\u6ce2\u5cf0\u56de\u5f52\/","og_site_name":"Statorials","article_published_time":"2023-07-27T08:19:55+00:00","og_image":[{"url":"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/faiter1.png"}],"author":"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/statorials.org\/cn\/r%e4%b8%ad%e7%9a%84%e6%b3%a2%e5%b3%b0%e5%9b%9e%e5%bd%92\/","url":"https:\/\/statorials.org\/cn\/r%e4%b8%ad%e7%9a%84%e6%b3%a2%e5%b3%b0%e5%9b%9e%e5%bd%92\/","name":"R \u4e2d\u7684\u5cad\u56de\u5f52\uff08\u9010\u6b65\uff09","isPartOf":{"@id":"https:\/\/statorials.org\/cn\/#website"},"datePublished":"2023-07-27T08:19:55+00:00","dateModified":"2023-07-27T08:19:55+00:00","author":{"@id":"https:\/\/statorials.org\/cn\/#\/schema\/person\/124e4e5b7c9f8dc0f1f95cc8c1db3261"},"description":"\u672c\u6559\u7a0b\u4ecb\u7ecd\u5982\u4f55\u5728 R \u4e2d\u6267\u884c\u5cad\u56de\u5f52\uff0c\u5305\u62ec\u5206\u6b65\u793a\u4f8b\u3002","breadcrumb":{"@id":"https:\/\/statorials.org\/cn\/r%e4%b8%ad%e7%9a%84%e6%b3%a2%e5%b3%b0%e5%9b%9e%e5%bd%92\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/statorials.org\/cn\/r%e4%b8%ad%e7%9a%84%e6%b3%a2%e5%b3%b0%e5%9b%9e%e5%bd%92\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/statorials.org\/cn\/r%e4%b8%ad%e7%9a%84%e6%b3%a2%e5%b3%b0%e5%9b%9e%e5%bd%92\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u5bb6","item":"https:\/\/statorials.org\/cn\/"},{"@type":"ListItem","position":2,"name":"R\u4e2d\u7684\u5cad\u56de\u5f52\uff08\u4e00\u6b65\u4e00\u6b65\uff09"}]},{"@type":"WebSite","@id":"https:\/\/statorials.org\/cn\/#website","url":"https:\/\/statorials.org\/cn\/","name":"Statorials","description":"\u60a8\u7684\u7edf\u8ba1\u7d20\u517b\u6307\u5357\uff01","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/statorials.org\/cn\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/statorials.org\/cn\/#\/schema\/person\/124e4e5b7c9f8dc0f1f95cc8c1db3261","name":"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/statorials.org\/cn\/#\/schema\/person\/image\/","url":"https:\/\/statorials.org\/cn\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg","contentUrl":"https:\/\/statorials.org\/cn\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg","caption":"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a"},"description":"\u5927\u5bb6\u597d\uff0c\u6211\u662f\u672c\u6770\u660e\uff0c\u4e00\u4f4d\u9000\u4f11\u7684\u7edf\u8ba1\u5b66\u6559\u6388\uff0c\u540e\u6765\u6210\u4e3a Statorials \u7684\u70ed\u5fc3\u6559\u5e08\u3002 \u51ed\u501f\u5728\u7edf\u8ba1\u9886\u57df\u7684\u4e30\u5bcc\u7ecf\u9a8c\u548c\u4e13\u4e1a\u77e5\u8bc6\uff0c\u6211\u6e34\u671b\u5206\u4eab\u6211\u7684\u77e5\u8bc6\uff0c\u901a\u8fc7 Statorials \u589e\u5f3a\u5b66\u751f\u7684\u80fd\u529b\u3002\u4e86\u89e3\u66f4\u591a","sameAs":["https:\/\/statorials.org\/cn"]}]}},"yoast_meta":{"yoast_wpseo_title":"","yoast_wpseo_metadesc":"","yoast_wpseo_canonical":""},"_links":{"self":[{"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/posts\/1195","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/comments?post=1195"}],"version-history":[{"count":0,"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/posts\/1195\/revisions"}],"wp:attachment":[{"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/media?parent=1195"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/categories?post=1195"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/tags?post=1195"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}