View source: R/random_values_simulation.R
Angular central Gaussian random values simulation | R Documentation |
Angular central Gaussian random values simulation.
racg(n, sigma, seed = NULL)
n |
The sample size, a numerical value. |
sigma |
The covariance matrix in |
seed |
If you want the same to be generated again use a seed for the generator, an integer number. |
The algorithm uses univariate normal random values and transforms them to multivariate via a spectral decomposition. The vectors are then scaled to have unit length.
A matrix with the simulated data.
Michail Tsagris
R implementation and documentation: Michail Tsagris <mtsagris@uoc.gr>
Tyler D. E. (1987). Statistical analysis for the angular central Gaussian distribution on the sphere. Biometrika 74(3): 579-589.
acg.mle, rmvnorm, rmvlaplace, rmvt
s <- cov( iris[, 1:4] )
x <- racg(100, s)
res<-acg.mle(x)
res<-vmf.mle(x) ## the concentration parameter, kappa, is very low, close to zero, as expected.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.