R/rssg.R

Defines functions rssg

Documented in rssg

rssg<-function(n, alpha, Mu, Sigma, Lambda)
{
  Dim <- length(Mu)
	Y <- matrix(NA, nrow = n, ncol = Dim)
		for (i in 1:n)
		{
			Z <- rpstable(1, alpha)
			X <- mvrnorm( 1, mu = rep(0, Dim), Sigma = Sigma )
			u <- abs( rnorm(1) )
			Y[i, ] <- Mu + Lambda*u*sqrt(Z) + sqrt(Z)*X
		}
 Y
}

Try the mixSSG package in your browser

Any scripts or data that you put into this service are public.

mixSSG documentation built on Sept. 11, 2022, 5:06 p.m.