{"id":2430,"date":"2023-07-22T07:47:44","date_gmt":"2023-07-22T07:47:44","guid":{"rendered":"https:\/\/statorials.org\/cn\/%e8%a7%a3%e9%87%8a-r-%e4%b8%ad%e7%9a%84-glm-%e8%be%93%e5%87%ba\/"},"modified":"2023-07-22T07:47:44","modified_gmt":"2023-07-22T07:47:44","slug":"%e8%a7%a3%e9%87%8a-r-%e4%b8%ad%e7%9a%84-glm-%e8%be%93%e5%87%ba","status":"publish","type":"post","link":"https:\/\/statorials.org\/cn\/%e8%a7%a3%e9%87%8a-r-%e4%b8%ad%e7%9a%84-glm-%e8%be%93%e5%87%ba\/","title":{"rendered":"\u5982\u4f55\u89e3\u91ca r \u4e2d\u7684 glm \u8f93\u51fa\uff08\u5e26\u6709\u793a\u4f8b\uff09"},"content":{"rendered":"<p><\/p>\n<hr>\n<p><span style=\"color: #000000;\">R \u4e2d\u7684<strong>glm()<\/strong>\u51fd\u6570\u53ef\u7528\u4e8e\u62df\u5408\u5e7f\u4e49\u7ebf\u6027\u6a21\u578b\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u8be5\u51fd\u6570\u4f7f\u7528\u4ee5\u4e0b\u8bed\u6cd5\uff1a<\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong>glm\uff08\u516c\u5f0f\uff0c\u65cf=\u9ad8\u65af\uff0c\u6570\u636e\uff0c&#8230;\uff09<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">\u91d1\u5b50\uff1a<\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\"><strong>Formula\uff1a<\/strong>\u7ebf\u6027\u6a21\u578b\u516c\u5f0f\uff08\u4f8b\u5982y ~ x1 + x2\uff09<\/span><\/li>\n<li> <span style=\"color: #000000;\"><strong>family\uff1a<\/strong>\u7528\u4e8e\u62df\u5408\u6a21\u578b\u7684\u7edf\u8ba1\u65cf\u3002\u9ed8\u8ba4\u4e3a\u9ad8\u65af\uff0c\u4f46\u5176\u4ed6\u9009\u9879\u5305\u62ec\u4e8c\u9879\u5f0f\u3001\u4f3d\u739b\u548c\u6cca\u677e\u7b49\u3002<\/span><\/li>\n<li> <span style=\"color: #000000;\"><strong>data\uff1a<\/strong>\u5305\u542b\u6570\u636e\u7684\u6570\u636e\u5757\u7684\u540d\u79f0<\/span><\/li>\n<\/ul>\n<p><span style=\"color: #000000;\">\u5728\u5b9e\u8df5\u4e2d\uff0c\u8be5\u51fd\u6570\u6700\u5e38\u7528\u4e8e\u901a\u8fc7\u6307\u5b9a\u201c\u4e8c\u9879\u5f0f\u201d\u65cf\u6765\u62df\u5408<a href=\"https:\/\/statorials.org\/cn\/\u903b\u8f91\u56de\u5f521\/\" target=\"_blank\" rel=\"noopener\">\u903b\u8f91\u56de\u5f52\u6a21\u578b<\/a>\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u4ee5\u4e0b\u793a\u4f8b\u6f14\u793a\u5982\u4f55\u89e3\u91ca R \u4e2d\u903b\u8f91\u56de\u5f52\u6a21\u578b\u7684 glm \u8f93\u51fa\u3002<\/span><\/p>\n<h2><span style=\"color: #000000;\"><strong>\u793a\u4f8b\uff1a\u5982\u4f55\u89e3\u91ca R \u4e2d\u7684 glm \u8f93\u51fa<\/strong><\/span><\/h2>\n<p><span style=\"color: #000000;\">\u5bf9\u4e8e\u6b64\u793a\u4f8b\uff0c\u6211\u4eec\u5c06\u4f7f\u7528 R \u4e2d\u5185\u7f6e\u7684<a href=\"https:\/\/statorials.org\/cn\/mtcars-r-\u6570\u636e\u96c6\/\" target=\"_blank\" rel=\"noopener\">mtcars<\/a>\u6570\u636e\u96c6\uff1a<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#view first six rows of <em>mtcars<\/em> dataset\n<\/span>head(mtcars)\n\n                   mpg cyl disp hp drat wt qsec vs am gear carb\nMazda RX4 21.0 6 160 110 3.90 2.620 16.46 0 1 4 4\nMazda RX4 Wag 21.0 6 160 110 3.90 2.875 17.02 0 1 4 4\nDatsun 710 22.8 4 108 93 3.85 2.320 18.61 1 1 4 1\nHornet 4 Drive 21.4 6 258 110 3.08 3.215 19.44 1 0 3 1\nHornet Sportabout 18.7 8 360 175 3.15 3.440 17.02 0 0 3 2\nValiant 18.1 6 225 105 2.76 3,460 20.22 1 0 3 1\n<\/strong><\/pre>\n<p><span style=\"color: #000000;\">\u6211\u4eec\u5c06\u4f7f\u7528\u53d8\u91cf<strong>disp<\/strong>\u548c<strong>hp<\/strong>\u6765\u9884\u6d4b\u7ed9\u5b9a\u6c7d\u8f66\u7684\u53d8\u91cf<strong>am<\/strong>\u53d6\u503c\u4e3a 1 \u7684\u6982\u7387\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u4ee5\u4e0b\u4ee3\u7801\u5c55\u793a\u4e86\u5982\u4f55\u4f7f\u7528<strong>glm()<\/strong>\u51fd\u6570\u6765\u62df\u5408\u6b64\u903b\u8f91\u56de\u5f52\u6a21\u578b\uff1a<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#fit logistic regression model\n<\/span>model &lt;- glm(am ~ disp + hp, data=mtcars, family=binomial)\n\n<span style=\"color: #008080;\">#view model summary\n<\/span>summary(model)\n\nCall:\nglm(formula = am ~ disp + hp, family = binomial, data = mtcars)\n\nDeviance Residuals: \n    Min 1Q Median 3Q Max  \n-1.9665 -0.3090 -0.0017 0.3934 1.3682  \n\nCoefficients:\n            Estimate Std. Error z value Pr(&gt;|z|)  \n(Intercept) 1.40342 1.36757 1.026 0.3048  \navailable -0.09518 0.04800 -1.983 0.0474 *\nhp 0.12170 0.06777 1.796 0.0725 .\n---\nSignificant. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1\n\n(Dispersion parameter for binomial family taken to be 1)\n\n    Null deviance: 43,230 on 31 degrees of freedom\nResidual deviance: 16,713 on 29 degrees of freedom\nAIC: 22,713\n\nNumber of Fisher Scoring iterations: 8\n<\/strong><\/pre>\n<p><span style=\"color: #000000;\">\u4ee5\u4e0b\u662f\u5982\u4f55\u89e3\u91ca\u7ed3\u679c\u7684\u6bcf\u4e2a\u5143\u7d20\uff1a<\/span><\/p>\n<h3><span style=\"color: #000000;\"><strong>\u7cfb\u6570\u548c P \u503c<\/strong><\/span><\/h3>\n<p><span style=\"color: #000000;\">\u7ed3\u679c\u4e2d\u7684<strong>\u7cfb\u6570\u4f30\u8ba1\u503c<\/strong>\u8868\u793a\u4e0e\u6bcf\u4e2a\u9884\u6d4b\u53d8\u91cf\u589e\u52a0\u4e00\u4e2a\u5355\u4f4d\u76f8\u5173\u7684\u54cd\u5e94\u53d8\u91cf\u5bf9\u6570\u4f3c\u7136\u7684\u5e73\u5747\u53d8\u5316\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u4f8b\u5982\uff0c\u9884\u6d4b\u53d8\u91cf disp \u589e\u52a0\u4e00\u4e2a\u5355\u4f4d\u4e0e\u54cd\u5e94\u53d8\u91cf\u53d6\u503c 1 \u7684\u5bf9\u6570\u4f3c\u7136 -0.09518 \u7684\u5e73\u5747\u53d8\u5316\u76f8\u5173\u3002\u8fd9\u610f\u5473\u7740 disp \u503c\u8d8a\u9ad8\uff0c\u6982\u7387\u8d8a\u4f4e\u3002\u53d8\u91cf\u7684\u503c\u4e3a 1\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\"><strong>\u6807\u51c6\u8bef\u5dee<\/strong>\u8ba9\u6211\u4eec\u4e86\u89e3\u4e0e\u7cfb\u6570\u4f30\u8ba1\u76f8\u5173\u7684\u53d8\u5f02\u6027\u3002\u7136\u540e\uff0c\u6211\u4eec\u5c06\u7cfb\u6570\u4f30\u8ba1\u503c\u9664\u4ee5\u6807\u51c6\u8bef\u5dee\u4ee5\u83b7\u5f97 az \u503c\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u4f8b\u5982\uff0c\u9884\u6d4b\u53d8\u91cf disp \u7684<strong>z \u503c<\/strong>\u8ba1\u7b97\u4e3a -.09518 \/ .048 = -1.983\u3002<\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong>p \u503c<\/strong>Pr(&gt;|z|) \u544a\u8bc9\u6211\u4eec\u4e0e\u7279\u5b9a z \u503c\u76f8\u5173\u7684\u6982\u7387\u3002\u8fd9\u672c\u8d28\u4e0a\u544a\u8bc9\u6211\u4eec\u6bcf\u4e2a\u9884\u6d4b\u53d8\u91cf\u80fd\u591f\u9884\u6d4b\u6a21\u578b\u4e2d\u54cd\u5e94\u53d8\u91cf\u7684\u503c\u7684\u7a0b\u5ea6\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u4f8b\u5982\uff0c\u4e0e\u53d8\u91cf disp \u7684 z \u503c\u5173\u8054\u7684 p \u503c\u4e3a 0.0474\u3002\u7531\u4e8e\u8be5\u503c\u5c0f\u4e8e 0.05\uff0c\u56e0\u6b64\u6211\u4eec\u53ef\u4ee5\u8bf4 disp \u662f\u6a21\u578b\u4e2d\u5177\u6709\u7edf\u8ba1\u663e\u7740\u6027\u7684\u9884\u6d4b\u53d8\u91cf\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u6839\u636e\u60a8\u7684\u504f\u597d\uff0c\u60a8\u53ef\u4ee5\u51b3\u5b9a\u4f7f\u7528\u663e\u7740\u6027\u6c34\u5e73 0.01\u30010.05 \u6216 0.10 \u6765\u786e\u5b9a\u6bcf\u4e2a\u9884\u6d4b\u53d8\u91cf\u662f\u5426\u5177\u6709\u7edf\u8ba1\u663e\u7740\u6027\u3002<\/span><\/p>\n<h3><span style=\"color: #000000;\"><strong>\u96f6\u504f\u5dee\u548c\u6b8b\u4f59\u504f\u5dee<\/strong><\/span><\/h3>\n<p><span style=\"color: #000000;\">\u8f93\u51fa\u4e2d\u7684<strong>\u96f6\u504f\u5dee<\/strong>\u544a\u8bc9\u6211\u4eec\u4ec5\u5177\u6709\u539f\u59cb\u9879\u7684\u6a21\u578b\u53ef\u4ee5\u5982\u4f55\u5f88\u597d\u5730\u9884\u6d4b\u54cd\u5e94\u53d8\u91cf\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\"><strong>\u6b8b\u5dee\u504f\u5dee<\/strong>\u544a\u8bc9\u6211\u4eec\u7528<em>p \u4e2a<\/em>\u9884\u6d4b\u53d8\u91cf\u62df\u5408\u7684\u7279\u5b9a\u6a21\u578b\u53ef\u4ee5\u9884\u6d4b\u54cd\u5e94\u53d8\u91cf\u7684\u6548\u679c\u5982\u4f55\u3002\u503c\u8d8a\u4f4e\uff0c\u6a21\u578b\u9884\u6d4b\u54cd\u5e94\u53d8\u91cf\u503c\u7684\u80fd\u529b\u5c31\u8d8a\u597d\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u4e3a\u4e86\u786e\u5b9a\u6a21\u578b\u662f\u5426\u201c\u6709\u7528\u201d\uff0c\u6211\u4eec\u53ef\u4ee5\u8ba1\u7b97\u5361\u65b9\u7edf\u8ba1\u91cf\uff0c\u5982\u4e0b\u6240\u793a\uff1a<\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong>X <sup>2<\/sup><\/strong> = \u96f6\u504f\u5dee \u2013 \u6b8b\u4f59\u504f\u5dee<\/span><\/p>\n<p><span style=\"color: #000000;\">\u5177\u6709<em>p \u4e2a<\/em>\u81ea\u7531\u5ea6\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u7136\u540e\u6211\u4eec\u53ef\u4ee5\u627e\u5230\u4e0e\u8be5\u5361\u65b9\u7edf\u8ba1\u91cf\u76f8\u5173\u7684 p \u503c\u3002\u4e0e\u4ec5\u5305\u542b\u539f\u59cb\u9879\u7684\u6a21\u578b\u76f8\u6bd4\uff0cp \u503c\u8d8a\u4f4e\uff0c\u6a21\u578b\u5c31\u8d8a\u80fd\u62df\u5408\u6570\u636e\u96c6\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u4f8b\u5982\uff0c\u5728\u6211\u4eec\u7684\u56de\u5f52\u6a21\u578b\u4e2d\uff0c\u6211\u4eec\u53ef\u4ee5\u5728\u8f93\u51fa\u4e2d\u89c2\u5bdf\u5230\u4ee5\u4e0b\u96f6\u504f\u5dee\u548c\u6b8b\u5dee\u503c\uff1a<\/span><\/p>\n<ul>\n<li><span style=\"color: #000000;\"><strong>\u96f6\u504f\u5dee<\/strong>\uff1a43.23\uff0cdf = 31<\/span><\/li>\n<li><span style=\"color: #000000;\"><strong>\u6b8b\u4f59\u504f\u5dee<\/strong>\uff1a16.713\uff0cdf = 29<\/span><\/li>\n<\/ul>\n<p><span style=\"color: #000000;\">\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u8fd9\u4e9b\u503c\u6765\u8ba1\u7b97\u6a21\u578b\u7684 X <sup>2<\/sup>\u7edf\u8ba1\u91cf\uff1a<\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\">X <sup>2<\/sup> = \u96f6\u504f\u5dee \u2013 \u6b8b\u4f59\u504f\u5dee<\/span><\/li>\n<li><span style=\"color: #000000;\"><sup>X2<\/sup> = 43.23 \u2013 16.713<\/span><\/li>\n<li> <span style=\"color: #000000;\"><sup>X2<\/sup> = 26,517<\/span><\/li>\n<\/ul>\n<p><span style=\"color: #000000;\">\u9884\u6d4b\u53d8\u91cf\u6709<em>p<\/em> = 2 \u4e2a\u81ea\u7531\u5ea6\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528<a href=\"https:\/\/statorials.org\/cn\/\u5361\u65b9-p-\u503c\u8ba1\u7b97\u5668\/\" target=\"_blank\" rel=\"noopener\">\u5361\u65b9\u5230 P \u503c\u8ba1\u7b97\u5668<\/a>\u53d1\u73b0\u5177\u6709 2 \u4e2a\u81ea\u7531\u5ea6\u7684 X <sup>2<\/sup>\u503c 26.517 \u7684 p \u503c\u4e3a 0.000002\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u7531\u4e8e\u8be5 p \u503c\u8fdc\u4f4e\u4e8e 0.05\uff0c\u56e0\u6b64\u6211\u4eec\u53ef\u4ee5\u5f97\u51fa\u7ed3\u8bba\uff0c\u8be5\u6a21\u578b\u975e\u5e38\u6709\u7528\u3002<\/span><\/p>\n<h3><span style=\"color: #000000;\"><strong>\u822a\u7a7a\u5de5\u4e1a\u534f\u4f1a<\/strong><\/span><\/h3>\n<p><span style=\"color: #000000;\">\u8d64\u6c60\u4fe1\u606f\u51c6\u5219 ( <strong>AIC<\/strong> ) \u662f\u4e00\u79cd\u7528\u4e8e\u6bd4\u8f83\u4e0d\u540c\u56de\u5f52\u6a21\u578b\u62df\u5408\u7a0b\u5ea6\u7684\u5ea6\u91cf\u3002\u503c\u8d8a\u4f4e\uff0c\u56de\u5f52\u6a21\u578b\u5bf9\u6570\u636e\u7684\u62df\u5408\u6548\u679c\u8d8a\u597d\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u8ba1\u7b97\u65b9\u6cd5\u5982\u4e0b\uff1a<\/span><\/p>\n<p> <span style=\"color: #000000;\">AIC = 2K \u2013 2 <em>ln<\/em> (L)<\/span><\/p>\n<p><span style=\"color: #000000;\">\u91d1\u5b50\uff1a<\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\"><strong>K\uff1a<\/strong>\u6a21\u578b\u53c2\u6570\u7684\u6570\u91cf\u3002<\/span><\/li>\n<li> <span style=\"color: #000000;\"><strong><em>ln<\/em> (L)<\/strong> \uff1a\u6a21\u578b\u7684\u5bf9\u6570\u4f3c\u7136\u3002\u8fd9\u544a\u8bc9\u6211\u4eec\u6a21\u578b\u57fa\u4e8e\u6570\u636e\u7684\u53ef\u80fd\u6027\u6709\u591a\u5927\u3002<\/span><\/li>\n<\/ul>\n<p> <span style=\"color: #000000;\">AIC\u7684\u5b9e\u9645\u4ef7\u503c\u6ca1\u6709\u610f\u4e49\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u4f46\u662f\uff0c\u5982\u679c\u62df\u5408\u591a\u4e2a\u56de\u5f52\u6a21\u578b\uff0c\u5219\u53ef\u4ee5\u6bd4\u8f83\u6bcf\u4e2a\u6a21\u578b\u7684 AIC \u503c\u3002 AIC \u6700\u4f4e\u7684\u6a21\u578b\u63d0\u4f9b\u6700\u4f73\u62df\u5408\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\"><strong>\u76f8\u5173\uff1a<\/strong><\/span><a href=\"https:\/\/statorials.org\/cn\" target=\"_blank\" rel=\"noopener\">\u4ec0\u4e48\u662f\u597d\u7684 AIC \u503c\uff1f<\/a><\/p>\n<h3><span style=\"color: #000000;\"><strong>\u5176\u4ed6\u8d44\u6e90<\/strong><\/span><\/h3>\n<p><span style=\"color: #000000;\">\u4ee5\u4e0b\u6559\u7a0b\u63d0\u4f9b\u4e86\u6709\u5173\u5982\u4f55\u5728 R \u4e2d\u4f7f\u7528<strong>glm()<\/strong>\u51fd\u6570\u7684\u66f4\u591a\u4fe1\u606f\uff1a<\/span><\/p>\n<p> <a href=\"https:\/\/statorials.org\/cn\/r-\u4e2d\u7684-glm-\u4e0e-lm\/\" target=\"_blank\" rel=\"noopener\">R\u4e2dglm\u548clm\u7684\u533a\u522b<\/a><br \/><a href=\"https:\/\/statorials.org\/cn\/r-glm-\u9884\u6d4b\/\" target=\"_blank\" rel=\"noopener\">\u5982\u4f55\u5728 R \u4e2d\u4f7f\u7528 glm \u7684\u9884\u6d4b\u51fd\u6570<\/a><\/p>\n<p><span style=\"color: #000000;\">\u4ee5\u4e0b\u6559\u7a0b\u89e3\u91ca\u4e86\u5982\u4f55\u5904\u7406\u4f7f\u7528<strong>glm()<\/strong>\u51fd\u6570\u65f6\u7684\u5e38\u89c1\u9519\u8bef\uff1a<\/span><\/p>\n<p><a href=\"https:\/\/statorials.org\/cn\/glm\u62df\u5408\u7b97\u6cd5\u6ca1\u6709\u6536\u655b\/\" target=\"_blank\" rel=\"noopener\">\u5982\u4f55\u5904\u7406 R \u8b66\u544a\uff1aglm.fit\uff1a\u7b97\u6cd5\u672a\u6536\u655b<\/a><br \/><a href=\"https:\/\/statorials.org\/cn\/glm-fit-\u62df\u5408\u51fa\u73b0\u6570\u5b57-0-\u6216-1-\u7684\u6982\u7387\/\" target=\"_blank\" rel=\"noopener\">\u5982\u4f55\u5904\u7406\uff1aglm.fit\uff1a\u6570\u503c\u8c03\u6574\u6982\u7387\u4e3a0\u62161\u53d1\u751f<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>R \u4e2d\u7684glm()\u51fd\u6570\u53ef\u7528\u4e8e\u62df\u5408\u5e7f\u4e49\u7ebf\u6027\u6a21\u578b\u3002 \u8be5\u51fd\u6570\u4f7f\u7528\u4ee5\u4e0b\u8bed\u6cd5\uff1a glm\uff08\u516c\u5f0f\uff0c\u65cf=\u9ad8\u65af\uff0c\u6570\u636e\uff0c&#038;#823 [&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-2430","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>\u5982\u4f55\u89e3\u91ca R \u4e2d\u7684 glm \u8f93\u51fa\uff08\u5e26\u6709\u793a\u4f8b\uff09 - Statorials<\/title>\n<meta name=\"description\" content=\"\u672c\u6559\u7a0b\u89e3\u91ca\u5982\u4f55\u5728 R \u4e2d\u89e3\u91ca glm \u8f93\u51fa\uff0c\u5305\u62ec\u4e00\u4e2a\u5b8c\u6574\u7684\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\/\u89e3\u91ca-r-\u4e2d\u7684-glm-\u8f93\u51fa\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5982\u4f55\u89e3\u91ca R \u4e2d\u7684 glm \u8f93\u51fa\uff08\u5e26\u6709\u793a\u4f8b\uff09 - Statorials\" \/>\n<meta property=\"og:description\" content=\"\u672c\u6559\u7a0b\u89e3\u91ca\u5982\u4f55\u5728 R \u4e2d\u89e3\u91ca glm \u8f93\u51fa\uff0c\u5305\u62ec\u4e00\u4e2a\u5b8c\u6574\u7684\u793a\u4f8b\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/statorials.org\/cn\/\u89e3\u91ca-r-\u4e2d\u7684-glm-\u8f93\u51fa\/\" \/>\n<meta property=\"og:site_name\" content=\"Statorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-22T07:47:44+00:00\" \/>\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\/%e8%a7%a3%e9%87%8a-r-%e4%b8%ad%e7%9a%84-glm-%e8%be%93%e5%87%ba\/\",\"url\":\"https:\/\/statorials.org\/cn\/%e8%a7%a3%e9%87%8a-r-%e4%b8%ad%e7%9a%84-glm-%e8%be%93%e5%87%ba\/\",\"name\":\"\u5982\u4f55\u89e3\u91ca R \u4e2d\u7684 glm \u8f93\u51fa\uff08\u5e26\u6709\u793a\u4f8b\uff09 - Statorials\",\"isPartOf\":{\"@id\":\"https:\/\/statorials.org\/cn\/#website\"},\"datePublished\":\"2023-07-22T07:47:44+00:00\",\"dateModified\":\"2023-07-22T07:47:44+00:00\",\"author\":{\"@id\":\"https:\/\/statorials.org\/cn\/#\/schema\/person\/124e4e5b7c9f8dc0f1f95cc8c1db3261\"},\"description\":\"\u672c\u6559\u7a0b\u89e3\u91ca\u5982\u4f55\u5728 R \u4e2d\u89e3\u91ca glm \u8f93\u51fa\uff0c\u5305\u62ec\u4e00\u4e2a\u5b8c\u6574\u7684\u793a\u4f8b\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/statorials.org\/cn\/%e8%a7%a3%e9%87%8a-r-%e4%b8%ad%e7%9a%84-glm-%e8%be%93%e5%87%ba\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/statorials.org\/cn\/%e8%a7%a3%e9%87%8a-r-%e4%b8%ad%e7%9a%84-glm-%e8%be%93%e5%87%ba\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/statorials.org\/cn\/%e8%a7%a3%e9%87%8a-r-%e4%b8%ad%e7%9a%84-glm-%e8%be%93%e5%87%ba\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u5bb6\",\"item\":\"https:\/\/statorials.org\/cn\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5982\u4f55\u89e3\u91ca r \u4e2d\u7684 glm \u8f93\u51fa\uff08\u5e26\u6709\u793a\u4f8b\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":"\u5982\u4f55\u89e3\u91ca R \u4e2d\u7684 glm \u8f93\u51fa\uff08\u5e26\u6709\u793a\u4f8b\uff09 - Statorials","description":"\u672c\u6559\u7a0b\u89e3\u91ca\u5982\u4f55\u5728 R \u4e2d\u89e3\u91ca glm \u8f93\u51fa\uff0c\u5305\u62ec\u4e00\u4e2a\u5b8c\u6574\u7684\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\/\u89e3\u91ca-r-\u4e2d\u7684-glm-\u8f93\u51fa\/","og_locale":"zh_CN","og_type":"article","og_title":"\u5982\u4f55\u89e3\u91ca R \u4e2d\u7684 glm \u8f93\u51fa\uff08\u5e26\u6709\u793a\u4f8b\uff09 - Statorials","og_description":"\u672c\u6559\u7a0b\u89e3\u91ca\u5982\u4f55\u5728 R \u4e2d\u89e3\u91ca glm \u8f93\u51fa\uff0c\u5305\u62ec\u4e00\u4e2a\u5b8c\u6574\u7684\u793a\u4f8b\u3002","og_url":"https:\/\/statorials.org\/cn\/\u89e3\u91ca-r-\u4e2d\u7684-glm-\u8f93\u51fa\/","og_site_name":"Statorials","article_published_time":"2023-07-22T07:47:44+00:00","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\/%e8%a7%a3%e9%87%8a-r-%e4%b8%ad%e7%9a%84-glm-%e8%be%93%e5%87%ba\/","url":"https:\/\/statorials.org\/cn\/%e8%a7%a3%e9%87%8a-r-%e4%b8%ad%e7%9a%84-glm-%e8%be%93%e5%87%ba\/","name":"\u5982\u4f55\u89e3\u91ca R \u4e2d\u7684 glm \u8f93\u51fa\uff08\u5e26\u6709\u793a\u4f8b\uff09 - Statorials","isPartOf":{"@id":"https:\/\/statorials.org\/cn\/#website"},"datePublished":"2023-07-22T07:47:44+00:00","dateModified":"2023-07-22T07:47:44+00:00","author":{"@id":"https:\/\/statorials.org\/cn\/#\/schema\/person\/124e4e5b7c9f8dc0f1f95cc8c1db3261"},"description":"\u672c\u6559\u7a0b\u89e3\u91ca\u5982\u4f55\u5728 R \u4e2d\u89e3\u91ca glm \u8f93\u51fa\uff0c\u5305\u62ec\u4e00\u4e2a\u5b8c\u6574\u7684\u793a\u4f8b\u3002","breadcrumb":{"@id":"https:\/\/statorials.org\/cn\/%e8%a7%a3%e9%87%8a-r-%e4%b8%ad%e7%9a%84-glm-%e8%be%93%e5%87%ba\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/statorials.org\/cn\/%e8%a7%a3%e9%87%8a-r-%e4%b8%ad%e7%9a%84-glm-%e8%be%93%e5%87%ba\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/statorials.org\/cn\/%e8%a7%a3%e9%87%8a-r-%e4%b8%ad%e7%9a%84-glm-%e8%be%93%e5%87%ba\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u5bb6","item":"https:\/\/statorials.org\/cn\/"},{"@type":"ListItem","position":2,"name":"\u5982\u4f55\u89e3\u91ca r \u4e2d\u7684 glm \u8f93\u51fa\uff08\u5e26\u6709\u793a\u4f8b\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\/2430","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=2430"}],"version-history":[{"count":0,"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/posts\/2430\/revisions"}],"wp:attachment":[{"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/media?parent=2430"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/categories?post=2430"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/tags?post=2430"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}