dirmultinomial(VGAM)
dirmultinomial()所属R语言包:VGAM
Fitting a Dirichlet-Multinomial Distribution
一类Dirichlet多项分布拟合
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Fits a Dirichlet-multinomial distribution to a matrix response.
适合的Dirichlet多项式分布矩阵的反应。
----------Usage----------
dirmultinomial(lphi="logit", ephi = list(), iphi = 0.10,
parallel= FALSE, zero="M")
参数----------Arguments----------
参数:lphi
Link function applied to the phi parameter, which lies in the open unit interval (0,1). See Links for more choices.
Link功能的phi参数,而在于在打开的单元间隔(0,1)。见Links更多的选择。
参数:ephi
List. Extra argument for lphi. See earg in Links for general information.
列表。额外参数lphi。见earg中Links的一般信息。
参数:iphi
Numeric. Initial value for phi. Must be in the open unit interval (0,1). If a failure to converge occurs try assigning this argument a different value.
数字。初始值phi。必须在开单位的时间间隔(0,1)。如果收敛失败时尝试不同的值指定此参数。
参数:parallel
A logical (formula not allowed here) indicating whether the probabilities pi_1,…,pi_{M-1} are to be equal via equal coefficients. Note pi_M will generally be different from the other probabilities. Setting parallel=TRUE will only work if you also set zero=NULL because of interference between these arguments (with respect to the intercept term).
一个逻辑(这里不允许公式)的概率是否pi_1,…,pi_{M-1}是要通过平等系数相等。注pi_M一般会从其他的概率不同。设置parallel=TRUE只会工作,如果你还设置zero=NULL因为这些参数间的相互干扰(带截距项)。
参数:zero
An integer-valued vector specifying which linear/additive predictors are modelled as intercepts only. The values must be from the set \{1,2,…,M\}. If the character "M" then this means the numerical value M, which corresponds to linear/additive predictor associated with phi. Setting zero=NULL means none of the values from the set \{1,2,…,M\}.
指定一个整数值向量线性/添加剂的预测模型仅作为拦截。这些值必须是从集合\{1,2,…,M\}。如果字符"M"然后这意味着数值M,它对应于与phi线性/添加剂预测器。设置zero=NULL是指没有值的集合\{1,2,…,M\}。
Details
详细信息----------Details----------
The Dirichlet-multinomial distribution arises from a multinomial distribution where the probability parameters are not constant but are generated from a multivariate distribution called the Dirichlet distribution. The Dirichlet-multinomial distribution has probability function
产生的Dirichlet多项式分布多项分布的概率是不恒定的,但产生的一个多变量的分布称为Dirichlet分布。的Dirichlet多项式分布概率函数
where phi is the over-dispersion parameter and N_* = y_1+\cdots+y_M. Here, C_b^a means “a choose b” and refers to combinations (see choose). The above formula applies to each row of the matrix response. In this VGAM family function the first M-1 linear/additive predictors correspond to the first M-1 probabilities via
phi是过度分散参数和N_* = y_1+\cdots+y_M。在这里,C_b^a的意思是“a选择b”是指组合(见choose)。适用于上述式的矩阵的每一行响应。在这VGAM家庭功能的第一个M-1线性/添加剂的预测相对应的第一个M-1概率通过
where eta_j is the jth linear/additive predictor (eta_M=0 by definition for P[Y=M] but not for phi) and j=1,…,M-1. The Mth linear/additive predictor corresponds to lphi applied to phi.
Note that E(Y_j) = N_* pi_j but the probabilities (returned as the fitted values) pi_j are bundled together as a M-column matrix. The quantities N_* are returned as the prior weights.
请注意这E(Y_j) = N_* pi_j但概率(返回的拟合值)pi_j是捆绑在一起作为一个M列的矩阵。的数量N_*返回作为事先的权重。
The beta-binomial distribution is a special case of the Dirichlet-multinomial distribution when M=2; see betabinomial. It is easy to show that the first shape parameter of the beta distribution is shape1=pi*(1/phi-1) and the second shape parameter is shape2=(1-pi)*(1/phi-1). Also, phi=1/(1+shape1+shape2), which is known as the intra-cluster correlation coefficient.
β-二项分布是一种特殊的Dirichlet多项式分布的情况下,当M=2;betabinomial。这是很容易证明的第一个Beta分布的形状参数shape1=pi*(1/phi-1)和第二个形状参数是shape2=(1-pi)*(1/phi-1)的。另外phi=1/(1+shape1+shape2)作为聚类内的相关系数,这是众所周知的。
值----------Value----------
An object of class "vglmff" (see vglmff-class). The object is used by modelling functions such as vglm, rrvglm and vgam.
类的一个对象"vglmff"(见vglmff-class)。该对象被用于建模功能,如vglm,rrvglm和vgam。
If the model is an intercept-only model then @misc (which is a list) has a component called shape which is a vector with the M values pi_j * (1/phi-1).
如果模型是一个仅截距模型然后@misc(这是一个列表)有一个组件称为shape是一个向量与M值pi_j * (1/phi-1)。
警告----------Warning ----------
This VGAM family function is prone to numerical problems, especially when there are covariates.
这VGAM家庭功能是容易出现的数值的问题,尤其是当有协变量。
注意----------Note----------
The response can be a matrix of non-negative integers, or else a matrix of sample proportions and the total number of counts in each row specified using the weights argument. This dual input option is similar to multinomial.
响应可以是一个矩阵的非负整数,否则的矩阵的样本比例和总数在每行中使用weights论点指定的计数。这双输入选项类似multinomial。
To fit a "parallel" model with the phi parameter being an intercept-only you will need to use the constraints argument.
为了适应一个水货模型phi参数仅截距,您将需要使用constraints参数。
Currently, Fisher scoring is implemented. To compute the expected information matrix a for loop is used; this may be very slow when the counts are large. Additionally, convergence may be slower than usual due to round-off error when computing the expected information matrices.
目前,费舍尔得分的实施。为了计算预期的信息矩阵的一个for循环使用,这可能是非常缓慢的,当数大。此外,收敛速度比平常慢时,由于舍入误差计算预期的信息矩阵。
(作者)----------Author(s)----------
Thomas W. Yee
参考文献----------References----------
Fisher information matrix of the Dirichlet-multinomial distribution. Biometrical Journal, 47, 230–236.
Overdispersion in allelic counts and <code>θ</code>-correction in forensic genetics. Theoretical Population Biology, 78, 200–210.
参见----------See Also----------
dirmul.old, betabinomial, betabinomial.ab, dirichlet, multinomial.
dirmul.old,betabinomial,betabinomial.ab,dirichlet,multinomial。
实例----------Examples----------
n <- 10; M <- 5
y <- round(matrix(runif(n*M)*10, n, M)) # Integer counts[整型数]
fit <- vglm(y ~ 1, dirmultinomial, trace = TRUE)
head(fitted(fit))
fit@y # Sample proportions[样本比例]
weights(fit, type = "prior", matrix = FALSE) # Total counts per row[总计数,每行]
x <- runif(n)
fit <- vglm(y ~ x, dirmultinomial, trace = TRUE)
## Not run: [#不运行:]
Coef(fit) # This does not work[这并不工作,]
## End(Not run)[#(不执行)]
coef(fit, matrix = TRUE)
(sfit <- summary(fit))
vcov(sfit)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|