theta.md(MASS)
theta.md()所属R语言包:MASS
Estimate theta of the Negative Binomial
估计THETA负二项分布
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Given the estimated mean vector, estimate theta of the Negative Binomial Distribution.
鉴于估计均值向量,估计theta负二项分布。
用法----------Usage----------
theta.md(y, mu, dfr, weights, limit = 20, eps = .Machine$double.eps^0.25)
theta.ml(y, mu, n, weights, limit = 10, eps = .Machine$double.eps^0.25,
trace = FALSE)
theta.mm(y, mu, dfr, weights, limit = 10, eps = .Machine$double.eps^0.25)
参数----------Arguments----------
参数:y
Vector of observed values from the Negative Binomial.
负二项分布的观测值向量。
参数:mu
Estimated mean vector.
估计均值向量。
参数:n
Number of data points (defaults to the sum of weights)
数据点的数量(默认到weights的总和)
参数:dfr
Residual degrees of freedom (assuming theta known). For a weighted fit this is the sum of the weights minus the number of fitted parameters.
残差自由度(假设theta已知)。这是一个加权拟合减去拟合参数的权重的总和。
参数:weights
Case weights. If missing, taken as 1.
的情况下重量。如果缺少的,视为1。
参数:limit
Limit on the number of iterations.
迭代次数的限制。
参数:eps
Tolerance to determine convergence.
确定收敛的公差。
参数:trace
logical: should iteration progress be printed?
逻辑:应印制迭代进步呢?
Details
详情----------Details----------
theta.md estimates by equating the deviance to the residual degrees of freedom, an analogue of a moment estimator.
theta.md估计等同自由,模拟了矩估计的剩余度的偏差。
theta.ml uses maximum likelihood.
theta.ml使用的最大的可能性。
theta.mm calculates the moment estimator of theta by equating the Pearson chi-square sum((y-mu)^2/(mu+mu^2/theta)) to the residual degrees of freedom.
theta.mm计算的矩估计theta等同Pearson卡方sum((y-mu)^2/(mu+mu^2/theta))自由的剩余度。
值----------Value----------
The required estimate of theta, as a scalar. For theta.ml, the standard error is given as attribute "SE".
theta所需的估计,作为一个标量。 theta.ml,标准误差为属性"SE"。
参见----------See Also----------
glm.nb
glm.nb
举例----------Examples----------
quine.nb <- glm.nb(Days ~ .^2, data = quine)
theta.md(quine$Days, fitted(quine.nb), dfr = df.residual(quine.nb))
theta.ml(quine$Days, fitted(quine.nb))
theta.mm(quine$Days, fitted(quine.nb), dfr = df.residual(quine.nb))
## weighted example[#加权范例]
yeast <- data.frame(cbind(numbers = 0:5, fr = c(213, 128, 37, 18, 3, 1)))
fit <- glm.nb(numbers ~ 1, weights = fr, data = yeast)
summary(fit)
attach(yeast)
mu <- fitted(fit)
theta.md(numbers, mu, dfr = 399, weights = fr)
theta.ml(numbers, mu, weights = fr)
theta.mm(numbers, mu, dfr = 399, weights = fr)
detach()
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|