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

R语言 Runuran包 hitro.new()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-28 23:46:26 | 显示全部楼层 |阅读模式
hitro.new(Runuran)
hitro.new()所属R语言包:Runuran

                                        UNU.RAN generator based on Hit-and-Run sampler (HITRO)
                                         UNU.RAN发生器基于上打了采样(HITRO)

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

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

UNU.RAN random variate generator for continuous multivariate distributions with given probability density function (PDF). It is based on the Hit-and-Run algorithm in combinaton with the Ratio-of-Uniforms method ("HITRO").
UNU.RAN与给定的概率密度函数(PDF)连续多变量分布的随机变量发生器。它是基于打了在combinaton算法比的制服方法(“HITRO)。

[Universal] – MCMC (Markov chain sampler).
[通用]  -  MCMC(马尔科夫链采样器)。


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


hitro.new(dim=1, pdf, ll=NULL, ur=NULL, mode=NULL, center=NULL,
          thinning=1, burnin=0, ...)



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

参数:dim
number of dimensions of the distribution. (integer)
数量的尺寸的分布。 (整数)


参数:pdf
probability density function. (R function)
概率密度函数。 (R功能)


参数:ll,ur
lower left and upper right vertex of a rectangular domain of the pdf. The domain is only set if both vertices are not NULL. Otherwise, the domain is unbounded by default. (numeric vectors)
左下角和右上角顶点的矩形区域的pdf。您正在访问的域名设置,如果两个顶点非NULL的。否则,默认情况下,域是无限的。 (数字向量)


参数:mode
location of the mode. (numeric vector)
模式的位置。 (矢量数字的)


参数:center
point in “typical” region of distribution, e.g. the approximate location of the mode. If omitted the mode is used. If the mode is not given either, the origin is used. (numeric vector)
点在“典型”的分布区域,如:模式的大致位置。如果省略了mode使用。如果mode不给予的起源。 (矢量数字的)


参数:thinning
thinning factor. (positive integer)
稀化因子。 (正整数)


参数:burnin
length of burnin-in phase. (positive integer)
燃尽的相位长度。 (正整数)


参数:...
(optional) arguments for pdf
(可选)参数为pdf


Details

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

<STRONG>Beware: MCMC sampling can be dangerous!</STRONG>
<STRONG>注意:MCMC采样可能是危险的!</ STRONG>

This function creates a unuran object based on the Hit-and-Run algorithm in combinaton with the Ratio-of-Uniforms method ("HITRO"). It can be used to draw samples of a continuous random vector with given probability density function using ur.
这个函数创建一个unuran对象的基础上打了在combinaton算法比的制服方法(“HITRO)。它可用于得出样品的连续随机向量与给定的概率密度函数使用ur。

The algorithm works best with log-concave distributions. Other distributions work as well but convergence can be slower.
效果最好的算法对数凹分布。其他分派工作的很好,但收敛速度可能很慢。

The density must be provided by a function pdf which must return non-negative numbers and but need not be normalized (i.e., it can be any multiple of a density function).
密度必须在所提供的函数pdf它必须返回非负数,但需要不进行归一(即,它可以是任何的密度函数的倍数)。

The center is used as starting point of the Hit-and-Run algorithm. It is thus important, that the center is contained in the (interior of the) domain.  Alternatively, one could provide the location of the mode. However, this requires its exact position whereas center allows any point in the &ldquo;typical&rdquo; region of the distribution.
center使用作为打了算法的出发点。因此,这是重要的,这center中所载的(内部的)域。或者,人们可以提供的位置mode。然而,这需要它的精确位置,而center允许的“典型”的分布区域中的任何点。

If the mode is given, then it is used to obtain an upper bound on the pdf and thus its location should be given sufficiently accurate.
如果mode被给出,则它是用来获得上限的pdf,从而它的位置应给予足够精确。

The "HITRO" algorithm is a MCMC samplers and thus it does not produce a sequence of independent variates. The drawn sample follows the target distribution only approximately. The dependence between consecutive vectors can be decreased when only a subsequence is returned (and the other elements are erased). This is called &ldquo;thinning&rdquo; of the Markov chain and can be controlled by the thinning factor. A thinning factor k means that only every k-th element is returned.
HITRO算法是一种MCMC采样,因此它不会产生一个独立分布随机序列。只有大约绘制的示例如下目标分布。可以减少连续向量之间的依赖关系,当只有一个子序列被返回(和其他元素被清除)。这被称为“稀”的马尔可夫链的,并可以控制由thinning因子。变薄的因素k是指每个元素,则返回k。

Markov chains also depend on the chosen starting point (i.e., the center in this implementation of the algorithm). This dependence can be decreased by erasing the first part of the chain. This is called the &ldquo;burn-in&rdquo; of the Markov chain and its length is controlled by the argument burnin.
马尔可夫链也依赖于所选择的出发点(即center在这个实现的算法)。通过擦除的第一链的部分,可以降低这种依赖性。这就是所谓的“老化”的马尔可夫链,其长度控制参数burnin。


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



Josef Leydold and Wolfgang H\"ormann
<a href="mailto:unuran@statmath.wu.ac.at">unuran@statmath.wu.ac.at</a>.




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

Automatic Markov Chain Monte Carlo Procedures for Sampling from Multivariate Distributions. Research Report Series / Department of Statistics and Mathematics, Nr. 27, December 2005 Department of Statistics and Mathematics, Wien, Wirtschaftsuniv., 2005. http://epub.wu.ac.at/dyn/virlib/wp/showentry?ID=epub-wu-01_8cb

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

ur, unuran.new, unuran.
ur,unuran.new,unuran。


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


## Create a sample of size 100 for a [#创建一个大小为100的样品]
## Gaussian distribution[#高斯分布]
mvpdf <- function (x) { exp(-sum(x^2)) }
gen <- hitro.new(dim=2, pdf=mvpdf)
x <- ur(gen,100)

## Use mode of Gaussian distribution.[使用高斯分布的模式。]
## Reduce auto-correlation by thinning and burn-in.[减少汽车相关的细化和老化。]
##  mode at (0,0)[#模式为(0,0)]
##  thinning factor 3[#稀化因子3]
##    (only every 3rd vector in the sequence is returned)[#(仅返回序列中的每一个第三矢量)]
##  burn-in of length 1000[#燃烧的长度为1000]
##    (the first 100 vectors in the sequence are discarded)[#(在序列中的前100个矢量被丢弃)]
mvpdf <- function (x) { exp(-sum(x^2)) }
gen <- hitro.new(dim=2, pdf=mvpdf, mode=c(0,0), thinning=3, burnin=1000)
x <- ur(gen,100)

## Gaussian distribution restricted to the rectangle [1,2]x[1,2][#高斯分布限于矩形[1,2]×[1,2]]
##  (don't forget to provide a starting point using 'center')[#(不要忘了使用“中心”提供了一个起点)]
mvpdf <- function (x) { exp(-sum(x^2)) }
gen <- hitro.new(dim=2, pdf=mvpdf, center=c(1.1,1.1), ll=c(1,1), ur=c(2,2))
x <- ur(gen,100)


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-28 10:57 , Processed in 0.019870 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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