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

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

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

                                         rms Special Transformation Functions
                                         RMS特殊的变换函数

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

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

This is a series of functions (asis, pol, lsp, rcs, catg, scored, strat, matrx, and %ia%) that set up special attributes  (such as knots and nonlinear term indicators) that are carried through to fits (using for example lrm,cph, ols, psm). anova.rms, summary.rms, Predict, survplot, fastbw, validate, specs,  which.influence, nomogram and latex.rms use these attributes to automate certain analyses (e.g., automatic tests of linearity for each predictor are done by anova.rms). Many of the functions are called implicitly.  Some S functions such as ns derive data-dependent transformations that are not "remembered" when predicted values are later computed, so the predictions will be incorrect. The functions listed here solve that problem.
这是一个系列的功能(asis,pol,lsp,rcs,catg,scored,strat, matrx和%ia%)设立的特殊属性(如结和非线性项指标的),到适合(例如使用lrm,cph,ols,psm)。 anova.rms,summary.rms,Predict,survplot,fastbw,validate,specs,which.influence,<所述>和nomogram使用这些属性来自动执行某些分析(如,对每个预测变量的线性自动测试完成latex.rms)。被称为隐式的许多功能。一些S的功能,如anova.rms产生依赖于数据的转换,没有“记忆”时,预测值后计算,这样的预测是不正确的。这里列出的功能解决了这个问题。

asis is the identity transformation, pol is an ordinary (non-orthogonal) polynomial, rcs is a linear tail-restricted cubic spline function (natural spline, for which the rcspline.eval function generates the design matrix and the presence of system option rcspc causes rcspline.eval to be invoked with pc=TRUE), catg is for a categorical variable, scored is for an ordered categorical variable, strat is for a stratification factor in a Cox model, matrx is for a matrix predictor, and %ia% represents restricted interactions in which products involving nonlinear effects on both variables are not included in the model.  asis, catg, scored, matrx are seldom invoked explicitly by the user (only to specify label or name, usually).
asis是身份的转变,pol是一个普通的(非正交)多项式,rcs是一个线性的尾部限制三次样条函数(自然花键,rcspline.eval :功能产生设计矩阵存在的系统选项rcspc导致rcspline.evalpc=TRUE被调用),catg是一个绝对的变量,scored是一个有序的分类变量,strat是分层因素的Cox比例风险模型,matrx是矩阵预测,%ia%代表限制的交互,其中涉及非线性的影响,同时不包含在模型中的变量。 asis, catg, scored, matrx很少被显式调用的用户(仅限于指定label或name,通常)。

In the list below, functions asis through strat can have arguments x, parms, label, name except that parms does not apply to asis, matrx, strat.
在下面的列表中,功能asis通过strat可以有参数x, parms, label, name除了parms不适用于asis, matrx, strat。


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


asis(\dots)
matrx(\dots)
pol(\dots)
lsp(\dots)
rcs(\dots)
catg(\dots)
scored(\dots)
strat(\dots)
%ia%(x1, x2)



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

asis(x, parms, label, name)
matrx(x, label, name)
pol(x, parms, label, name)
lsp(x, parms, label, name)
rcs(x, parms, label, name)
catg(x, parms, label, name)
scored(x, parms, label, name)
strat(x, label, name)
x1 %ia% x2



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

参数:x
a predictor variable (or a function of one).  If you specify e.g. pol(pmin(age,10),3), a cubic polynomial will be fitted in pmin(age,10) (pmin is the S vector element&ndash;by&ndash;element function). The predictor will be labeled age in the output, and plots with have age in its original units on the axes. If you use a function such as pmin, the predictor is taken as the first argument, and other arguments must be defined in the frame in effect when predicted values, etc., are computed.  
预测变量(或函数1)。如果您指定例如pol(pmin(age,10),3),三次多项式将被安装在pmin(age,10)(pminS向量元素的元素功能)。预测将被标记为age的输出,和图有age在其原单位的轴。如果您使用的功能,如pmin,作为第一个参数的预测,和其他的参数必须定义在帧中的效果时的预测值等,计算。


参数:parms
parameters of transformation (e.g. number or location of knots). For pol the argument is the order of the polynomial, e.g. 2 for quadratic (the usual default). For lsp it is a vector of knot locations (lsp will not estimate knot locations). For rcs it is the number of knots (if scalar), or vector of knot locations (if >2 elements). The default number is the nknots system option if parms is not given. If the number of knots is given, locations are computed for that number of knots. If system option rcspc is TRUE the parms vector has an attribute defining the principal components transformation parameters. For catg, parms is the category labels (not needed if variable is an S category or factor variable). If omitted, catg will use unique(x), or levels(x) if x is a category or a factor. For scored, parms is a vector of unique values of variable (uses unique(x) by default). This is not needed if x is an S ordered variable. For strat, parms is the category labels (not needed if variable is an S category variable). If omitted, will use unique(x), or levels(x) if x is category or factor. parms is not used for matrix.  
参数的转换(例如,数字或节的位置)。对于pol的说法是多项式的顺序,例如: 2二次(通常默认)。对于lsp的结位置(lsp不会估计结位置),是一个向量。对于rcs数的结(如果标),或矢量的结位置(如果>2元素)。默认数量为nknots系统parms如果没有给出选项。如果节数,位置,节点数计算。如果系统选项rcspc是TRUEparms向量有一个属性定义主成分变换参数。对于catg,parms是一类标签(如果不需要变量是S类或因素变量)。如果省略,catg使用unique(x)或levels(x):x是category或factor。对于scored,parms是一个向量的唯一值的变量(使用unique(x)默认情况下)。这是没有必要x如果Sordered变量。对于strat,parms是一类标签(如果不需要变量是S类变量)。如果省略,将使用unique(x)或levels(x)如果x是category或factor。 parms不用于matrix。


参数:label
label of predictor for plotting (default = "label" attribute or variable name)  
标签预测的图(默认="label"属性或变量名)


参数:name
Name to use for predictor in model. Default is name of argument to function  
名称使用的预测模型。默认值是参数,功能名称


参数:x1,x2
two continuous variables for which to form a non-doubly-nonlinear interaction
的连续的两个变量,以形成一个非双重非线性相互作用


参数:...
a variety of things
各种各样的事情


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



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




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

rcspline.eval, rcspline.restate, rms, cph, lrm, ols, datadist
rcspline.eval,rcspline.restate,rms,cph,lrm,ols,datadist


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


## Not run: [#不运行:]
options(knots=4, poly.degree=2)
country <- factor(country.codes)
blood.pressure <- cbind(sbp=systolic.bp, dbp=diastolic.bp)
fit <- lrm(Y ~ sqrt(x1)*rcs(x2) + rcs(x3,c(5,10,15)) +
       lsp(x4,c(10,20)) + country + blood.pressure + poly(age,2))
# sqrt(x1) is an implicit asis variable, but limits of x1, not sqrt(x1)[SQRT(X1)是一个隐式的的ASIS变量,但限制为x1,SQRT(X1)]
#       are used for later plotting and effect estimation[用于日后策划和效果评估]
# x2 fitted with restricted cubic spline with 4 default knots[X2配备了限制三次样条的默认设置为4节]
# x3 fitted with r.c.s. with 3 specified knots[X3配备了r.c.s. 3个指定的节]
# x4 fitted with linear spline with 2 specified knots[X4线性样条配有2个指定的节]
# country is an implied catg variable[国家一个隐含的CATG变量]
# blood.pressure is an implied matrx variable[blood.pressure是一个隐含的matrx变量]
# since poly is not an rms function (pol is), it creates a[自聚是一个的RMS功能(POL),它创建了一个]
#       matrx type variable with no automatic linearity testing[matrx类型的变量没有自动线性测试]
#       or plotting[或绘图]
f1 <- lrm(y ~ rcs(x1) + rcs(x2) + rcs(x1) %ia% rcs(x2))
# %ia% restricts interactions. Here it removes terms nonlinear in[%IA%限制的相互作用。在这里,它消除了非线性的条款]
# both x1 and x2[x1和x2]
f2 <- lrm(y ~ rcs(x1) + rcs(x2) + x1 %ia% rcs(x2))
# interaction linear in x1[互动线性在X1]
f3 <- lrm(y ~ rcs(x1) + rcs(x2) + x1 %ia% x2)
# simple product interaction (doubly linear)[简单的产品互动(双线性)]
# Use x1 %ia% x2 instead of x1:x2 because x1 %ia% x2 triggers[因为X1%IA%X2触发,使用X1%IA%X2,而不是X1:X2]
# anova to pool x1*x2 term into x1 terms to test total effect[ANOVA池X1 * X2术语到X1条款,测试总的影响]
# of x1[为x1]

## End(Not run)[#(不执行)]

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-23 17:19 , Processed in 0.025172 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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