rstable {QRMlib}R Documentation

Stable Distribution

Description

random sample from stable distribution

Usage

rstable(n, alpha, beta=1)

Arguments

n sample size
alpha scalar parameter strictly larger than 0 and smaller than 2 (but avoid alpha=1)
beta scalar parameter between -1 and 1

Details

see pages 224 and 498 of QRM; default value beta=1 combined with an alpha value less than 1 gives positive stable distribution which we require for Gumbel copula generation; the case alpha=1 has not been implemented

Value

sample of size n

References

Forthcoming John Nolan Book; see Definition 1.8 and Theorem 1.19

See Also

rcopula.gumbel

Examples

## Not run: 
#Use rstable() method in copula simulation function
rcopula.Gumbel2Gp <- function(n = 1000, 
       gpsizes =c(2,2), theta =c(2,3,5))
{
  Y <- rstable(n,1/theta[1])*(cos(pi/(2*theta[1])))^theta[1];
  innerU1 <- rcopula.gumbel(n,theta[2]/theta[1],gpsizes[1]);
  innerU2 <- rcopula.gumbel(n,theta[3]/theta[1],gpsizes[2]);
  U <- cbind(innerU1,innerU2);
  Y <- matrix(Y, nrow = n, ncol = sum(gpsizes));                               
  out <- exp( - ( - log(U)/Y)^(1/theta[1]));
  return(out);
}
## End(Not run)


[Package QRMlib version 1.4.4 Index]