rvgs function

Random generation for some symmetric continuous distributions.

Random generation for some symmetric continuous distributions.

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

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.

Returns

  • x: a vector of nn 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)
  • Maintainer: Luis Hernando Vanegas
  • License: GPL-2 | GPL-3
  • Last published: 2023-04-22

Useful links