“emmeans” package

您所在的位置:网站首页 简单效应分析的作用 “emmeans” package

“emmeans” package

2024-07-07 07:32| 来源: 网络整理| 查看: 265

The emmeans package is one of several alternatives to facilitate post hoc methods application and contrast analysis. It is a relatively recent replacement for the lsmeans package that some R users may be familiar with. It is intended for use with a wide variety of ANOVA models, including repeated measures and nested designs where the initial modeling would employ aov, lm, ez or lme4 (mixed models).

emmeans包是一些R用户可能熟悉的lsmeans包的相对较新的替代品。它适用于多种方差分析模型,包括重复测量和嵌套设计,其中初始建模将使用‘aov’、‘lm’、‘ez’或‘lme4’(混合模型)。

1. Using emmeans for pairwise post hoc multiple comparisons. 1. 用emmeans来进行两两事后多重比较

Initially, a minimal illustration is presented. First is a “pairwise” approach to followup comparisons, with a p-value adjustment equivalent to the Tukey test. The emmeans function requires a model object to be passed as the first argument. We could use either fit1 (the aov object) or fit2 (the lm object) originally created in the base Anova section of this document.

首先,给出了一个简短的说明。首先是后续比较的“成对”方法,p值的矫正用Tukey检验。emmeans函数要求将模型对象作为第一个参数传递。我们可以使用fit1(AOV对象)或fit2(lm对象),这些对象最初是在本文的基础Anova部分中创建的。

# 用emmeans()对主效应进行事后检验,并且做多重比较矫正。 #library(emmeans) # reminder: fit.2


【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3