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

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

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

                                         The Matched Binomial Distribution Family Function
                                         相匹配的的二项分布家庭功能

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

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

Estimation of a binomial regression in a matched case-control study.
在配对的病例对照研究的二项式回归的估计。


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


mbinomial(mvar = NULL, link = "logit", earg = list(),
          parallel = TRUE, smallno = .Machine$double.eps^(3/4))



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

参数:mvar
Formula specifying the matching variable. This shows which observation belongs to which matching set. The intercept should be suppressed from the formula, and  the term must be a factor.  
公式指定匹配的变量。这说明观察是属于哪一个匹配的一组。应抑制的截距从公式,并且术语必须是一个factor。


参数:link, earg
Parameter link function and extra argument for the probability parameter.  Information for these are at Links and CommonVGAMffArguments.  
参数的概率参数的链接功能和额外的参数。这些信息Links和CommonVGAMffArguments。


参数:parallel
This should always be set TRUE otherwise there will be too many parameters to estimate. See CommonVGAMffArguments for more information.  
这应始终设置TRUE否则会有太多的参数估计。见CommonVGAMffArguments更多信息。


参数:smallno
Numeric, a small positive value. For a specific observation, used to nullify the linear/additive predictors that are not needed.  
数字,一个很小的正数。对于一个特定的观察中,使用以消除线性/添加剂无需的预测变量。


Details

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

By default, this VGAM family function fits a logistic regression model to a binary response from a matched case-control study. Here, each case (Y = 1) is matched with one or more controls (Y = 0) with respect to some matching variables (confounders). For example, the first matched set is all women aged from 20 to 25, the second matched set is women aged between 26 to 30, etc. The logistic regression has a different intercept for each matched set but the other regression coefficients are assumed to be the same across matched sets (parallel = TRUE).
默认情况下,此VGAM家庭功能符合logistic回归模型为二进制响应匹配的病例对照研究。在这里,每一种情况下(Y = 1)是匹配与一个或多个控件(Y = 0),相对于一定的匹配变量(混杂因素)。例如,第一个匹配的是所有的年龄从20岁到25岁的妇女,第二组匹配是女,年龄介乎26至30之间,等Logistic回归有不同的截距为每一个匹配的集合,但其他的回归系数都被假定为各匹配组(parallel = TRUE)。

Let C be the number of matched sets. This VGAM family function uses a trick by allowing M, the number of linear/additive predictors, to be equal to C, and then nullifying all but one of them for a particular observation. The term specified by the mvar argument must be a factor. Consequently, the model matrix contains an intercept plus one column for each level of the factor (except the first (this is the default in R)). Altogether there are C columns. The algorithm here constructs a different constraint matrix for each of the C columns.
让我们C是相匹配的集数。这VGAM家庭功能,使用一招让M,线性/添加剂的预测数,等于C,然后注销,但其中之一为特定的观察。 mvar参数指定的期限必须是一个factor。因此,模型矩阵包含截距加一列中的每个级别的因子(除了第一个(这是在默认情况下,在R))。当局共是C的列。这里的算法构造了一个不同的约束矩阵,为每个C列。


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

An object of class "vglmff" (see vglmff-class). The object is used by modelling functions such as vglm and vgam.
类的一个对象"vglmff"(见vglmff-class)。该对象被用于建模功能如vglm和vgam。


警告----------Warning ----------

Both the memory requirements and computational time of this VGAM family function grows very quickly with respect to the number of matched sets. For example, the large model matrix of a data set with 100 matched sets consisting of one case and one control per set will take up at least (about) 20Mb of memory. For a constant number of cases and controls per matched set, the memory requirements are O(C^3) and the the computational time is O(C^4) flops.
本VGAM家庭功能的内存需求和计算时间的增长非常迅速的数量相匹配的集。例如,大的模型矩阵的数据集与100匹配集组成的一种情况下,一个控制每套将占用(约)的至少20Mb的存储器。组匹配的病例组和对照每一个常数,对内存的要求是O(C^3)和计算时间是O(C^4)触发器。

The example below has been run successfully with n = 700 (this corresponds to C = 350) but only on a big machine and it took over 10 minutes. The large model matrix was 670Mb.
下面的例子已成功运行n = 700(相当于C = 350),但只有一个大机器上,并花了超过10分钟。大的模型矩阵为670Mb。


注意----------Note----------

The response is assumed to be in a format that can also be inputted into binomialff.
的响应的格式,也可以被输入到binomialff被假定为。


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


Thomas W. Yee



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

Hastie, T. J. and Tibshirani, R. J. (1990) Generalized Additive Models, London: Chapman & Hall.
Data analytic methods for matched case-control studies. Biometrics, 40, 639–651.
Breslow, N. E. and Day, N. E. (1980) Statistical Methods in Cancer Research I: The Analysis of Case-Control Studies. Lyon: International Agency for Research on Cancer.
Multivariate analysis for matched case-control studies. American Journal of Epidemiology, 107, 245–256.

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

binomialff.
binomialff。


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


## Not run: [#不运行:]
# Cf. Hastie and Tibshirani (1990) p.209. The variable n must be even.[比照。 Hastie和Tibshirani(1990)第209页。变量n必须是偶数。]
# Here, the intercept for each matched set accounts for x3 which is[在这里,每一个匹配的一组帐户的截距X3]
# the confounder or matching variable.[混杂因素或匹配的变量。]
n = 700 # Requires a big machine with lots of memory. Expensive wrt time[一个大机器,需要大量的内存。昂贵的WRT时间]
n = 100 # This requires a reasonably big machine.[这需要一个相当大的机器。]
mydat = data.frame(x2 = rnorm(n), x3 = rep(rnorm(n/2), each = 2))
xmat = with(mydat, cbind(x2, x3))
mydat = transform(mydat, eta = -0.1 + 0.2 * x2 + 0.3 * x3)
etamat = with(mydat, matrix(eta, n/2, 2))
condmu = exp(etamat[, 1]) / (exp(etamat[, 1]) + exp(etamat[, 2]))
y1 = ifelse(runif(n/2) < condmu, 1, 0)
y = cbind(y1, 1 - y1)
mydat = transform(mydat, y = c(y1, 1-y1),
                         ID = factor(c(row(etamat))))
fit = vglm(y ~ 1 + ID + x2, trace = TRUE,
           fam = mbinomial(mvar = ~ ID - 1), data = mydat)
dimnames(coef(fit, matrix = TRUE))
coef(fit, matrix = TRUE)
summary(fit)
head(fitted(fit))
objsizemb = function(object) round(object.size(object) / 2^20, dig = 2)
objsizemb(fit) # in Mb[以Mb]

VLMX = model.matrix(fit, type = "vlm")  # The big model matrix[大的模型矩阵]
dim(VLMX)
objsizemb(VLMX) # in Mb[以Mb]
rm(VLMX)
## End(Not run)[#(不执行)]

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-26 15:32 , Processed in 0.029306 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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