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

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

[复制链接]
发表于 2012-9-29 22:24:52 | 显示全部楼层 |阅读模式
fitSBSA(SBSA)
fitSBSA()所属R语言包:SBSA

                                        Fitting Simplified Bayesian Sensitivity Models
                                         配件简化贝叶斯灵敏度

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

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

Conducts sensitivity analysis over a model involving
一个模型进行敏感度分析


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


    cor.alpha=0, sd.alpha=1e+06, nrep=5000,
    sampler.jump=c(alpha=.15, beta.z=.1, sigma.sq=.5, tau.sq=.05,
                   beta.u.gamma.x=.3, gamma.z=.15),



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

参数:y
a vector of outcomes
结果的矢量


参数:x
a (standardized) vector of exposures
(标准化)向量的风险


参数:w
a (standardized) matrix of noisy measurements
矩阵的噪声测量(标准化)


参数:a
parameter of the prior for magnitude of measurement error on confounder Z_j
事先测量误差的大小参数上的混杂因素Z_j


参数:b
parameter of the prior for magnitude of measurement error on confounder Z_j
事先测量误差的大小参数上的混杂因素Z_j


参数:k2
(optional) magnitude of prior uncertainty about (U|X, Z) regression coefficients
(可选)(U|X, Z)的回归系数前的不确定性程度


参数:el2
(optional) residual variance for (U|X, Z)
(可选)剩余方差为(U|X, Z)


参数:cor.alpha
(optional) value of the ρ parameter of the bivariate normal prior for α
(可选)前值的ρ参数的二元正常的α


参数:sd.alpha
(optional) value of the σ parameter of the bivariate normal prior for α
(可选)前值的σ参数的二元正常的α


参数:nrep
number of MCMC steps
MCMC中的步骤数


参数:sampler.jump
named vector of standard deviation of   
指定的标准偏差矢量

alpha jump for block reparametrizing α  
alpha跳了块reparametrizing α

beta.z jump for block reparametrizing β_z  
beta.z跳了块reparametrizing β_z

sigma.sq (continuous case only) jump for block reparametrizing σ^2  
sigma.sq(连续情况下)跳块reparametrizing σ^2

tau.sq jump for block reparametrizing τ^2  
tau.sq跳了块reparametrizing τ^2

beta.u.gamma.x jump for block reparametrizing β_u and γ_z  
beta.u.gamma.x跳了块reparametrizingβ_u和γ_z

gamma.z jump for block reparametrizing &gamma;_z  </ul>
gamma.z跳块reparametrizing &gamma;_z</ ul>


参数:q.steps
number of steps in numeric integration of likelihood (only used for binary outcome variables)
可能性数值积分的步骤数(只用于二进制结果变量)


参数:family
a character string indicating the assumed distribution of the outcome. Valid values are "continuous", the default, or "binary". </table>
一个字符串表示的假定分布的结果。有效值是"continuous",默认情况下,或"binary"。 </ TABLE>


Details

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

The function uses a simplified Bayesian sensitivity analysis algorithm that models the outcome variable Y in terms of exposure X and confounders Z=(Z_1,&hellip;,Z_p and U=(U_1,&hellip;,U_q), where Us are unobserved, and Zs are measured imprecisely as Ws. (I.e., the observed data is (Y, X, W).) Parameters of the model are then estimated using MCMC with reparametrizing block-sampling. The estimated parameters are as follows:
该函数使用一个简单的贝叶斯灵敏度分析算法模型的结果变量Y暴露X和混杂因素Z=(Z_1,&hellip;,Z_p和U=(U_1,&hellip;,U_q),其中U的是未观察到的,Zs的测量不准确作为W的。 (即,所观察到的数据是:(Y, X, W)。)模型的参数估计使用MCMC与reparametrizing块采样。的估计的参数如下:

&tau;: (W|Y, U, Z, X) \sim N_p(Z, diag(&tau;^2))
&tau;:(W|Y, U, Z, X) \sim N_p(Z, diag(&tau;^2))

&gamma;_x, &gamma;_z: (U|X, Z) \sim N(&gamma;_x X + &gamma;_z' Z)
&gamma;_x, &gamma;_z:(U|X, Z) \sim N(&gamma;_x X + &gamma;_z' Z)

&alpha;, &beta;_u, &beta;_z, &sigma;: (Y|U, Z, X) \sim N(&alpha;_0 + &alpha;_x X + &beta;_u U + &beta;_z' Z, &sigma;^2)
&alpha;, &beta;_u, &beta;_z, &sigma;:(Y|U, Z, X) \sim N(&alpha;_0 + &alpha;_x X + &beta;_u U + &beta;_z' Z, &sigma;^2)


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

a list with the following elements:
包含下列元素的列表:


参数:acc
a vector of counts of how many times each block sampler successfully made a jump. Vector elements are named by their block, as in the sampler.jump argument.
每个块采样多少次成功地进行了一个跳转计数的向量。向量元素命名他们的块,在sampler.jump参数。


参数:alpha
a nrep \times\ 2 matrix of the value of &alpha; parameter at each MCMC step
nrep \times\ 2&alpha;参数的值的矩阵在每个MCMC步骤


参数:beta.z
a nrep \times\ p matrix of the value of &beta;_z parameter at each MCMC step
nrep \times\ p&beta;_z参数的值的矩阵在每个MCMC步骤


参数:gamma.z
a nrep \times\ p matrix of the value of &gamma;_z parameter at each MCMC step
nrep \times\ p&gamma;_z参数的值的矩阵在每个MCMC步骤


参数:tau.sq
a nrep \times\ p matrix of the value of &tau;^2 parameter at each MCMC step
nrep \times\ p&tau;^2参数的值的矩阵在每个MCMC步骤


参数:gamma.x
a vector of the value of &gamma;_x parameter at each MCMC step
&gamma;_x参数的值的矢量在每个MCMC步骤


参数:beta.u
a vector of the value of &beta;_u parameter at each MCMC step
&beta;_u参数的值的矢量在每个MCMC步骤


参数:sigma.sq
a vector of the value of &sigma;^2 parameter at each MCMC step </table>
&sigma;^2参数的值的矢量在每个MCMC步骤</表>


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

Simplified Bayesian Sensitivity Analysis for Mismeasured and Unobserved Confounders. Biometrics, 66(4):1129&ndash;1137.

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


### simulated data example[##模拟数据的例子]
n <- 1000

### exposure and true confounders equi-correlated with corr=.6[##风险,并真正的混杂因素等相关CORR = 0.6]
tmp <- sqrt(.6)*matrix(rnorm(n),n,5) +
       sqrt(1-.6)*matrix(rnorm(n*5),n,5)
x <- tmp[,1]
z <- tmp[,2:5]

### true outcome relationship[##真实结果的关系]
y <- rnorm(n, x + z%*%rep(.5,4), .5)


### first two confounders are poorly measured, ICC=.7, .85[##前两混杂因素很难测量,的ICC = 0.7,0.85]
### third is correctly measured, fourth is unobserved[##第三个是正确的测量,第四是不可观测的]
w <- z[,1:3]
w[,1] <- w[,1] + rnorm(n, sd=sqrt(1/.7-1))
w[,2] <- w[,2] + rnorm(n, sd=sqrt(1/.85-1))

### fitSBSA expects standardized exposure, noisy confounders[##fitSBSA预计,标准化的曝光,嘈杂的干扰因素]
x.sdz <- (x-mean(x))/sqrt(var(x))
w.sdz <- apply(w, 2, function(x) {(x-mean(x)) / sqrt(var(x))} )

### prior information: ICC very likely above .6, mode at .8[##先验信息:ICC很可能在0.6以上,在0.8模式]
### via Beta(5,21) distribution[##通过测试(5,21)分布]
fit <- fitSBSA(y, x.sdz, w.sdz, a=5, b=21, nrep=20000,
               sampler.jump=c(alpha=.02, beta.z=.03,
                              sigma.sq=.05, tau.sq=.004,
                              beta.u.gamma.x=.4, gamma.z=.5))

### check MCMC behaviour[##检查MCMC行为]
print(fit$acc)
plot(fit$alpha[,2], pch=20)

### inference on target parameter in original scale[##目标参数在原有规模的推论]
trgt <- fit$alpha[10001:20000,2]/sqrt(var(x))
print(c(mean(trgt), sqrt(var(trgt))))

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-29 13:27 , Processed in 0.027513 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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