您如何(以及为什么)使用对比? [英] How (and why) do you use contrasts?

查看:77
本文介绍了您如何(以及为什么)使用对比?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在什么情况下您会在分析中形成对比?它是怎么做的?它有什么用?

Under what cases do you create contrasts in your analysis? How is it done and what is it used for?

我检查了?contrasts?C-都导致"S中统计模型的第2章",这对我来说并不容易.

I checked ?contrasts and ?C - both lead to "Chapter 2 of Statistical Models in S", which is not readily available to me.

推荐答案

当您将线性模型与因子(即分类变量)拟合为解释变量时,需要对比.对比说明了如何将因子的水平编码为一系列数字虚拟变量以拟合模型.

Contrasts are needed when you fit linear models with factors (i.e. categorical variables) as explanatory variables. The contrast specifies how the levels of the factors will be coded into a family of numeric dummy variables for fitting the model.

以下是使用的各种不同对比的一些注意事项: http://www.unc.edu/courses /2006spring/ecol/145/001/docs/lectures/lecture26.htm

Here are some good notes for the different varieties of contrasts used: http://www.unc.edu/courses/2006spring/ecol/145/001/docs/lectures/lecture26.htm

当使用的对比度改变时,模型在允许的潜在联合概率分布方面保持不变.仅其参数化会更改.拟合值也保持相同.同样,一旦获得了一种对比选择的参数值,就很容易得出另一种对比选择的参数值.

When the contrasts used are changed, the model remains the same in terms of the underlying joint probability distributions allowed. Only its parametrization changes. The fitted values remain the same as well. Also, once you have the value of the parameters for one choice of contrasts, it is easy to derive what the value of the parameters for another choice of contrasts would have been.

因此,对比的选择没有统计意义.纯粹是使系数和假设检验更易于解释.

Therefore the choice of contrasts has no statistical consequence. It is purely a matter of making coefficients and hypothesis tests easier to interpret.

这篇关于您如何(以及为什么)使用对比?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆