SimulateMixture(flowClust)
SimulateMixture()所属R语言包:flowClust
Random Generation from a t Mixture Model with Box-Cox Transformation
从混合模型与Box-Cox变换的随机生成
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This function can be used to generate a sample from a multivariate t mixture model with Box-Cox transformation.
此功能可用于生成从多元tBox-Cox变换的混合模型的样本。
用法----------Usage----------
SimulateMixture(N, w, mu, sigma, nu=4, lambda)
参数----------Arguments----------
参数:N
The number of observations.
的若干意见。
参数:w
A vector of length K, containing the K cluster proportions.
一个向量,长度K包含的K的聚类的比例。
参数:mu
A matrix of size K x P, where K is the number of clusters and P is the dimension, containing the K mean vectors.
一个矩阵的大小K x P,其中K是聚类的数量和P是尺寸,含K的意思是向量。
参数:sigma
An array of dimension K x P x P, containing the K covariance matrices.
维数组K x P x P,K协方差矩阵。
参数:nu
The degrees of freedom used for the t distribution.
用于t分布的自由度。
参数:lambda
The Box-Cox transformation parameter. If missing, the conventional t distribution without transformation will be used.
Box-Cox转换参数。如果缺少的,传统的t没有改造的分布将被使用。
值----------Value----------
A matrix of size N x P.
一个矩阵的大小N x P。
作者(S)----------Author(s)----------
Raphael Gottardo <<a href="mailto:raph@stat.ubc.ca">raph@stat.ubc.ca</a>>, Kenneth Lo <<a href="mailto:c.lo@stat.ubc.ca">c.lo@stat.ubc.ca</a>>
参见----------See Also----------
flowClust
flowClust
举例----------Examples----------
### Number of components[#元件数量]
K <- 5
### Dimension[##尺寸]
p <- 2
### Number of observations[#观测数]
n <- 200
Mu <- matrix(runif(K*p, 0, 20), K, p)
Sigma <- array(0, c(K, p, p))
for (k in 1:K)
{
Sigma[k,,][outer(1:p, 1:p, ">")] <- runif(p*(p-1)/2,-.1,.1)
diag(Sigma[k,,]) <- runif(p,0,1)
### Make sigma positive definite[#西格玛正定的]
Sigma[k,,] <- Sigma[k,,] %*% t(Sigma[k,,])
}
### Generate the weights[#生成的重量]
w <- rgamma(K,10,1)
w <- w/sum(w)
y <- SimulateMixture(n, w, Mu, Sigma, nu=4)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|