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

R语言 rms包 plot.xmean.ordinaly()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-27 19:13:00 | 显示全部楼层 |阅读模式
plot.xmean.ordinaly(rms)
plot.xmean.ordinaly()所属R语言包:rms

                                         Plot Mean X vs. Ordinal Y
                                         图均值X与序Ÿ

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

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

Separately for each predictor variable X in a formula, plots the mean of X vs. levels of Y.  Then under the proportional odds assumption, the expected value of the predictor for each Y value is also plotted (as a dotted line).  This plot is useful for assessing the ordinality assumption  for Y separately for each X, and for assessing the proportional odds assumption in a simple univariable way.  If several predictors do not distinguish adjacent categories of Y, those levels may need to be  pooled.  This display assumes that each predictor is linearly related to the log odds of each event in the proportional odds model.  There is also an option to plot the expected means assuming a forward continuation ratio model.
另外为预测变量X在公式中,图的平均X与水平Y。然后比例赔率假设下,预测为每个Y值的预期值也绘制(以虚线表示)。此图是非常有用的序数假设为Y分别评估每一个X,和评估的比例赔率假设在一个简单的单变量的方式。如果有多个的预测不区分相邻类别的Y,这些水平可能需要合并。显示假设每个预测变量的线性相关比例优势模型中每个事件的log几率。还有一个选项,绘制假设向前延续比例模型预期的手段。


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


## S3 method for class 'xmean.ordinaly'
plot(x, data, subset, na.action, subn=TRUE,
                    cr=FALSE, topcats=1, cex.points=.75, ...)



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

参数:x
an S formula.  Response variable is treated as ordinal.  For categorical predictors, a binary version of the variable is substituted, specifying whether or not the variable equals the modal category.  Interactions or non-linear effects are not allowed.  
公式。作为有序响应变量。对于分类预测,一个二进制版本的变量被取代,指定的变量是否等于模态类别。相互作用或非线性效应是不允许的。


参数:data
a data frame or frame number  
一个数据框或帧号码


参数:subset
vector of subscripts or logical vector describing subset of data to analyze  
向量下标或逻辑矢量描述子集的数据来分析


参数:na.action
defaults to na.keep so all NAs are initially retained.  Then NAs are deleted only for each predictor currently being plotted. Specify na.action=na.delete to remove observations that are missing on any of the predictors (or the response).  
默认为na.keep所以所有的NAS最初保留。 NAS的预测目前正在绘制中删除。指定na.action=na.delete删除的意见,即缺少任何的预测(或响应)。


参数:subn
set to FALSE to suppress a left bottom subtitle specifying the sample size used in constructing each plot  
设置为FALSE抑制左下角字幕指定的样本大小,每个小区建设


参数:cr
set to TRUE to plot expected values by levels of the response, assuming a forward continuation ratio model holds.  The function is fairly slow when this option is specified.  
设置为TRUE绘制预期值水平的响应,假设向前延续比例模型的保存。指定此选项时,该功能是相当慢的。


参数:topcats
When a predictor is categorical, by default only the proportion of observations in the overall most frequent category will be plotted against response variable strata.  Specify a higher value of topcats to make separate plots for the proportion in the k most frequent predictor categories, where k is min(ncat-1, topcats) and ncat is the number of unique values of the predictor.
时的预测是绝对的,默认情况下,只有在整体最频繁的类别比例的观测将绘制对响应变量地层。指定一个更高的值进行单独的topcats图的比例在k的最频繁的预测值类别,k是min(ncat-1, topcats)和ncat是多少独特的预测值。


参数:cex.points
if cr is TRUE, specifies the size of the "C" that is plotted.  Default is 0.75.
如果cr是TRUE,指定"C"绘制的大小。默认值是0.75。


参数:...
other arguments passed to plot and lines  </table>
其他参数传递给plot和lines</表>


副作用----------Side Effects----------

plots



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



Frank Harrell<br>
Department of Biostatistics<br>
Vanderbilt University<br>
f.harrell@vanderbilt.edu




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

an ordinal outcome. Stat in Med 17:909&ndash;44.

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

lrm, residuals.lrm, cr.setup, summary.formula, biVar.
lrm,residuals.lrm,cr.setup,summary.formula,biVar。


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


# Simulate data from a population proportional odds model[从人口比例优势模型的模拟数据]
set.seed(1)
n <- 400
age <- rnorm(n, 50, 10)
blood.pressure <- rnorm(n, 120, 15)
region <- factor(sample(c('north','south','east','west'), n, replace=TRUE))
L <- .2*(age-50) + .1*(blood.pressure-120)
p12 &lt;- plogis(L)    # Pr(Y&gt;=1)[镨(Y> = 1)]
p2  &lt;- plogis(L-1)  # Pr(Y=2)[镨(Y = 2)]
p   &lt;- cbind(1-p12, p12-p2, p2)   # individual class probabilites[个别类probabilites的]
# Cumulative probabilities:[累积概率:]
cp  <- matrix(cumsum(t(p)) - rep(0n-1), rep(3,n)), byrow=TRUE, ncol=3)
y   <- (cp < runif(n)) %*% rep(1,3)
# Thanks to Dave Krantz &lt;dhk@paradox.psych.columbia.edu&gt; for this trick[感谢戴夫·克兰茨<dhk@paradox.psych.columbia.edu>这一招]

par(mfrow=c(2,2))
plot.xmean.ordinaly(y ~ age + blood.pressure + region, cr=TRUE, topcats=2)
par(mfrow=c(1,1))
# Note that for unimportant predictors we don't care very much about the[请注意,对于不重要的预测,我们不很在乎的]
# shapes of these plots.  Use the Hmisc chiSquare function to compute[这些图的形状。使用的Hmisc的卡方函数来计算]
# Pearson chi-square statistics to rank the variables by unadjusted[Pearson卡方统计排名的变量未经调整]
# importance without assuming any ordering of the response:[但不承担任何顺序的响应的重要性:]
chiSquare(y ~ age + blood.pressure + region, g=3)
chiSquare(y ~ age + blood.pressure + region, g=5)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-24 11:36 , Processed in 0.026343 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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