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

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

[复制链接]
发表于 2012-10-1 10:46:48 | 显示全部楼层 |阅读模式
tmle(tmle)
tmle()所属R语言包:tmle

                                        Targeted Maximum Likelihood Estimation
                                         有针对性的最大似然估计

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

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

Targeted maximum likelihood estimation of parameters of a marginal structural model, and of marginal treatment effects of a binary point treatment on an outcome. In addition to the additive treatment effect, risk ratio and odds ratio estimates are reported for binary outcomes. The tmle function is generally called with arguments (Y,A,W), where  Y is a continuous or binary outcome variable, A is a binary treatment variable, (A=1 for treatment, A=0 for control), and W is a matrix or dataframe of baseline covariates. The population mean outcome is calculated when there is no variation in A. If values of binary mediating variable Z are supplied, estimates are returned at each level of Z. Missingness in the outcome is accounted for in the estimation procedure if missingness indicator Delta is 0 for some observations.  Repeated measures can be identified using the id argument.
有针对性的最大似然估计的边际结构模型的参数,和一个二进制点治疗的结果边际的治疗效果。除了添加剂的治疗效果,风险比和赔率比估计二元结果报告。一般被称为带参数的tmle,其中(Y,A,W)是连续的或二进制的结果变量,Y是一个二进制处理变量,(AA=1函数治疗,A=0控制),和W是一个矩阵或数据框的基线协变量。人口平均计算结果时,有没有变化A。如果中介变量的二进制值Z提供,估计将返回在每个级别Z。 Missingness的结果就是占估计过程中,如果missingness指标Delta为0的一些意见。 id使用参数,可以识别重复测量。


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


tmle(Y, A, W, Z=NULL, Delta = rep(1,length(Y)), Q = NULL, Q.Z1 = NULL, Qform = NULL,
     Qbounds = NULL, Q.SL.library = c("SL.glm", "SL.step", "SL.glm.interaction"),  
     cvQinit = FALSE, g1W = NULL, gform = NULL, gbound = 0.025,  pZ1=NULL, g.Zform = NULL,
     pDelta1 = NULL, g.Deltaform = NULL,
     g.SL.library = c("SL.glm", "SL.step", "SL.glm.interaction"),
     family = "gaussian", fluctuation = "logistic", alpha = 0.995, id=1:length(Y),
     verbose = FALSE)



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

参数:Y
continuous or binary outcome variable
连续或二进制结果变量


参数:A
binary treatment indicator, 1 - treatment, 0 - control
二进制处理指标,1  - 治疗,0  - 控制


参数:W
vector, matrix, or dataframe containing baseline covariates
包含基线协变量的向量,矩阵或数据框


参数:Z
optional binary indicator for intermediate covariate for conrolled direct effect estimation
可选的二进制指示器中间协conrolled直接影响估计


参数:Delta
indicator of missing outcome or treatment assignment.  1 - observed, 0 - missing
失踪的结果或处理分配指标。 1“ - 观察,0  - 失踪


参数:Q
optional nx2 matrix of initial values for Q portion of the likelihood, (E(Y|A=0,W), E(Y|A=1,W))
可选的nx2矩阵的初始值Q部分的可能性,(E(Y|A=0,W), E(Y|A=1,W))


参数:Q.Z1
optional nx2 matrix of initial values for Q portion of the likelihood, (E(Y|Z=1,A=0,W), E(Y|Z=1,A=1,W)). (When specified, values for E(Y|Z=0,A=0,W), E(Y|Z=0,A=1,W) are passed in using the Q argument
可选nx2矩阵的初始值Q部分的可能性,(E(Y|Z=1,A=0,W), E(Y|Z=1,A=1,W))的。 (如果指定的值E(Y|Z=0,A=0,W), E(Y|Z=0,A=1,W)Q使用参数传递


参数:Qform
optional regression formula for estimation of E(Y|A,W), suitable for call to glm
可选的回归公式估计E(Y|A,W),适合呼叫glm的


参数:Qbounds
vector of upper and lower bounds on Y and predicted values for initial Q. Defaults to the range of Y, widened by 10% of the min and max values.
向量的上界和下界Y和预测值的初始Q。默认值的范围Y的,扩大了10%的最小值和最大值。


参数:Q.SL.library
optional vector of prediction algorithms to use for SuperLearner estimation of initial Q
可选的矢量预测算法使用SuperLearner估计的初始Q


参数:cvQinit
logical, if TRUE, estimates cross-validated predicted values using discrete super learning, default=FALSE
逻辑,如果TRUE,估计交叉验证的预测值离散超级学习,默认值=FALSE


参数:g1W
optional vector of conditional treatment assingment probabilities, P(A=1|W)
可选的矢量有条件的的治疗assingment概率,P(A=1|W)


参数:gform
optional regression formula of the form A~W, if specified this overrides the call to SuperLearner
可选的回归公式的形式A~W,如果指定覆盖调用SuperLearner


参数:gbound
value between (0,1) for truncation of predicted probabilities. See Details section for more information
截断的预测概率的值(0,1)之间。 Details部分获取更多信息


参数:pZ1
optionalnx2 matrix of conditional probabilities P(Z=1|A=0,W), P(Z=1|A=1,W)  
可选的nx2的条件概率矩阵P(Z=1|A=0,W), P(Z=1|A=1,W)


参数:g.Zform
optionalregression formula of the form Z~A+W, if specified this overrides the call to SuperLearner  
optionalregression公式的形式Z~A+W,如果指定覆盖调用SuperLearner


参数:pDelta1
optional matrix of conditional probabilities for missingness mechanism, nx2 when Z is NULL P(Delta=1|A=0,W), P(Delta=1|A=1,W). nx4 otherwise, P(Delta=1|Z=0,A=0,W), P(Delta=1|Z=0,A=1,W), P(Delta=1|Z=1,A=0,W), P(Delta=1|Z=1,A=1,W)
可选的矩阵条件概率missingness机制,nx2:Z是NULLP(Delta=1|A=0,W), P(Delta=1|A=1,W)。 nx4否则,P(Delta=1|Z=0,A=0,W), P(Delta=1|Z=0,A=1,W), P(Delta=1|Z=1,A=0,W), P(Delta=1|Z=1,A=1,W)


参数:g.Deltaform
optional regression formula of the form Delta~A+W, if specified this overrides the call to SuperLearner
可选的回归公式的形式Delta~A+W,如果指定覆盖调用SuperLearner


参数:g.SL.library
optional vector of prediction algorithms to use for SuperLearner estimation of g1W or pDelta1  
可选的向量预测算法用于SuperLearnerg1W或pDelta1估计


参数:family
family specification for working regression models, generally "gaussian" for continuous outcomes (default), "binomial" for binary outcomes
系列规范工作回归模型,一般连续结果(默认)“高斯”,“二项式”二元结果


参数:fluctuation
"logistic" (default), or "linear"
“MF”(默认),或“线性”


参数:alpha
used to keep predicted initial values bounded away from (0,1) for logistic fluctuation
后勤波动用来保持界的距离预测的初始值(0,1)


参数:id
optional subject identifier
选修科目标识符


参数:verbose
status messages printed if set to TRUE (default=FALSE)
状态消息时,本机设置为TRUE(默认值=FALSE)


Details

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

gbounds defaults to (0.025, 0.975) for treatment effect estimates. If only one value is provided,  symmetric truncation levels are assumed. Bounds default to (0.025, 1) for estimating the population mean outcome.  
gbounds默认为(0.025,0.975),治疗效果的估计。如果只设置一个值,假设对称截断水平。界默认为(0.025,1)用于估计人口平均结果。

W should only contain covariates that are factors when Super Learner is not used to estimate Q or g.
W应该只包含协变量的因素时Super Learner不是用来估计Q或g。

Controlled direct effects are estimated when binary covariate Z is non-null. The tmle function returns an object of class tmle.list, a list of two items of class tmle.  The first corresponds to estimates obtained when Z is fixed at 0, the second correspondes to estimates obtained when Z is fixed at 1.
控制直接影响时,估计二进制协Z非空。 tmle函数返回一个对象类tmle.list,类tmle两个项目的列表。时的估计取得的第一个对应Z被固定在0,估计获得的第二correspondesZ固定在1。

Q.SL.library defaults to ("SL.glm", "SL.step", "SL.glm.interaction")
Q.SL.library默认为(SL.glm“,”SL.step“,”SL.glm.interaction)

g.SL.library Defaults to ("SL.glm", "SL.step", "SL.glm.interaction")
g.SL.library默认值 - (SL.glm“,”SL.step“,”SL.glm.interaction)

This choice is simply because these algorithms are included in the base R installation. See SuperLearner help files for further information.
此的选择是简单的,因为这些算法都包含在碱基R安装。请参阅SuperLearner的帮助文件的详细信息,。


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


参数:estimates
list with elements EY1 (population mean), ATE (additive treatment effect), RR (relative risk), OR (odds ratio). Each element in the estimates of these is itself a list containing   
列表的元素EY1(人口意思),自动测试设备(ATE)(添加剂的治疗效果),相对危险度(RR),OR(比值比)。这些估计中的每个元素本身就是一个列表,其中包含

psi - parameter estimate   
PSI  - 参数估计;

pvalue - two-sided p-value  
P值 - 双面p值

CI - 95% confidence interval  
CI  -  95%的置信区间

var.psi - Influence-curve based variance of estimate (ATE parameter only)  
var.psi  - 影响曲线的方差估计值(ATE参数)

log.psi - Parameter estimate on log scale (RR and OR parameters)  
log.psi  - 对数标度(RR或参数)的参数估计

var.log.psi - Influence-curve based variance of estimate on log scale (RR and OR parameters)  </ul>
var.log.psi  - 影响曲线的方差估计对数标度(RR或参数)</ UL>


参数:Qinit
initial estimate of Q. Qinit$coef are the coefficients for a glm model for Q, if applicable.  Qinit$Q is an nx2 matrix, where n is the number of observations.  Columns contain predicted values for Q(0,W),Q(1,W) using the initial fit.  Qinit$type is method for estimating Q
初步估计的Q。 Qinit$coef是一个glm模型Q,如果适用的系数。 Qinit$Q是nx2矩阵,其中n的若干意见。列中包含的预测值Q(0,W),Q(1,W)使用初始的配合。 Qinit$type是方法估计Q


参数:Qstar
targeted estimate of Q, an nx2 matrix with predicted values for Q(0,W), Q(1,W) using the updated fit
有针对性的估计Q,nx2 Q(0,W), Q(1,W)使用更新的合适的预测值矩阵


参数:g
treatment mechanism estimate. A list with three items: g$g1W contains estimates of P(A=1|W) for each observation, g$coef the coefficients for the model for g when glm used, g$type estimation procedure
治疗机理的估计。三个项目:g$g1W估计P(A=1|W)每个观察,g$coef系数的模型g当glm使用,<X列表>估计程序


参数:g.Z
intermediate covariate assignment estimate (when applicable). A list with three items: g.Z$g1W an nx2 matrix containing values of P(Z=1|A=1,W), P(Z=1|A=0,W) for each observation, g.Z$coef the coefficients for the model for g when glm used, g.Z$type estimation procedure
中间的的协变量赋值估计(如适用)。三个项目:g.Z$g1Wnx2基质中含有值P(Z=1|A=1,W), P(Z=1|A=0,W)每个观察,g.Z$coef系数的模型g<X列表>使用,glm估计程序


参数:g.Delta
missingness mechanism estimate. A list with three items: g.Delta$g1W an nx4 matrix containing values of P(Delta=1|Z,A,W) for each observation, with (Z=0,A=0), (Z=0,A=1), (Z=1,A=0),(Z=1,A=1). (When Z is NULL, columns 3 and 4 are duplicates of 1 and 2.) g.Delta$coef the coefficients for the model for g when glm used, g.Delta$type estimation procedure
missingness机制的估计。有三个项目的列表:g.Delta$g1W nx4基质中含有值P(Delta=1|Z,A,W)每个观察,与(Z = 0,A = 0),(Z = 0,A = 1) ,(Z = 1,A = 0),(Z = 1,A = 1)。 (当Z是NULL,第3和第4列是重复的1和2)。g.Delta$coef系数的模型gglm使用, g.Delta$type估计程序


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


Susan Gruber <a href="mailto:sgruber@cal.berkeley.edu">sgruber@cal.berkeley.edu</a>, in collaboration with Mark van der Laan.



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








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

summary.tmle, estimateQ, estimateG, calcParameters, tmleMSM, calcSigma
summary.tmle,estimateQ,estimateG,calcParameters,tmleMSM,calcSigma


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


library(tmle)
  set.seed(1)
  n <- 250
  W <- matrix(rnorm(n*3), ncol=3)
  A <- rbinom(n,1, 1/(1+exp(-(.2*W[,1] - .1*W[,2] + .4*W[,3]))))
  Y <- A + 2*W[,1] + W[,3] + W[,2]^2 + rnorm(n)

# Example 1. Simplest function invocation [实施例1。最简单的函数调用]
# SuperLearner called to estimate Q, g[SuperLearner称为估计Q,G]
# Delta defaults to 1 for all observations   [Delta区域的所有观测值默认为1]
  result1 <- tmle(Y,A,W)
  summary(result1)

# Example 2: [实施例2:]
# User-supplied regression formulas to estimate Q and g[用户提供的回归公式估计Q和G]
# binary outcome[二进制结果]
# n &lt;- 250[N < -  250]
  W <- matrix(rnorm(n*3), ncol=3)
  colnames(W) <- paste("W",1:3, sep="")
  A <- rbinom(n,1, plogis(0.6*W[,1] +0.4*W[,2] + 0.5*W[,3]))
  Y <- rbinom(n,1, plogis(A + 0.2*W[,1] + 0.1*W[,2] + 0.2*W[,3]^2 ))
  result2 <- tmle(Y,A,W, family="binomial", Qform=Y~A+W1+W2+W3, gform=A~W1+W2+W3)
  summary(result2)

# Example 3: Population mean outcome[例3:人口平均结果]
# User-supplied (misspecified) model for Q, [用户提供的Q模型(误设),]
# Super learner called to estimate g, g.Delta[超级学习者称为估计克,g.Delta]
# approx. 20% missing at random[约。 20%的随机缺失]
  Y <- W[,1] + W[,2]^2 + rnorm(n)
  Delta <- rbinom(n, 1, 1/(1+exp(-(1.7-1*W[,1]))))
  result3 <- tmle(Y,A=NULL,W, Delta=Delta, Qform="Y~A+W1+W2+W3")
  print(result3)

# Example 4: Controlled direct effect[例4:控制直接影响]
# User-supplied models for g, g.Z[用户提供的型号为g,g.Z]
  A <- rbinom(n,1,.5)
  Z <- rbinom(n, 1, plogis(.5*A + .1*W[,1]))
  Y <- 1 + A + 10*Z + W[,1]+ rnorm(n)
  
  CDE <- tmle(Y,A,W, Z, gform="A~1", g.Zform = "Z ~ A + W1")
  total.effect <- tmle(Y,A, W,  gform="A~1")
  print(CDE)
  print(total.effect)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-30 20:33 , Processed in 0.031372 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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