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

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

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

                                       
                                         

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

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

Targeted maximum likelihood estimation of the parameter of a marginal structural model (MSM) for binary point treatment effects. The tmleMSM function is minimally called with arguments (Y,A,W, MSM), 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. MSM is a valid regression formula for regressing Y on any combination of A, V, W, T, where V defines strata and T represents the time at which repeated measures on subjects are made.  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.
有针对性的最大似然估计的参数的边际结构模型(MSM)的二进制点的治疗效果。 tmleMSM,这里(Y,A,W, MSM)是连续或二进制结果变量,Y是一个二进制处理变量(A,A=1函数调用参数最小治疗,A=0控制),和W是一个矩阵或数据框的基线协变量。 MSM是一个有效的回归公式回归Y的任意组合A, V, W, T,其中V定义阶层和T的时间重复措施的主题。 Missingness的结果就是占估计过程中,如果missingness指标Delta为0的一些意见。 id使用参数,可以识别重复测量。


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


tmleMSM(Y, A, W, V, T = rep(1,length(Y)), Delta = rep(1, length(Y)), MSM,
        v = NULL, Q = NULL, Qform = NULL, Qbounds = c(-Inf, Inf),
        Q.SL.library = c("SL.glm", "SL.step", "SL.glm.interaction"),
        cvQinit = FALSE, hAV = NULL, hAVform = NULL, g1W = NULL,
        gform = NULL, pDelta1 = NULL, g.Deltaform = NULL,
        g.SL.library = c("SL.glm", "SL.step", "SL.glm.interaction"),
        ub = 1/0.025, family = "gaussian", fluctuation = "logistic",
        alpha  = 0.995, id = 1:length(Y), inference = TRUE, 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. Factors are not currently allowed.
包含基线协变量的向量,矩阵或数据框。目前尚未允许因素。


参数:V
vector, matrix, or dataframe of covariates used to define strata
用于确定地层的协变量的向量,矩阵或数据框


参数:T
optional time for repeated measures data
可选的时间重复测量数据


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


参数:MSM
MSM of interest, specified as valid right hand side of a regression formula (see examples)
男男性接触者的利益,指定为有效右手边的回归公式(参见示例)


参数:v
optional value defining the strata of interest (V=v) for stratified estimation of MSM parameter
可选的价值为分层的MSM参数估计的定义各阶层的利益(V=v)


参数: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))


参数: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
矢量的Y值和预测值的上限和下限,用于初始Q


参数: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


参数:hAV
optional nx2 matrix used in numerator of weights for updating covariate and the influence curve. If unspecified, defaults to conditional probabilities P(A=1|V) or P(A=1|T), for repeated measures data. For unstabilized weights, pass in an nx2 matrix of all 1s
可选的nx2基质分子的权重更新协变量的影响曲线。如果未指定,则默认为条件概率P(A=1|V)或P(A=1|T),重复测量数据。对于不稳定的权重,通过在nx2矩阵的所有1s


参数:hAVform
optionalregression formula of the form A~V+T, if specified this overrides the call to SuperLearner  
optionalregression公式的形式A~V+T,如果指定覆盖调用SuperLearner


参数: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


参数:pDelta1
optional nx2 matrix of conditional probabilities for missingness mechanism,P(Delta=1|A=0,V,W,T), P(Delta=1|A=1,V,W,T).  
可选的nx2missingness机制的条件概率矩阵,P(Delta=1|A=0,V,W,T), P(Delta=1|A=1,V,W,T)。


参数: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估计


参数:ub
upper bound on observation weights. See Details section for more information
观察权重的上界。 Details部分获取更多信息


参数: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
选修科目标识符


参数:inference
if TRUE, variance-covariance matrix, standard errors, pvalues, and 95% confidence intervals are calculated. Setting to FALSE saves a little time when bootstrapping.
如果TRUE,方差 - 协方差矩阵,标准的错误,pvalues,和95%的置信区间的计算。设置为false,在引导时节省一点时间。


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


Details

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

ub bounds the IC by bounding the factor h(A,V)/[g(A,V,W)P(Delta=1|A,V,W)] between 0 and ub, default value = 1/0.025.
ub限定IC边界的因素h(A,V)/[g(A,V,W)P(Delta=1|A,V,W)]0ub,默认值= 1/0.025。

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----------


参数:psi
MSM parameter estimate  
MSM参数估计


参数:sigma
variance covariance matrix
方差协方差矩阵


参数:se
standard errors extracted from sigma
提取西格玛的标准误差


参数:pvalue
two-sided p-value
双面的p-值


参数:lb
lower bound on 95% confidence interval
在95%的置信区间的下界


参数:ub
upper bound on 95% confidence interval
在95%的置信区间的上限


参数:epsilon
fitted value of epsilon used to target initial Q
拟合值的ε目标初始Q


参数:psi.Qinit
MSM parameter estimate based on untargeted initial Q
基于MSM参数估计的不相关的初始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)使用更新的合适的预测值矩阵


参数: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


参数: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.AV
estimate for h(A,V) or h(A,T). A list with three items: g.AV$g1W an nx2 matrix containing values of P(A=0|V,T), P(A=1|V,T) for each observation, g.AV$coef the coefficients for the model for g when glm used, g.AV$type estimation procedure
估计为h(A,V)或h(A,T)。三个项目:g.AV$g1Wnx2基质中含有值P(A=0|V,T), P(A=1|V,T)每个观察,g.AV$coef系数的模型g<X列表>使用,glm估计程序


参数:g_Delta
missingness mechanism estimate. A list with three items: g_Delta$g1W an nx2 matrix containing values of P(Delta=1|A,V,W,T) for each observation, g_Delta$coef the coefficients for the model for g when glm used, g_Delta$type estimation procedure
missingness机制的估计。三个项目:g_Delta$g1Wnx2基质中含有值P(Delta=1|A,V,W,T)每个观察,g_Delta$coef系数的模型g<X列表>使用,glm估计程序


(作者)----------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.tmleMSM, estimateQ, estimateG, calcSigma, tmle
summary.tmleMSM,estimateQ,estimateG,calcSigma,tmle


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


library(tmle)
# Example 1. Estimating MSM parameter with correctly specified regression formulas[实施例1。估计MSM参数,正确指定的回归公式]
# MSM: psi0 + psi1*A + psi2*V + psi3*A*V  (saturated)[MSM:Psi0成为+ PSI1 * A + PSI2 * V + psi3 * A * V(饱和)]
# true parameter value: psi = (0, 1, -2, 0.5) [真正的参数值:psi的=(0,-1,-2,0.5)]
# generate data[生成数据]
  set.seed(100)
  n <- 1000
  W <- matrix(rnorm(n*3), ncol = 3)
  colnames(W) <- c("W1", "W2", "W3")
  V <- rbinom(n, 1, 0.5)
  A <- rbinom(n, 1, 0.5)
  Y <- rbinom(n, 1, plogis(A - 2*V + 0.5*A*V))
  result.ex1 <- tmleMSM(Y, A, W, V, MSM = "A*V", Qform = Y~., gform = A~1,
                        hAVform = A~1, family = "binomial")
  print(result.ex1)

# Example 2. Repeated measures data, two observations per id[实施例2。重复测量数据,观察每个ID]
# (e.g., crossover study design)[(例如,交叉研究,设计)]
# MSM: psi0 + psi1*A + psi2*V + psi3*V^2 + psi4*T[MSM:Psi0成为PSI1 * A + PSI2 * V + psi3 * V ^ 2 + psi4 * T]
# true parameter value: psi = (-2, 1, 0, 3, 0 )[真正的参数值:psi的=(-2,1,0,3,0)]
# generate data in wide format (id,  W1, Y(t),  W2(t), V(t), A(t)) [宽屏幕格式生成数据(身份证,Y(T),W1,W2(T),V(T),A(T))]
   set.seed(100)
   n <- 500
   id <- rep(1:n)
   W1   <- rbinom(n, 1, 0.5)
   W2.1 <- rnorm(n)
   W2.2 <- rnorm(n)  
   V.1   <- rnorm(n)  
   V.2   <- rnorm(n)
   A.1 <- rbinom(n, 1, plogis(0.5 + 0.3 * W2.1))
   A.2 <- 1-A.1
   Y.1  <- -2 + A.1 - 2*V.1^2 + W2.1 + rnorm(n)
   Y.2  <- -2 + A.2 - 2*V.2^2 + W2.2 + rnorm(n)
   d <- data.frame(id, W1, W2=W2.1, W2.2, V=V.1, V.2, A=A.1, A.2, Y=Y.1, Y.2)

# change dataset from wide to long format[从广角到长格式的更改数据集]
   longd <- reshape(d,
          varying = cbind(c(3, 5, 7, 9), c(4, 6, 8, 10)),
          idvar = "id",
          direction = "long",
          timevar = "T",
          new.row.names = NULL,
          sep = "")
# misspecified model for initial Q, partial misspecification for g[最初有Q误设模型,偏误设的g]
   result.ex2 <- tmleMSM(Y = longd$Y, A = longd$A, W = longd[,c("W1", "W2")], V = longd$V,
          T = longd$T, MSM = "A + V + I(V^2) + T", Qform = Y ~ A + V, gform = A ~ W2, id = longd$id)
   print(result.ex2)


# Example 3:  Introduce 20% missingness in example 2 data[例3:介绍20%missingness,例如2数据]
  Delta <- rbinom(nrow(longd), 1, 0.8)
  result.ex3 <- tmleMSM(Y = longd$Y, A = longd$A, W = longd[,c("W1", "W2")], V = longd$V, T=longd$T,
          Delta = Delta, MSM = "A + V + I(V^2) + T", Qform = Y ~ A + V, gform = A ~ W2,
          g.Deltaform = Delta~ 1, id=longd$id, verbose = TRUE)
  print(result.ex3)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-30 20:34 , Processed in 0.029146 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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