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
beta <- 1
sigma <- 0.1
gamma <- 0.1
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)
Run the code above in your browser using DataLab