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

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

[复制链接]
发表于 2012-9-30 12:30:09 | 显示全部楼层 |阅读模式
createMonteCarloGrid(SparseGrid)
createMonteCarloGrid()所属R语言包:SparseGrid

                                         Create a multidimensional grid of nodes and weights for Monte Carlo integration
                                         创建一个多维网格的节点和权重蒙特卡罗积分

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

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

Simulate nodes using a random number generator supplied by the user, and combine these with a vector of equal weights into a list. Sparse grids can be created with the function createSparseGrid.
模拟使用由用户提供的一个随机数发生器的节点,并结合到一个列表中的这些具有相等的权重向量。稀疏网格,可以创建的功能createSparseGrid。


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


createMonteCarloGrid( rng, dimension, num.sim, ... )



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

参数:rng
function that generates random numbers. The first argument of this function should be called n. Examples are the R built-in functions rnorm and runif for random numbers from a standard normal or uniform distribution.  
产生随机数的函数。这个函数的第一个参数应该被称为n。例子是R内置功能rnorm和runif从一个标准的正态分布或均匀分布的随机数。


参数:dimension
dimension of the integration problem.  
维度的整合问题。


参数:num.sim
number of simulated integration nodes.  
模拟集成节点的数量。


参数:...
arguments that will be passed to the random number generator rng.  
参数,将被传递到的随机数发生器rng。


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

The return value contains a list with nodes and weights
返回值将包含一个列表,节点和权重


参数:nodes
matrix with a node in each row
矩阵与每行中的一个节点


参数:weights
vector with corresponding weights
与相应的权重向量


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



Jelmer Ypma




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

createSparseGrid createProductRuleGrid createIntegrationGrid integrate pmvnorm
createSparseGridcreateProductRuleGridcreateIntegrationGridintegratepmvnorm


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


# load library[加载库]
library('SparseGrid')

# set random seed[设置随机种子]
set.seed( 3141 )

# Create Monte Carlo integration grids[创建蒙地卡罗积分网格]
# 1. with draws from a uniform distribution[1。绘制从均匀分布]
mc.grid <- createMonteCarloGrid( runif, dimension=2, num.sim=10 )
mc.grid

# 2. with draws from a standard normal distribution[2。吸引了来自标准正态分布]
mc.grid <- createMonteCarloGrid( rnorm, dimension=3, num.sim=1000 )

# 3. with draws from a normal distribution with mean=2 and sd=5[3。吸引了来自正态分布,意味着= 2,SD = 5]
mc.grid <- createMonteCarloGrid( rnorm, dimension=3, num.sim=1000, mean=2, sd=5 )

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-9 23:29 , Processed in 0.027802 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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