我是统计学的初学者,但我无法理解我的这个问题。
我想测试堆肥和改良对土壤覆盖的影响。为此,我使用 lmer 模型:
modg <- lmer(log(Couverture)~ as.factor(Compost) * Amendement + (1|Bande), data= rvg)
这两个固定效应都是定性数据。 堆肥系数为:20、30 或 40 修正因素有:Aucun、Myco_com、Myco_site、Prebiotique
这是我得到的总结:
Fixed effects:
Estimate Std. Error df t value Pr(>|t|)
(Intercept) 0.8044 0.5171 16.0414 1.556 0.139273
as.factor(Compost)30 1.2920 0.6822 19.9815 1.894 0.072827 .
as.factor(Compost)40 1.0211 0.7248 11.5907 1.409 0.185141
AmendementMyco_com 2.6701 0.4770 32.5073 5.598 3.31e-06 ***
AmendementMyco_site 2.4687 0.5043 33.9108 4.896 2.36e-05 ***
AmendementPrebiotique 1.3416 0.4939 32.2909 2.716 0.010522 *
as.factor(Compost)30:AmendementMyco_com -3.2280 0.6679 32.9430 -4.833 3.02e-05 ***
as.factor(Compost)40:AmendementMyco_com -3.3412 0.6590 32.3456 -5.070 1.58e-05 ***
as.factor(Compost)30:AmendementMyco_site -3.2795 0.6809 33.6309 -4.817 3.04e-05 ***
as.factor(Compost)40:AmendementMyco_site -3.0393 0.6790 33.1761 -4.476 8.48e-05 ***
as.factor(Compost)30:AmendementPrebiotique -1.6666 0.6713 32.2333 -2.483 0.018439 *
as.factor(Compost)40:AmendementPrebiotique -2.4807 0.6757 32.3685 -3.671 0.000863 ***
我认为截距对应于 Aucun-Compost20,因为它仅测试定性因素,因此模型以第一次交互作为参考。 我的 tukey 测试似乎证实了这一点:
emmeans(modg, list(pairwise ~ Amendement*as.factor(Compost)), adjust = "tukey")
我这次测试得到的结果是:
Aucun Compost20 - Myco_com Compost20 -2.6701 0.479 31.86 -5.578 0.0002
Aucun Compost20 - Myco_site Compost20 -2.4687 0.509 33.51 -4.852 0.0014
Aucun Compost20 - Prebiotique Compost20 -1.3416 0.495 31.61 -2.713 0.2658
Aucun Compost20 - Aucun Compost30 -1.2920 0.735 18.29 -1.757 0.8205
Aucun Compost20 - Myco_com Compost30 -0.7341 0.706 20.45 -1.040 0.9943
Aucun Compost20 - Myco_site Compost30 -0.4811 0.706 20.45 -0.682 0.9999
Aucun Compost20 - Prebiotique Compost30 -0.9669 0.735 18.29 -1.315 0.9662
Aucun Compost20 - Aucun Compost40 -1.0211 0.740 10.16 -1.380 0.9442
Aucun Compost20 - Myco_com Compost40 -0.3501 0.740 10.16 -0.473 1.0000
Aucun Compost20 - Myco_site Compost40 -0.4505 0.740 10.16 -0.609 0.9999
Aucun Compost20 - Prebiotique Compost40 0.1180 0.745 10.30 0.158 1.0000
Myco_com Compost20 - Myco_site Compost20 0.2014 0.459 34.32 0.439 1.0000
Myco_com Compost20 - Prebiotique Compost20 1.3286 0.433 31.54 3.070 0.1352
Myco_com Compost20 - Aucun Compost30 1.3782 0.697 15.01 1.977 0.7013
Myco_com Compost20 - Myco_com Compost30 1.9361 0.666 16.78 2.906 0.2222
Myco_com Compost20 - Myco_site Compost30 2.1890 0.666 16.78 3.286 0.1181
Myco_com Compost20 - Prebiotique Compost30 1.7033 0.697 15.01 2.443 0.4351
Myco_com Compost20 - Aucun Compost40 1.6490 0.702 8.24 2.349 0.5105
Myco_com Compost20 - Myco_com Compost40 2.3201 0.702 8.24 3.306 0.1764
Myco_com Compost20 - Myco_site Compost40 2.2196 0.702 8.24 3.162 0.2095
Myco_com Compost20 - Prebiotique Compost40 2.7881 0.707 8.38 3.944 0.0790
Myco_site Compost20 - Prebiotique Compost20 1.1272 0.476 33.93 2.367 0.4534
Myco_site Compost20 - Aucun Compost30 1.1768 0.657 21.43 1.790 0.8066
Myco_site Compost20 - Myco_com Compost30 1.7347 0.614 24.37 2.825 0.2298
Myco_site Compost20 - Myco_site Compost30 1.9876 0.614 24.37 3.237 0.1066
Myco_site Compost20 - Prebiotique Compost30 1.5018 0.657 21.43 2.284 0.5141
Myco_site Compost20 - Aucun Compost40 1.4476 0.682 9.42 2.121 0.6232
Myco_site Compost20 - Myco_com Compost40 2.1187 0.682 9.42 3.104 0.2104
Myco_site Compost20 - Myco_site Compost40 2.0182 0.682 9.42 2.957 0.2532
Myco_site Compost20 - Prebiotique Compost40 2.5867 0.688 9.58 3.761 0.0869
Prebiotique Compost20 - Aucun Compost30 0.0496 0.710 16.20 0.070 1.0000
Prebiotique Compost20 - Myco_com Compost30 0.6075 0.680 18.13 0.894 0.9983
Prebiotique Compost20 - Myco_site Compost30 0.8604 0.680 18.13 1.266 0.9739
Prebiotique Compost20 - Prebiotique Compost30 0.3747 0.710 16.20 0.528 1.0000
Prebiotique Compost20 - Aucun Compost40 0.3204 0.715 8.91 0.448 1.0000
Prebiotique Compost20 - Myco_com Compost40 0.9915 0.715 8.91 1.387 0.9397
Prebiotique Compost20 - Myco_site Compost40 0.8910 0.715 8.91 1.246 0.9683
Prebiotique Compost20 - Prebiotique Compost40 1.4595 0.720 9.05 2.027 0.6732
Aucun Compost30 - Myco_com Compost30 0.5579 0.471 32.86 1.183 0.9867
Aucun Compost30 - Myco_site Compost30 0.8108 0.471 32.86 1.720 0.8464
Aucun Compost30 - Prebiotique Compost30 0.3251 0.455 31.47 0.715 0.9998
Aucun Compost30 - Aucun Compost40 0.2708 0.706 9.24 0.384 1.0000
Aucun Compost30 - Myco_com Compost40 0.9419 0.706 9.24 1.335 0.9524
Aucun Compost30 - Myco_site Compost40 0.8414 0.706 9.24 1.192 0.9766
Aucun Compost30 - Prebiotique Compost40 1.4099 0.711 9.39 1.984 0.6959
Myco_com Compost30 - Myco_site Compost30 0.2529 0.463 31.87 0.546 1.0000
Myco_com Compost30 - Prebiotique Compost30 -0.2328 0.471 32.86 -0.494 1.0000
Myco_com Compost30 - Aucun Compost40 -0.2871 0.685 9.34 -0.419 1.0000
Myco_com Compost30 - Myco_com Compost40 0.3840 0.685 9.34 0.561 1.0000
Myco_com Compost30 - Myco_site Compost40 0.2835 0.685 9.34 0.414 1.0000
Myco_com Compost30 - Prebiotique Compost40 0.8520 0.690 9.49 1.235 0.9710
Myco_site Compost30 - Prebiotique Compost30 -0.4858 0.471 32.86 -1.030 0.9957
Myco_site Compost30 - Aucun Compost40 -0.5400 0.685 9.34 -0.789 0.9990
Myco_site Compost30 - Myco_com Compost40 0.1311 0.685 9.34 0.191 1.0000
Myco_site Compost30 - Myco_site Compost40 0.0306 0.685 9.34 0.045 1.0000
Myco_site Compost30 - Prebiotique Compost40 0.5991 0.690 9.49 0.868 0.9979
Prebiotique Compost30 - Aucun Compost40 -0.0543 0.706 9.24 -0.077 1.0000
Prebiotique Compost30 - Myco_com Compost40 0.6168 0.706 9.24 0.874 0.9977
Prebiotique Compost30 - Myco_site Compost40 0.5164 0.706 9.24 0.732 0.9995
Prebiotique Compost30 - Prebiotique Compost40 1.0849 0.711 9.39 1.526 0.9004
Aucun Compost40 - Myco_com Compost40 0.6711 0.455 31.47 1.476 0.9365
Aucun Compost40 - Myco_site Compost40 0.5706 0.455 31.47 1.255 0.9791
Aucun Compost40 - Prebiotique Compost40 1.1391 0.462 31.81 2.463 0.3967
Myco_com Compost40 - Myco_site Compost40 -0.1005 0.455 31.47 -0.221 1.0000
Myco_com Compost40 - Prebiotique Compost40 0.4680 0.462 31.81 1.012 0.9962
Myco_site Compost40 - Prebiotique Compost40 0.5685 0.462 31.81 1.229 0.9822
所以这两个表之间有一些逻辑:
但是,之后的行与 tukey 表中的对应行不匹配。例如, as.factor(Compost)30:AmendementMyco_com 应该对应于 Aucun Compost20 - Myco_com Compost30 但事实并非如此。我无法理解为什么这些值与该点不同。如果我查看数据,我的 tukey 测试中的截距值会更有意义。有人可以帮我解决这个问题吗?
我尝试查看数据并更改变量的顺序,使我的数据为.ordered() 等,但没有任何效果。