{"id":485,"date":"2023-07-29T18:17:31","date_gmt":"2023-07-29T18:17:31","guid":{"rendered":"https:\/\/statorials.org\/cn\/r%e4%b8%ad%e7%9a%84%e5%ae%89%e7%a7%91%e7%93%a6\/"},"modified":"2023-07-29T18:17:31","modified_gmt":"2023-07-29T18:17:31","slug":"r%e4%b8%ad%e7%9a%84%e5%ae%89%e7%a7%91%e7%93%a6","status":"publish","type":"post","link":"https:\/\/statorials.org\/cn\/r%e4%b8%ad%e7%9a%84%e5%ae%89%e7%a7%91%e7%93%a6\/","title":{"rendered":"\u5982\u4f55\u5728 r \u4e2d\u8fdb\u884c ancova"},"content":{"rendered":"<p><\/p>\n<hr>\n<p><span style=\"color: #000000;\">\u672c\u6559\u7a0b\u63d0\u4f9b\u4e86\u5982\u4f55\u5728 R \u4e2d\u6267\u884c<a href=\"https:\/\/statorials.org\/cn\/r\u4e2d\u7684\u5b89\u79d1\u74e6\/\" target=\"_blank\" rel=\"noopener noreferrer\">ANCOVA<\/a>\u7684\u793a\u4f8b\u3002<\/span><\/p>\n<h3><span style=\"color: #000000;\"><strong>\u793a\u4f8b\uff1aR \u4e2d\u7684 ANCOVA<\/strong><\/span><\/h3>\n<p><span style=\"color: #000000;\">\u6211\u4eec\u5c06\u4f7f\u7528\u4ee5\u4e0b\u53d8\u91cf\u6267\u884c ANCOVA \u6765\u6d4b\u8bd5\u5b66\u4e60\u6280\u672f\u662f\u5426\u5bf9\u8003\u8bd5\u7ed3\u679c\u4ea7\u751f\u5f71\u54cd\uff1a<\/span><\/p>\n<ul>\n<li><span style=\"color: #000000;\"><strong>\u6280\u672f\u7814\u7a76<\/strong>\uff1a\u6211\u4eec\u5e0c\u671b\u5206\u6790\u7684\u81ea\u53d8\u91cf<\/span><\/li>\n<li><span style=\"color: #000000;\"><strong>\u5f53\u524d\u5b66\u751f\u6210\u7ee9<\/strong>\uff1a\u6211\u4eec\u5e0c\u671b\u8003\u8651\u7684\u534f\u53d8\u91cf<\/span><\/li>\n<li><span style=\"color: #000000;\"><strong>\u8bc4\u8bba\u5206\u6570<\/strong>\uff1a\u6211\u4eec\u8981\u5206\u6790\u7684\u54cd\u5e94\u53d8\u91cf<\/span><\/li>\n<\/ul>\n<p><span style=\"color: #000000;\">\u4ee5\u4e0b\u6570\u636e\u96c6\u5305\u542b 90 \u540d\u5b66\u751f\u7684\u4fe1\u606f\uff0c\u968f\u673a\u5206\u4e3a\u4e09\u7ec4\uff0c\u6bcf\u7ec4 30 \u4eba\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u8be5\u6570\u636e\u96c6\u663e\u793a\u4e86\u6bcf\u4e2a\u5b66\u751f\u4f7f\u7528\u7684\u5b66\u4e60\u6280\u5de7<em>\uff08A\u3001B<\/em>\u6216<em>C\uff09<\/em> <em>\u3001<\/em>\u4ed6\u4eec\u5f00\u59cb\u4f7f\u7528\u8be5\u5b66\u4e60\u6280\u5de7\u65f6\u5728\u73ed\u7ea7\u4e2d\u7684\u5f53\u524d\u6210\u7ee9\uff0c\u4ee5\u53ca\u4f7f\u7528\u8be5\u5b66\u4e60\u6280\u5de7\u51c6\u5907\u4e00\u4e2a\u6708\u540e\u5728\u8003\u8bd5\u4e2d\u83b7\u5f97\u7684\u6210\u7ee9\u4e3a\u4e86\u8003\u8bd5\u3002\u8003\u8bd5\uff1a<\/span><\/p>\n<pre style=\"background-color: #e5e5e5; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#make this example reproducible<\/span>\nset.seed(10)\n\n<span style=\"color: #008080;\">#create dataset<\/span>\ndata &lt;- data.frame(technique = rep(c(\"A\", \"B\", \"C\"), each = 30),\n                   current_grade = runif(90, 65, 95),\n                   exam = c(runif(30, 80, 95), runif(30, 70, 95), runif(30, 70, 90)))\n\n<span style=\"color: #008080;\">#view first six lines of dataset<\/span>\nhead(data)\n\n# technical current_grade exam\n#1 A 80.22435 87.32759\n#2 A 74.20306 90.67114\n#3 A 77.80723 88.87902\n#4 A 85.79306 87.75735\n#5 A 67.55408 85.72442\n#6 A 71.76310 92.52167\n<\/strong><\/pre>\n<h3><span style=\"color: #000000;\"><strong>\u7b2c 1 \u6b65\uff1a\u63a2\u7d22\u6570\u636e<\/strong><\/span><\/h3>\n<p><span style=\"color: #000000;\">\u5728\u62df\u5408 ANCOVA \u6a21\u578b\u4e4b\u524d\uff0c\u6211\u4eec\u9996\u5148\u9700\u8981\u63a2\u7d22\u6570\u636e\u4ee5\u66f4\u597d\u5730\u7406\u89e3\u5b83\u5e76\u9a8c\u8bc1\u4e0d\u5b58\u5728\u53ef\u80fd\u626d\u66f2\u7ed3\u679c\u7684\u6781\u7aef\u5f02\u5e38\u503c\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u9996\u5148\uff0c\u6211\u4eec\u53ef\u4ee5\u663e\u793a\u6570\u636e\u96c6\u4e2d\u6bcf\u4e2a\u53d8\u91cf\u7684\u6458\u8981\uff1a<\/span><\/p>\n<pre style=\"background-color: #e5e5e5; font-size: 15px;\"> <strong>summary(data)\n\n# technical current_grade exam      \n#A:30 Min. :65.43 Min. :71.17  \n# B:30 1st Qu.:71.79 1st Qu.:77.27  \n# C:30 Median:77.84 Median:84.69  \n# Mean:78.15 Mean:83.38  \n# 3rd Qu.:83.65 3rd Qu.:89.22  \n# Max. :93.84 Max. :94.76  \n<\/strong><\/pre>\n<p><span style=\"color: #000000;\">\u6211\u4eec\u53ef\u4ee5\u770b\u5230\u6bcf\u4e2a\u7814\u7a76\u6280\u672f\u503c\uff08 <em>A\u3001B<\/em>\u548c<em>C\uff09<\/em>\u5728\u6570\u636e\u4e2d\u51fa\u73b0\u4e86 30 \u6b21\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u6211\u4eec\u8fd8\u53ef\u4ee5\u770b\u5230\u5b66\u751f\u5f53\u524d\u5206\u6570\u5728\u7814\u7a76\u5f00\u59cb\u65f6\u7684\u5206\u5e03\u60c5\u51b5\u3002\u5168\u73ed\u6700\u4f4e\u520665.43\u5206\uff0c\u6700\u9ad8\u520693.84\u5206\uff0c\u5e73\u5747\u520678.15\u5206\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u540c\u6837\uff0c\u6211\u4eec\u53ef\u4ee5\u770b\u5230\uff0c\u8fd9\u6b21\u8003\u8bd5\u83b7\u5f97\u7684\u6700\u4f4e\u5206\u6570\u662f71.17\uff0c\u6700\u9ad8\u5206\u6570\u662f94.76\uff0c\u5e73\u5747\u5206\u6570\u662f83.38\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u7136\u540e\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528<strong>dplyr<\/strong>\u5305\u8f7b\u677e\u627e\u5230\u6bcf\u79cd\u5b66\u4e60\u6280\u672f\u5f53\u524d\u6210\u7ee9\u548c\u8003\u8bd5\u7ed3\u679c\u7684\u5e73\u5747\u503c\u548c\u6807\u51c6\u5dee\uff1a<\/span><\/p>\n<pre style=\"background-color: #e5e5e5; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#load <em>dplyr<\/em><\/span>\nlibrary(dplyr)\n\ndata %&gt;%\n  <span style=\"color: #800080;\">group_by<\/span> (technical) %&gt;%\n  <span style=\"color: #800080;\">summarize<\/span> (mean_grade = mean(current_grade),\n            sd_grade = sd(current_grade),\n            mean_exam = mean(exam),\n            sd_exam = sd(exam))\n\n# A tibble: 3 x 5\n# technique mean_grade sd_grade mean_exam sd_exam                      \n#1 A 79.0 7.00 88.5 3.88\n#2 B 78.5 8.33 81.8 7.62\n#3 C 76.9 8.24 79.9 5.71<\/strong><\/pre>\n<p><span style=\"color: #000000;\">\u6211\u4eec\u53ef\u4ee5\u770b\u5230\uff0c\u4f7f\u7528\u6bcf\u79cd\u5b66\u4e60\u6280\u672f\u7684\u5b66\u751f\u5f53\u524d\u5e74\u7ea7\u7684\u5e73\u5747\u503c\u548c\u6807\u51c6\u5dee\u5927\u81f4\u76f8\u4f3c\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u6211\u4eec\u8fd8\u53ef\u4ee5\u770b\u5230\uff0c\u4e0e\u6280\u672f<em>B<\/em>\u548c<em>C<\/em>\u76f8\u6bd4\uff0c\u4f7f\u7528\u5b66\u4e60\u6280\u672f<em>A<\/em>\u7684\u5b66\u751f\u7684\u5e73\u5747\u8003\u8bd5\u6210\u7ee9\u660e\u663e\u66f4\u9ad8\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u6211\u4eec\u8fd8\u53ef\u4ee5\u4f7f\u7528<a href=\"https:\/\/statorials.org\/cn\/\u7edf\u8ba1\u5b66\u4ee5\u7b80\u5355\u76f4\u63a5\u7684\u65b9\u5f0f\u89e3\u91ca\u6982\u5ff5\uff0c\u6211\u4eec\u4f7f\u5b66\u4e60\u7edf\u8ba1\u53d8\u5f97\u66f4\u5bb9\u6613\/\" target=\"_blank\" rel=\"noopener noreferrer\">\u7bb1\u7ebf\u56fe<\/a>\u6839\u636e\u5b66\u4e60\u6280\u672f\u53ef\u89c6\u5316\u8003\u8bd5\u7ed3\u679c\u7684\u5206\u5e03\uff1a<\/span><\/p>\n<pre style=\"background-color: #e5e5e5; font-size: 15px;\"> <strong>boxplot(exam ~ technique,\ndata = data,\nmain = \"Exam Score by Studying Technique\",\nxlab = \"Studying Technique\",\nylab = \"Exam Score\",\ncol = \"steelblue\",\nborder = \"black\"\n)<\/strong><\/pre>\n<h3><\/h3>\n<p><span style=\"color: #000000;\">\u540c\u6837\uff0c\u6211\u4eec\u8fd8\u53ef\u4ee5\u4f7f\u7528\u7bb1\u7ebf\u56fe\u6839\u636e\u5b66\u4e60\u6280\u672f\u6765\u53ef\u89c6\u5316<em>\u5f53\u524d\u6210\u7ee9<\/em>\u7684\u5206\u5e03\uff1a<\/span><\/p>\n<pre style=\"background-color: #e5e5e5; font-size: 15px;\"> <strong>boxplot(current_grade ~ technical,\ndata = data,\nmain = \"Current Grade by Studying Technique\",\nxlab = \"Studying Technique\",\nylab = \"Current Grade\",\ncol = \"steelblue\",\nborder = \"black\"\n)<\/strong><\/pre>\n<h3><span style=\"color: #000000;\"><strong>\u7b2c 2 \u6b65\uff1a\u68c0\u67e5\u6a21\u578b\u5047\u8bbe<\/strong><\/span><\/h3>\n<p><span style=\"color: #000000;\">\u4e00\u65e6\u6211\u4eec\u8fdb\u884c\u4e86\u4e00\u4e9b\u57fa\u672c\u7684\u6570\u636e\u63a2\u7d22\u5e76\u719f\u6089\u4e86\u6570\u636e\uff0c\u6211\u4eec\u5c31\u9700\u8981\u9a8c\u8bc1\u662f\u5426\u6ee1\u8db3\u4ee5\u4e0b ANCOVA \u5047\u8bbe\uff1a<\/span><\/p>\n<ul>\n<li><span style=\"color: #000000;\"><strong>\u534f\u53d8\u91cf\u548c\u6cbb\u7597\u662f\u72ec\u7acb\u7684<\/strong>\u2014\u2014\u6709\u5fc5\u8981\u9a8c\u8bc1\u534f\u53d8\u91cf\uff08<em>\u5f53\u524d\u6210\u7ee9\uff09<\/em>\u548c\u6cbb\u7597<em>\uff08\u7814\u7a76\u6280\u672f\uff09<\/em>\u662f\u76f8\u4e92\u72ec\u7acb\u7684\uff0c\u56e0\u4e3a\u53ea\u6709\u5f53\u534f\u53d8\u91cf\u548c\u6cbb\u7597\u72ec\u7acb\u4e8e\u53cd\u5e94\u53d8\u91cf\uff08<em>\u68c0\u67e5<\/em>\uff09\u3002<\/span><\/li>\n<li><span style=\"color: #000000;\"><strong>\u65b9\u5dee\u540c\u8d28\u6027<\/strong>\u2014\u2014\u6211\u4eec\u9700\u8981\u68c0\u67e5\u7ec4\u4e4b\u95f4\u7684\u65b9\u5dee\u662f\u5426\u76f8\u7b49<\/span><\/li>\n<\/ul>\n<p><span style=\"color: #000000;\">\u4e3a\u4e86\u9a8c\u8bc1\u534f\u53d8\u91cf\u548c\u6cbb\u7597\u662f\u72ec\u7acb\u7684\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528<em>\u5f53\u524d\u6210\u7ee9<\/em>\u4f5c\u4e3a\u54cd\u5e94\u53d8\u91cf\u5e76\u4f7f\u7528<em>\u7814\u7a76\u6280\u672f<\/em>\u4f5c\u4e3a\u9884\u6d4b\u53d8\u91cf\u6765\u6267\u884c\u65b9\u5dee\u5206\u6790\uff1a<\/span><\/p>\n<pre style=\"background-color: #e5e5e5; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#fit anova model\n<\/span>anova_model &lt;- aov(current_grade ~ technique, data = data)\n<span style=\"color: #008080;\">#view summary of anova model\n<\/span>summary(anova_model)\n\n# Df Sum Sq Mean Sq F value Pr(&gt;F)\n#technical 2 74 37.21 0.599 0.552\n#Residuals 87 5406 62.14    \n<\/strong><\/pre>\n<p> <span style=\"color: #000000;\">p \u503c\u5927\u4e8e 0.05\uff0c\u56e0\u6b64\u534f\u53d8\u91cf\uff08<em>\u5f53\u524d\u7b49\u7ea7\uff09<\/em>\u548c\u6cbb\u7597\uff08<em>\u7814\u7a76\u6280\u672f<\/em>\uff09\u663e\u5f97\u72ec\u7acb\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u7136\u540e\uff0c\u4e3a\u4e86\u68c0\u67e5\u7ec4\u4e4b\u95f4\u662f\u5426\u5b58\u5728\u65b9\u5dee\u540c\u8d28\u6027\uff0c\u6211\u4eec\u53ef\u4ee5\u6267\u884c Levene \u68c0\u9a8c\uff1a<\/span><\/p>\n<pre style=\"background-color: #e5e5e5; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#load <em>car<\/em> library to conduct Levene's Test<\/span>\nlibary(car)\n\n<span style=\"color: #008080;\">#conduct Levene's Test<\/span>\nleveneTest(technical exam, data = data)\n\n#Levene's Test for Homogeneity of Variance (center = median)\n# Df F value Pr(&gt;F)    \n#group 2 9.4324 0.0001961 ***\n#87   \n<\/strong><\/pre>\n<p><span style=\"color: #000000;\">\u68c0\u9a8c\u7684 p \u503c\u7b49\u4e8e 0.0001961\uff0c\u8fd9\u8868\u660e\u7ec4\u4e4b\u95f4\u7684\u65b9\u5dee\u4e0d\u76f8\u7b49\u3002\u5c3d\u7ba1\u6211\u4eec\u53ef\u4ee5\u5c1d\u8bd5\u5bf9\u6570\u636e\u8fdb\u884c\u8f6c\u6362\u6765\u7ea0\u6b63\u8fd9\u4e2a\u95ee\u9898\uff0c\u4f46\u6b64\u65f6\u6211\u4eec\u4e0d\u4f1a\u592a\u62c5\u5fc3\u65b9\u5dee\u5dee\u5f02\u3002<\/span><\/p>\n<h3><span style=\"color: #000000;\"><strong>\u6b65\u9aa4 3\uff1a\u8c03\u6574 ANCOVA \u6a21\u578b<\/strong><\/span><\/h3>\n<p><span style=\"color: #000000;\">\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u4f7f\u7528<em>\u8003\u8bd5\u6210\u7ee9<\/em>\u4f5c\u4e3a\u54cd\u5e94\u53d8\u91cf\u3001<em>\u5b66\u4e60\u6280\u672f<\/em>\u4f5c\u4e3a\u9884\u6d4b\uff08\u6216\u201c\u6cbb\u7597\u201d\uff09\u53d8\u91cf\u4ee5\u53ca<em>\u5f53\u524d\u6210\u7ee9<\/em>\u4f5c\u4e3a\u534f\u53d8\u91cf\u6765\u62df\u5408 ANCOVA \u6a21\u578b\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u6211\u4eec\u5c06\u4f7f\u7528\u5305\u4e2d\u7684 Anova() \u51fd\u6570\uff0c\u56e0\u4e3a\u8981\u505a\u5230\u8fd9\u4e00\u70b9\uff0c\u53ea\u662f\u4e3a\u4e86\u80fd\u591f\u6307\u5b9a\u6211\u4eec\u60f3\u8981\u5bf9\u6a21\u578b\u4f7f\u7528 III \u578b\u5e73\u65b9\u548c\uff0c\u56e0\u4e3a I \u578b\u5e73\u65b9\u548c\u53d6\u51b3\u4e8e\u5c06\u9884\u6d4b\u53d8\u91cf\u8f93\u5165\u5230\u6a21\u578b\u4e2d\uff1a<\/span><\/p>\n<pre style=\"background-color: #e5e5e5; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#load <em>car<\/em> library<\/span>\nlibrary(car)\n\n<span style=\"color: #008080;\">#fit ANCOVA model\n<\/span>ancova_model &lt;- aov(exam ~ technique + current_grade, data = data)\n\n<span style=\"color: #008080;\">#view summary of model\n<\/span>Anova(ancova_model, type=\"III\") \n\n#Answer: exam\n# Sum Sq Df F value Pr(&gt;F)    \n#(Intercept) 7161.2 1 201.4621 &lt; 2.2e-16 ***\n#technical 1242.9 2 17.4830 4.255e-07 ***\n#current_grade 12.3 1 0.3467 0.5576    \n#Residuals 3057.0 86         \n<\/strong><\/pre>\n<p><span style=\"color: #000000;\">\u6211\u4eec\u53ef\u4ee5\u770b\u5230\uff0c<em>\u6280\u672f<\/em>\u7684 p \u503c\u6781\u4f4e\uff0c\u8fd9\u8868\u660e\u5373\u4f7f\u5728\u63a7\u5236\u5f53\u524d\u6210\u7ee9\u4e4b\u540e\uff0c\u5b66\u4e60\u6280\u672f\u5bf9\u8003\u8bd5\u6210\u7ee9\u4e5f\u6709\u7edf\u8ba1\u4e0a\u7684\u663e\u7740\u5f71\u54cd\u3002<\/span><\/p>\n<h3><span style=\"color: #000000;\"><strong>\u7b2c 4 \u6b65\uff1a\u4e8b\u540e\u6d4b\u8bd5<\/strong><\/span><\/h3>\n<p><span style=\"color: #000000;\">\u5c3d\u7ba1 ANCOVA \u7ed3\u679c\u544a\u8bc9\u6211\u4eec\uff0c<em>\u5b66\u4e60\u6280\u672f<\/em>\u5bf9\u8003\u8bd5\u6210\u7ee9\u6709\u7edf\u8ba1\u4e0a\u7684\u663e\u7740\u5f71\u54cd\uff0c\u4f46\u6211\u4eec\u9700\u8981\u8fdb\u884c<a href=\"https:\/\/statorials.org\/cn\/\u7edf\u8ba1\u5b66\u4ee5\u7b80\u5355\u76f4\u63a5\u7684\u65b9\u5f0f\u89e3\u91ca\u6982\u5ff5\uff0c\u6211\u4eec\u4f7f\u5b66\u4e60\u7edf\u8ba1\u53d8\u5f97\u66f4\u5bb9\u6613\/\" target=\"_blank\" rel=\"noopener noreferrer\">\u4e8b\u540e\u6d4b\u8bd5<\/a>\uff0c\u4ee5\u786e\u5b9a\u54ea\u4e9b\u5b66\u4e60\u6280\u672f\u5f7c\u6b64\u4e0d\u540c\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u4e3a\u6b64\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528 R \u4e2d\u7684<strong>multcomp<\/strong>\u5305\u4e2d\u7684 glht() \u51fd\u6570\u6765\u6267\u884c Tukey \u6d4b\u8bd5\u4ee5\u8fdb\u884c\u591a\u91cd\u6bd4\u8f83\uff1a<\/span><\/p>\n<pre style=\"background-color: #e5e5e5; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#load the <em>multcomp<\/em> library<\/span>\nlibrary(multicomp)\n\n<span style=\"color: #008080;\">#fit the ANCOVA model\n<\/span>ancova_model &lt;- aov(exam ~ technique + current_grade, data = data)\n\n<span style=\"color: #008080;\">#define the post hoc comparisons to make\n<\/span>postHocs &lt;- glht(ancova_model, linfct = mcp(technique = \"Tukey\"))\n\n<span style=\"color: #008080;\">#view a summary of the post hoc comparisons\n<\/span>summary(postHocs)\n\n#Multiple Comparisons of Means: Tukey Contrasts\n#\n#Fit: aov(formula = exam ~ technique + current_grade, data = data)\n#\n#Linear Assumptions:\n#Estimate Std. Error t value Pr(&gt;|t|)    \n#B - A == 0 -6.711 1.540 -4.358 0.000109 ***\n#C - A == 0 -8.736 1.549 -5.640 &lt; 1e-04 ***\n#C - B == 0 -2.025 1.545 -1.311 0.393089    \n\n<span style=\"color: #008080;\">#view the confidence intervals associated with the multiple comparisons\n<\/span>confint(postHocs)\n\n# Simultaneous Confidence Intervals\n#\n#Multiple Comparisons of Means: Tukey Contrasts\n#\n#Fit: aov(formula = exam ~ technique + current_grade, data = data)\n#\n#Quantile = 2.3845\n#95% family-wise confidence level\n#\n#Linear Assumptions:\n# Estimate lwr upr     \n#B - A == 0 -6.7112 -10.3832 -3.0392\n#C - A == 0 -8.7364 -12.4302 -5.0426\n#C - B == 0 -2.0252 -5.7091 1.6588\n<\/strong><\/pre>\n<p><span style=\"color: #000000;\">\u4ece\u7ed3\u679c\u4e2d\uff0c\u6211\u4eec\u53ef\u4ee5\u770b\u5230\uff0c\u5b66\u4e60\u6280\u672f<em>A<\/em>\u548c\u5b66\u4e60\u6280\u672f<em>B<\/em> \uff08p \u503c\uff1a0,000109\uff09\u4ee5\u53ca\u6280\u672f<em>A<\/em>\u548c\u6280\u672f<em>C<\/em>\u4e4b\u95f4\u7684\u8003\u8bd5\u6210\u7ee9\u5b58\u5728\u7edf\u8ba1\u663e\u7740\u6027\u5dee\u5f02\uff08\u03b1 = 0.05\uff09 \uff08p \u503c\uff1a&lt;1e-04\uff09\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u6211\u4eec\u8fd8\u53ef\u4ee5\u770b\u5230\uff0c\u6280\u672f<em>B<\/em>\u548c<em>C<\/em>\u4e4b\u95f4<em>\u6ca1\u6709<\/em>\u7edf\u8ba1\u5b66\u4e0a\u7684\u663e\u7740\u5dee\u5f02\uff08\u03b1 = 0.05\uff09\u3002<\/span><span style=\"color: #000000;\">\u6280\u672f\u4e4b\u95f4\u7684\u7f6e\u4fe1\u533a\u95f4\u4e5f\u652f\u6301\u8fd9\u4e9b\u53d1\u73b0\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u56e0\u6b64\uff0c\u6211\u4eec\u53ef\u4ee5\u5f97\u51fa\u7ed3\u8bba\uff0c\u5373\u4f7f\u5728\u63a7\u5236\u4e86\u5b66\u751f\u5f53\u524d\u5728\u73ed\u7ea7\u4e2d\u7684\u6210\u7ee9\u4e4b\u540e\uff0c\u4e0e\u6280\u672f<em>B<\/em>\u548c<em>C<\/em>\u76f8\u6bd4\uff0c\u4f7f\u7528\u5b66\u4e60\u6280\u672f<em>A<\/em>\u4f1a\u5bfc\u81f4\u5b66\u751f\u7684\u8003\u8bd5\u6210\u7ee9\u5728\u7edf\u8ba1\u4e0a\u663e\u7740\u63d0\u9ad8\u3002<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u6559\u7a0b\u63d0\u4f9b\u4e86\u5982\u4f55\u5728 R \u4e2d\u6267\u884cANCOVA\u7684\u793a\u4f8b\u3002 \u793a\u4f8b\uff1aR \u4e2d\u7684 ANCOVA \u6211\u4eec\u5c06\u4f7f\u7528\u4ee5\u4e0b\u53d8\u91cf\u6267\u884c AN [&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-485","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\u5728 R - Statorials \u4e2d\u6267\u884c ANCOVA<\/title>\n<meta name=\"description\" content=\"\u672c\u6559\u7a0b\u4ecb\u7ecd\u5982\u4f55\u5728 R \u4e2d\u6267\u884c ANCOVA\uff08\u534f\u65b9\u5dee\u5206\u6790\uff09\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\u5b89\u79d1\u74e6\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5982\u4f55\u5728 R - Statorials \u4e2d\u6267\u884c ANCOVA\" \/>\n<meta property=\"og:description\" content=\"\u672c\u6559\u7a0b\u4ecb\u7ecd\u5982\u4f55\u5728 R \u4e2d\u6267\u884c ANCOVA\uff08\u534f\u65b9\u5dee\u5206\u6790\uff09\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/statorials.org\/cn\/r\u4e2d\u7684\u5b89\u79d1\u74e6\/\" \/>\n<meta property=\"og:site_name\" content=\"Statorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-29T18:17:31+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=\"2 \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%e5%ae%89%e7%a7%91%e7%93%a6\/\",\"url\":\"https:\/\/statorials.org\/cn\/r%e4%b8%ad%e7%9a%84%e5%ae%89%e7%a7%91%e7%93%a6\/\",\"name\":\"\u5982\u4f55\u5728 R - Statorials \u4e2d\u6267\u884c ANCOVA\",\"isPartOf\":{\"@id\":\"https:\/\/statorials.org\/cn\/#website\"},\"datePublished\":\"2023-07-29T18:17:31+00:00\",\"dateModified\":\"2023-07-29T18:17:31+00:00\",\"author\":{\"@id\":\"https:\/\/statorials.org\/cn\/#\/schema\/person\/124e4e5b7c9f8dc0f1f95cc8c1db3261\"},\"description\":\"\u672c\u6559\u7a0b\u4ecb\u7ecd\u5982\u4f55\u5728 R \u4e2d\u6267\u884c ANCOVA\uff08\u534f\u65b9\u5dee\u5206\u6790\uff09\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/statorials.org\/cn\/r%e4%b8%ad%e7%9a%84%e5%ae%89%e7%a7%91%e7%93%a6\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/statorials.org\/cn\/r%e4%b8%ad%e7%9a%84%e5%ae%89%e7%a7%91%e7%93%a6\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/statorials.org\/cn\/r%e4%b8%ad%e7%9a%84%e5%ae%89%e7%a7%91%e7%93%a6\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u5bb6\",\"item\":\"https:\/\/statorials.org\/cn\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5982\u4f55\u5728 r \u4e2d\u8fdb\u884c ancova\"}]},{\"@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\u5728 R - Statorials \u4e2d\u6267\u884c ANCOVA","description":"\u672c\u6559\u7a0b\u4ecb\u7ecd\u5982\u4f55\u5728 R \u4e2d\u6267\u884c ANCOVA\uff08\u534f\u65b9\u5dee\u5206\u6790\uff09\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\u5b89\u79d1\u74e6\/","og_locale":"zh_CN","og_type":"article","og_title":"\u5982\u4f55\u5728 R - Statorials \u4e2d\u6267\u884c ANCOVA","og_description":"\u672c\u6559\u7a0b\u4ecb\u7ecd\u5982\u4f55\u5728 R \u4e2d\u6267\u884c ANCOVA\uff08\u534f\u65b9\u5dee\u5206\u6790\uff09\u3002","og_url":"https:\/\/statorials.org\/cn\/r\u4e2d\u7684\u5b89\u79d1\u74e6\/","og_site_name":"Statorials","article_published_time":"2023-07-29T18:17:31+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":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/statorials.org\/cn\/r%e4%b8%ad%e7%9a%84%e5%ae%89%e7%a7%91%e7%93%a6\/","url":"https:\/\/statorials.org\/cn\/r%e4%b8%ad%e7%9a%84%e5%ae%89%e7%a7%91%e7%93%a6\/","name":"\u5982\u4f55\u5728 R - Statorials \u4e2d\u6267\u884c ANCOVA","isPartOf":{"@id":"https:\/\/statorials.org\/cn\/#website"},"datePublished":"2023-07-29T18:17:31+00:00","dateModified":"2023-07-29T18:17:31+00:00","author":{"@id":"https:\/\/statorials.org\/cn\/#\/schema\/person\/124e4e5b7c9f8dc0f1f95cc8c1db3261"},"description":"\u672c\u6559\u7a0b\u4ecb\u7ecd\u5982\u4f55\u5728 R \u4e2d\u6267\u884c ANCOVA\uff08\u534f\u65b9\u5dee\u5206\u6790\uff09\u3002","breadcrumb":{"@id":"https:\/\/statorials.org\/cn\/r%e4%b8%ad%e7%9a%84%e5%ae%89%e7%a7%91%e7%93%a6\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/statorials.org\/cn\/r%e4%b8%ad%e7%9a%84%e5%ae%89%e7%a7%91%e7%93%a6\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/statorials.org\/cn\/r%e4%b8%ad%e7%9a%84%e5%ae%89%e7%a7%91%e7%93%a6\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u5bb6","item":"https:\/\/statorials.org\/cn\/"},{"@type":"ListItem","position":2,"name":"\u5982\u4f55\u5728 r \u4e2d\u8fdb\u884c ancova"}]},{"@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\/485","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=485"}],"version-history":[{"count":0,"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/posts\/485\/revisions"}],"wp:attachment":[{"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/media?parent=485"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/categories?post=485"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/tags?post=485"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}