survdiff(survival)
survdiff()所属R语言包:survival
Test Survival Curve Differences
测试生存曲线差异
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Tests if there is a difference between two or more survival curves using the G-rho family of tests, or for a single curve against a known alternative.
测试,如果有两个或两个以上的生存率G-rho家庭测试,使用曲线或针对一个已知的替代单曲线之间的差异。
用法----------Usage----------
survdiff(formula, data, subset, na.action, rho=0)
参数----------Arguments----------
参数:formula
a formula expression as for other survival models, of the form Surv(time, status) ~ predictors. For a one-sample test, the predictors must consist of a single offset(sp) term, where sp is a vector giving the survival probability of each subject. For a k-sample test, each unique combination of predictors defines a subgroup. A strata term may be used to produce a stratified test. To cause missing values in the predictors to be treated as a separate group, rather than being omitted, use the strata function with its na.group=T argument.
作为其他生存模型的公式表达形式Surv(time, status) ~ predictors。对于一个样本测试,预测必须由单一offset(sp)一词,其中sp是一个向量,使每个科目的生存概率。对于K-样本测试,每一个独特的组合预测定义一个分组。一个strata长期可用于产生分层测试。造成失踪的预测值被作为一个单独的组,而不是被忽略,处理,使用strata函数na.group=T参数。
参数:data
an optional data frame in which to interpret the variables occurring in the formula.
在解释发生在公式中的变量,可选的数据框。
参数:subset
expression indicating which subset of the rows of data should be used in the fit. This can be a logical vector (which is replicated to have length equal to the number of observations), a numeric vector indicating which observation numbers are to be included (or excluded if negative), or a character vector of row names to be included. All observations are included by default.
表达式,表示应在适合使用的数据行的一个子集。这可以是一个逻辑向量(复制到长度相等的若干意见),被列入(或负除外),或特征向量的行名被列入观察数字数字矢量。所有的意见,包括默认情况下。
参数:na.action
a missing-data filter function. This is applied to the model.frame after any subset argument has been used. Default is options()$na.action.
丢失数据的过滤功能。这是适用于后的任何一个子集参数已用于model.frame。默认options()$na.action。
参数:rho
a scalar parameter that controls the type of test. </table>
一个标量参数,控制测试的类型。 </ TABLE>
值----------Value----------
a list with components:
一个组件的列表:
参数:n
the number of subjects in each group.
各组科目。
参数:obs
the weighted observed number of events in each group. If there are strata, this will be a matrix with one column per stratum.
加权观测数在各组的活动。如果有地层,这将是一个与每个阶层的一列的矩阵。
参数:exp
the weighted expected number of events in each group. If there are strata, this will be a matrix with one column per stratum.
加权预计每个组中的事件。如果有地层,这将是一个与每个阶层的一列的矩阵。
参数:chisq
the chisquare statistic for a test of equality.
卡方统计为一个平等的测试。
参数:var
the variance matrix of the test.
测试方差矩阵。
参数:strata
optionally, the number of subjects contained in each stratum. </table>
可选的科目数目载于各阶层。 </ TABLE>
方法----------METHOD----------
This function implements the G-rho family of Harrington and Fleming (1982), with weights on each death of S(t)^rho, where S is the Kaplan-Meier estimate of survival. With rho = 0 this is the log-rank or Mantel-Haenszel test, and with rho = 1 it is equivalent to the Peto & Peto modification of the Gehan-Wilcoxon test.
此功能的实现与哈灵顿和弗莱明(1982)的G-Rho家族,重量每死亡S(t)^rho,其中S是生存的Kaplan-Meier估计。 rho = 0这是对数秩或Mantel-Haenszel检验,用rho = 1它是相当于皮托和皮托修改Gehan Wilcoxon检验。
If the right hand side of the formula consists only of an offset term, then a one sample test is done. To cause missing values in the predictors to be treated as a separate group, rather than being omitted, use the factor function with its exclude argument.
如果公式的右侧只包括长期偏移,然后完成一个样品的测试。造成失踪的预测值被作为一个单独的组,而不是被忽略,处理,使用factor函数exclude参数。
参考文献----------References----------
A class of rank test procedures for censored survival data. Biometrika
举例----------Examples----------
## Two-sample test[#两个样本测试]
survdiff(Surv(futime, fustat) ~ rx,data=ovarian)
## Stratified 7-sample test[#分层7样品测试]
survdiff(Surv(time, status) ~ pat.karno + strata(inst), data=lung)
## Expected survival for heart transplant patients based on[#预期基础上的心脏移植患者的生存]
## US mortality tables[#美国死亡率表]
expect <- survexp(futime ~ ratetable(age=(accept.dt - birth.dt),
sex=1,year=accept.dt,race="white"), jasa, cohort=FALSE,
ratetable=survexp.usr)
## actual survival is much worse (no surprise)[#实际的生存是差很多(难怪)]
survdiff(Surv(jasa$futime, jasa$fustat) ~ offset(expect))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|