找回密码
 注册
查看: 463|回复: 0

R语言 rockchalk包 meanCenter()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-27 22:42:50 | 显示全部楼层 |阅读模式
meanCenter(rockchalk)
meanCenter()所属R语言包:rockchalk

                                        meanCenter
                                         meanCenter

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

meanCenter selectively centers or standarizes variables in a regression model.
meanCenter选择性中心或standarizes的回归模型中的变量。


用法----------Usage----------


  meanCenter(model, centerOnlyInteractors = TRUE,
    centerDV = FALSE, standardize = FALSE)

  ## Default S3 method:
meanCenter(model,
    centerOnlyInteractors = TRUE, centerDV = FALSE,
    standardize = FALSE)



参数----------Arguments----------

参数:model
a fitted regression model (presumably from lm)
一个拟合回归模型(大概是从LM)


参数:centerOnlyInteractors
If false, all predictors in the regression data frame are centered before the regression is conducted.
如果为false,回归数据框中的所有预测都集中在回归前进行。


参数:centerDV
Should the dependent variable be centered?
如果因变量为中心?


参数:standardize
Instead of simply mean-centering the variables, should they also be "standardized" by first mean-centering and then dividing by the estimated standard deviation.
而不是简单地意味着定心的变量,它们也应该是“标准化”由第一意味着定心,然后再除以估计的标准偏差。


Details

详细信息----------Details----------

Mean-centering has often been recommended as a way to ameliorate multi-collinearity in regression models that include interaction terms (Aiken and West, 1991; Cohen, et al 2002). While this claim may have been mistaken (Echambadi and Hess, 2007), mean-centering is still widely practiced.  This function facilitates comparison of mean-centered models with others by automatically re-calculating centered variables.  The defaults will cause a regression's numeric interactive variables to be mean centered. That is to say, if an interaction x1:x2 is present in the model, then x1 and x2 are replaced by (m1-mean(m1)) and (m2-mean(m2) in all of the terms in which they appear in the model (the main effect and the interaction).  If one wants all predictors to be centered, the option centerOnlyInteractors should be set to FALSE. The dependent variable will not be centered, unless the user explicitly requests it by setting centerDV = TRUE. The centered variables can be standardized (optionally, of course).
平均定心经常被推荐的一种方式,以改善多重共线性回归模型,包括互动的条款(艾肯和西部,1991年,Cohen等人2002年)。虽然这种说法可能会被误认为(Echambadi和Hess,2007年),平均定心仍然是普遍的做法。此功能有利于自动重新计算为中心的变量的平均值为中心的模型与他人的比较。默认值将导致一个回归的数字交互变量是中心。也就是说,如果一个相互作用×1:x2是本模型中,然后x1和x2所取代(m1个均值(m1)的)和(平方米均值(平方米)在它们出现的位置的所有的条款如果一个人想集中所有的预测模型(主效应和互动)。选项“centerOnlyInteractors应被设置为FALSE。不会为中心的因变量,除非用户明确要求通过设置centerDV = TRUE。中心的变量可以被标准化(可选,当然)。


值----------Value----------

A regression model of the same type as the input model, with attributes representing the names of the centered variables.
回归模型的输入模型的相同的类型,与代表居中变量名称的属性。


(作者)----------Author(s)----------



Paul E. Johnson <pauljohn@ku.edu>




参考文献----------References----------

Testing and Interpreting Interactions. Newbury Park, Calif: Sage Publications.
(2002). Applied Multiple Regression/Correlation Analysis for the Behavioral Sciences (Third.). Routledge Academic.
Does Not Alleviate Collinearity Problems in Moderated Multiple Regression Models. Marketing Science, 26(3), 438-445.

参见----------See Also----------

lmres
lmres


实例----------Examples----------



library(rockchalk)
N <- 100
dat <- genCorrelatedData(N=N, means=c(100,200), sds=c(20,30), rho=0.4, stde=10)
dat$x3 <- rnorm(100, m=40, s=4)

m1 <- lm(y ~ x1 * x2 + x3, data=dat)
summary(m1)
mcDiagnose(m1)

m1c <- meanCenter(m1)
summary(m1c)
mcDiagnose(m1c)

m2 <- lm(y ~ x1 * x2 + x3, data=dat)
summary(m2)
mcDiagnose(m2)

m2c <- meanCenter(m2, standardize = TRUE)
summary(m2c)
mcDiagnose(m2c)

m2c2 <- meanCenter(m2, centerOnlyInteractors = FALSE)
summary(m2c2)

m2c3 <- meanCenter(m2, centerOnlyInteractors = FALSE, centerDV = TRUE)
summary(m2c3)

dat <- genCorrelatedData(N=N, means=c(100,200), sds=c(20,30), rho=0.4, stde=10)
dat$x3 <- rnorm(100, m=40, s=4)
dat$x3 <- gl(4, 25, labels=c("none","some","much","total"))

m3 <- lm(y ~ x1 * x2 + x3, data=dat)
summary(m3)
## visualize, for fun[#可视化,为乐趣]
plotPlane(m3, "x1", "x2")

m3c1 <- meanCenter(m3)
summary(m3c1)

## Not exactly the same as a "standardized" regression because the[#不完全一样的一个“标准化”的回归,因为]
## interactive variables are centered in the model frame,[#交互变量都集中在模型框架,]
## and the term "x1:x2" is never centered again.[#和术语“X1:X2”从未中心再次。]
m3c2 <- meanCenter(m3, centerDV=TRUE, centerOnlyInteractors=FALSE, standardize=TRUE)
summary(m3c2)

m3st <- standardize(m3)
summary(m3st)

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2024-11-25 12:33 , Processed in 0.024480 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表