rvgs: Random generation for some symmetric continuous...

View source: R/rvgs.R

rvgsR Documentation

Random generation for some symmetric continuous distributions.

Description

rvgs is used to random generation from some standard symmetric continuous distributions.

Usage

rvgs(n, family, xi)

Arguments

n

number of observations.

family

Supported families include Normal, Student, Contnormal, Powerexp, Hyperbolic, Slash, Sinh-normal and Sinh-t, which correspond to normal, Student-t, contaminated normal, power exponential, symmetric hyperbolic, slash, sinh-normal and sinh-t distributions, respectively.

xi

a numeric value or numeric vector that represents the extra parameter value of the specified distribution.

Value

x

a vector of n observations.

Author(s)

Luis Hernando Vanegas <hvanegasp@gmail.com> and Gilberto A. Paula

Examples

m1 <- "Standard Sinh-t distributions"
n <- 1000000
xi <- c(10,6,4)
plot(density(rvgs(n,"Sinh-t",xi=c(25,10))), xlim=c(-4.5,4.5), ylim=c(0,0.3), xlab="",
     ylab="", col=1, main="")
par(new=TRUE)
plot(density(rvgs(n,"Sinh-t",xi=c(25,6))), xlim=c(-4.5,4.5), ylim=c(0,0.3), xlab="",
     ylab="", col=2, main="")
par(new=TRUE)
plot(density(rvgs(n,"Sinh-t",xi=c(25,4))), xlim=c(-4.5,4.5), ylim=c(0,0.3), xlab="y",
     ylab="f(y)", main=m1, col=3)
legend(-4, 0.3, bty="n", legend=paste("xi = (",25,",",xi,")"), col=1:4, lty=1)

ssym documentation built on April 22, 2023, 1:13 a.m.