我想检验岛屿面积和土地利用的影响,以及岛屿面积和土地利用对物种丰富度的影响。关于土地利用,我有三组,即森林、农田和混合。数据基于不同岛屿上的横截面,因此将岛ID设为随机效应。
我的模型看起来是这样的:
#model = glmer(SR ~ Area + land_use + Area:land_use + (1|islandID))
#summary(model)
Linear mixed model fit by REML. t-tests use Satterthwaite's method ['lmerModLmerTest']
Formula: SR ~ Area + land_use + Area:land_use + (1 | islandID)
Data: transect_ZS
REML criterion at convergence: 184.4
Scaled residuals:
Min 1Q Median 3Q Max
-2.66105 -0.56159 -0.00294 0.57259 1.72096
Random effects:
Groups Name Variance Std.Dev.
islandID (Intercept) 0.1524 0.3903
Residual 0.6805 0.8249
Number of obs: 70, groups: islandID, 34
Fixed effects:
Estimate Std. Error df t value Pr(>|t|)
(Intercept) -0.9996 0.5187 57.0061 -1.927 0.05893 .
Area 0.9064 0.2834 40.9977 3.198 0.00267 **
land_useforest 0.6563 0.5569 62.0889 1.179 0.24309
land_usemix 0.9611 0.6373 55.3032 1.508 0.13723
Area:land_useforest -0.8318 0.3034 63.4045 -2.742 0.00793 **
Area:land_usemix -0.7756 0.4748 56.3692 -1.633 0.10795
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1结果表明,海岛面积和相互作用条件对SR有显著影响:
# > anova(model)
#Type III Analysis of Variance Table with Satterthwaite's method
# Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
#Area 3.0359 3.03590 1 27.448 4.4615 0.04390 *
#land_use 1.5520 0.77601 2 57.617 1.1404 0.32679
#Area:land_use 5.1658 2.58288 2 60.935 3.7958 0.02795 *
#---
#Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#然后,我用lsmeans函数进行了图基人的两两比较:
#lsmeans(model, pairwise ~ Area:land_use, adjust="tukey")结果表明,农田和森林的物种丰富度存在显著差异,对吗?我想知道,这种差异是否应该被看作是在这个模型中,农田与森林物种丰富度-面积关系的截留显着性差异?也就是说,农田剖面的物种丰富度高于森林剖面的物种丰富度。
#$contrasts
contrast estimate SE df t.ratio p.value
1.19968425045037 farmland - 1.19968425045037 forest 3.4153 0.288 62.6 1.185 0.0466
1.19968425045037 farmland - 1.19968425045037 mix -0.0306 0.426 64.0 -0.072 0.9972
1.19968425045037 forest - 1.19968425045037 mix -0.3722 0.377 63.9 -0.987 0.5087
Degrees-of-freedom method: kenward-roger
P value adjustment: tukey method for comparing a family of 3 estimates 但如何检验该模型中物种丰富度-面积关系的坡度是否存在显着性差异?即证明农田剖面的物种丰富度-面积关系是否比森林样带的物种丰富度-面积关系更陡峭?
发布于 2021-12-16 20:55:18
我想你想
lstrends(model, pairwise ~ land_use, var = "Area", adjust="tukey")lsmeans和lstrends函数位于emmeans包中,它们分别等价于emmeans和emtrends。请看这些函数的文档。lsmeans意味着包只是一个前端。
https://stackoverflow.com/questions/70377347
复制相似问题