rnegbin(MASS)
rnegbin()所属R语言包:MASS
Simulate Negative Binomial Variates
模拟负二项式分布随机
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Function to generate random outcomes from a Negative Binomial distribution, with mean mu and variance mu + mu^2/theta.
函数来生成从负二项分布的随机结果,平均mu和方差mu + mu^2/theta。
用法----------Usage----------
rnegbin(n, mu = n, theta = stop("'theta' must be specified"))
参数----------Arguments----------
参数:n
If a scalar, the number of sample values required. If a vector, length(n) is the number required and n is used as the mean vector if mu is not specified.
如果一个标量,所需的样本值。如果一个向量,length(n)所需的数量和nmu如果未指定均值向量。
参数:mu
The vector of means. Short vectors are recycled.
向量的手段。短的向量被回收。
参数:theta
Vector of values of the theta parameter. Short vectors are recycled. </table>
向量theta参数值。短的向量被回收。 </ TABLE>
Details
详情----------Details----------
The function uses the representation of the Negative Binomial distribution as a continuous mixture of Poisson distributions with Gamma distributed means. Unlike rnbinom the index can be arbitrary.
该函数使用泊松分布与伽玛分布的手段不断混合物作为负二项分布的代表性。不像rnbinom的索引可以是任意的。
值----------Value----------
Vector of random Negative Binomial variate values.
负二项分布的随机变量值的向量。
副作用----------Side Effects----------
Changes .Random.seed in the usual way.
改变.Random.seed通常的方式。
举例----------Examples----------
# Negative Binomials with means fitted(fm) and theta = 4.5[负二项式安装手段(FM)和θ= 4.5]
fm <- glm.nb(Days ~ ., data = quine)
dummy <- rnegbin(fitted(fm), theta = 4.5)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|