[Yuima-commits] r399 - pkg/yuima/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Jan 14 04:36:51 CET 2016


Author: hirokimasuda
Date: 2016-01-14 04:36:50 +0100 (Thu, 14 Jan 2016)
New Revision: 399

Modified:
   pkg/yuima/man/rng.Rd
Log:
some contents updated

Modified: pkg/yuima/man/rng.Rd
===================================================================
--- pkg/yuima/man/rng.Rd	2016-01-14 03:36:08 UTC (rev 398)
+++ pkg/yuima/man/rng.Rd	2016-01-14 03:36:50 UTC (rev 399)
@@ -1,48 +1,97 @@
 \name{rng}
 \alias{rng}
+
 \alias{rIG}
+\alias{dIG}
 \alias{rNIG}
+\alias{dNIG}
 \alias{rbgamma}
+\alias{dbgamma}
 \alias{rngamma}
+\alias{dngamma}
 \alias{rstable}
-\title{Random Number Generators for yuima package}
-\description{\code{simulate} function uses specific random number generators to generate Levy paths.}
+
+\title{Random numbers and densities}
+\description{\code{simulate} function can use the specific random number generators to generate Levy paths.}
 \usage{
-rIG(x,delta,gamma)
-rNIG(x,alpha=1,beta=0,delta=1,mu=0,Lambda)
-rbgamma(x,delta.plus,gamma.plus,delta.minus,gamma.minus)
-rngamma(x,lambda,alpha,beta,mu,Lambda)
-rstable(x,alpha,beta,sigma,gamma)
+rIG(x,delta,gamma), dIG(x,delta,gamma)
+rNIG(x,alpha,beta,delta,mu,Lambda), dNIG(x,alpha,beta,delta,mu,Lambda)
+rbgamma(x,delta.plus,gamma.plus,delta.minus,gamma.minus), dbgamma(x,delta.plus,gamma.plus,delta.minus,gamma.minus)
+rngamma(x,lambda,alpha,beta,mu,Lambda), dngamma(x,lambda,alpha,beta,mu,Lambda)
+rstable(x,alpha,beta,sigma,gamma), dstable(x,alpha,beta,sigma,gamma)
 }
 \arguments{
   \item{x}{Number of R.Ns to be geneated.}
-  \item{delta}{param}
-  \item{delta.plus}{param}
-  \item{delta.minus}{param}
-  \item{gamma}{param}
-  \item{gamma.plus}{param}
-  \item{gamma.minus}{param}
-  \item{alpha}{param}
-  \item{beta}{parame}
-  \item{mu}{param}
-  \item{lambda}{param}
-  \item{Lambda}{param}
-  \item{sigma}{param}
+  % \item{IG (inverse Gaussian)}{delta and gamma are positive valued parameter.}
+  % \item{NIG (normal inverse Gaussian)}{alpha and delta are nonnegative number, beta and mu are vector and Lambda is matrix.}
+  % \item{bgamma (bilateral gamma)}{All of parameters are positive number.}
+  % \item{ngamma (normal gamma)}{lamdba and alpha are positive number, beta and mu are vector and Lambda is matrix.}
+  % \item{stable}{Stable index 0<alpha<=2; Skewness -1<=beta<=1; Scale sigma>0; Location gamma being a real number.}
 }
+
+
 \details{
-  to be written
+\code{IG} (inverse Gaussian): Delta and gamma are positive (the case of gamma=0 corresponds to the positive half stable, provided by the "rstable").
+
+\code{NIG} (normal inverse Gaussian): It is defined by the normal mean-variance mixuture of inverse Gaussian distribution. The parameters alpha, beta, delta and mu express the heaviness of tails, degree of asymmetry, scale and location, respectively. They satisfy the following conditions: 
+Lambda is positive definite with det(Lambda)=1; delta>0; alpha>0 with alpha^2-beta^T Lambda beta >0.
+
+\code{bgamma} (bilateral gamma): Bilateral gamma distribution is defined by the difference of independent gamma distributions Gamma(delta.plus,gamma.plus) and Gamma(delta.minus,gamma.minus).
+
+\code{ngamma} (normal gamma): Normal gamma distribution is defined by the normal mean-variance mixture of gamma distribution. The parameters satisfy the following conditions: 
+Lambda is positive definite with det(Lambda)=1; lambda>0; alpha>0 with alpha^2-beta^T Lambda beta >0. Especially in the case of beta=0 it is variance gamma distribution.
+
+\code{stable} (stable): Parameters alpha, beta, sigma and gamma express stability, degree of skewness, scale and location, respectively. They satisfy the following condition: 0<alpha<=2; -1<=beta<=1; scale>0; gamma is a real number.
 }
+
 \value{
-  \item{rIG}{A vector of random numbers.}
-  \item{rNIG}{A vector of random numbers.}
-  \item{rbgamma}{A vector of random numbers.} 
+\item{rXXX}{Collection of of random numbers or vectors}
+\item{dXXX}{Density dunction}
 }
+
 \author{The YUIMA Project Team}
 \note{
-  Random number generators may be rewritten with C language to speed up.
+  Some density-plot functions ar estill missing: as for the non-Gaussian stable densities, one can use, e.g., stabledist package.
 }
 
+\examples{
 
+set.seed(123)
+
+# Ex 1. (One-dimensional standard Cauchy distribution)
+# The value of parameters is alpha=1,beta=0,sigma=1,gamma=0.
+# Choose the value of x.
+x<-10 # the number of r.n
+rstable(x,1,0,1,0)
+
+# Ex 2. (One-dimensional Levy distribution)
+# Choose the value of sigma, gamma, x.
+# alpha = 0.5, beta=1
+x<-10 # the number of r.n
+rstable(x,0.5,beta,sigma,gamma)
+
+# Ex 3. (Symmetric bilateral gamma)
+# delta=delta.plus=delta.minus, gamma=gamma.plus=gamma.minus.
+# Choose the value of delta and gamma and x.
+x<-10 # the number of r.n
+rbgamma(x,1,1,1,1)
+
+# Ex 4. (One-dimensional normal inverse Gaussian distribution)
+# Lambda=1.
+# Choose the value of parameters and x.
+x<-10 # the number of r.n
+rNIG(x,1,1,1,1)
+
+# Ex 5. (Multi-dimensional normal inverse Gaussian distribution)
+# Choose the value of parameters and x.
+beta<-c(.5,.5)
+mu<-c(0,0)
+Lambda<-matrix(c(1,0,0,1),2,2)
+x<-10 # the number of r.n
+rNIG(x,1,beta,1,mu,Lambda)
+
+}
+
 % Add one or more standard keywords, see file 'KEYWORDS' in the
 % R documentation directory.
 \keyword{ts}



More information about the Yuima-commits mailing list