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

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

[复制链接]
发表于 2012-9-30 02:33:11 | 显示全部楼层 |阅读模式
ermvnorm(SimComp)
ermvnorm()所属R语言包:SimComp

                                         Multivariate Normal Random Numbers with Exact Parameters
                                         多元正态随机数的确切参数

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

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

Random numbers of the multivariate normal distribution with EXACT mean vector, EXACT variance vector and approximate correlation matrix. This function is based on the function rmvnorm of the package mvtnorm.
精确的均值向量,精确的的变化向量和近似相关矩阵的多元正态分布的随机数。此函数的基础上的功能rmvnorm的软件包mvtnorm中。


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


ermvnorm(n, mean, sd, corr = diag(rep(1, length(mean))), mnt = 10000)



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

参数:n
number of observations
的观测数


参数:mean
mean vector
均值向量


参数:sd
vector of standard deviations
的标准偏差矢量


参数:corr
correlation matrix
相关矩阵


参数:mnt
maximum number of tries for the computation
最大尝试次数的计算


Details

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

Unfortunately, it's very common to present only summary statistics in the literature when evaluating real data. This makes it hard to retrace or to verify the related statistical evaluation. Also, the use of such data as an example for other statistical tests is not possible. For that reason, ermvnorm allows to reproduce data by simulation. In contrast to rmvnorm of the package mvtnorm, the function ermvnorm produces random numbers that have EXACTLY the same paramer values as specified by mean and sd. The correlation matrix corr is met only approximately.
不幸的是,它是很常见的,目前只有摘要的文献进行评估时,真实的数据统计。这使得它很难追溯或核实相关统计评估。此外,作为一个实施例的其他的统计测试,使用这样的数据是不可能的。出于这个原因,ermvnorm允许通过仿真来再现数据。相反,rmvnorm的包mvtnorm,函数ermvnorm产生随机数,具有完全相同的paramer的值所指定的mean和sd。相关矩阵corr仅达到约。

The simple idea behind ermvnorm is to apply rmvnorm of the package mvtnorm, but only for the first n-2 random numbers. The remaining 2 numbers are obtained by solving a quadratic equation to achieve the specified values for the mean vector and for the vector of standard deviations. Depending on the n-2 random numbers, the underlying quadratic equation can possibly have no solution. In this case, ermvnorm creates a new set of n-2 random numbers until a valid data set is obtained, or until the maximum number of tries mnt is reached.
ermvnorm简单的想法背后是用rmvnorm的包mvtnorm,但只对第n-2个随机数。其它的2个得到通过求解一个二次方程式,以达到指定的值的均值矢量和的标准偏差值的矢量。底层二次方程可以根据在n-2个随机数,可能没有解决方案。在这种情况下,ermvnorm创建一组新的n-2个随机数,直到得到一个有效的数据集,或直到最大数目的尝试mnt达到。


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

A matrix of random numbers with dimension n * length(mean).
随机数的矩阵与n维*长度(平均)。


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

This function is to be used only with caution. Normally, random numbers with exact mean and standard deviation are not intended to be used. For example, simulations concerning type I error or power of statistical tests cannot be based on ermvnorm.
此功能是要只用谨慎。通常情况下,具有确切的平均值和标准偏差的随机数不打算要使用。例如,关于类型的模拟了我的错误或电源的统计测试不能根据ermvnorm。


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



Mario Hasler and Gemechis Djira Dilba




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

Hothorn, T. et al. (2001): On Multivariate t and Gauss Probabilities in R. R News 1, 27-29.

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

rmvnorm
rmvnorm


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


# Example 1:[实施例1:]
# A dataset representing two correlated endpoints.[两个相互关联的端点的数据集。]

set.seed(1234)
dataset1 <- ermvnorm(n=10,mean=c(10,120),sd=c(1,10),corr=rbind(c(1,0.7),c(0.7,1)))
dataset1
mean(dataset1[,1]); mean(dataset1[,2])
sd(dataset1[,1]); sd(dataset1[,2])
round(cor(dataset1),3)
pairs(dataset1)

# Example 2:[实施例2:]
# A dataset representing three uncorrelated endpoints.[代表着三种不相关的端点的数据集。]

set.seed(5678)
dataset2 <- ermvnorm(n=20,mean=c(1,12,150),sd=c(0.5,2,20))
dataset2
mean(dataset2[,1]); mean(dataset2[,2]); mean(dataset2[,3])
sd(dataset2[,1]); sd(dataset2[,2]); sd(dataset2[,3])
pairs(dataset2)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-5-23 16:41 , Processed in 0.024838 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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