Chapter Introduction
NAG C Library Manual

## g05 – Random Number Generators

 RoutineName Mark ofIntroduction Purpose g05cac Example Text 1 nag_random_continuous_uniform Pseudo-random real numbers, uniform distribution over (0,1) g05cbc Example Text 1 nag_random_init_repeatable Initialise random number generating functions to give repeatable sequence g05ccc Example Text 1 nag_random_init_nonrepeatable Initialise random number generating functions to give non-repeatable sequence g05cfc Example Text 1 nag_save_random_state Save state of random number generating functions g05cgc Example Text 1 nag_restore_random_state Restore state of random number generating functions g05dac Example Text 1 nag_random_continuous_uniform_ab Pseudo-random real numbers, uniform distribution over (a,b) g05dbc Example Text 1 nag_random_exp Pseudo-random real numbers, (negative) exponential distribution g05ddc Example Text 1 nag_random_normal Pseudo-random real numbers, Normal distribution g05dyc Example Text 1 nag_random_discrete_uniform Pseudo-random integer from uniform distribution g05eac Example Text 2 nag_ref_vec_multi_normal Set up reference vector for multivariate Normal distribution g05ecc Example Text 2 nag_ref_vec_poisson Set up reference vector for generating pseudo-random integers, Poisson distribution g05edc Example Text 2 nag_ref_vec_binomial Set up reference vector for generating pseudo-random integers, binomial distribution g05ehc Example Text 3 nag_ran_permut_vec Pseudo-random permutation of an integer vector g05ejc Example Text 3 nag_ran_sample_vec Pseudo-random sample without replacement from an integer vector g05exc Example Text 2 nag_ref_vec_discrete_pdf_cdf Set up reference vector from supplied cumulative distribution function or probability distribution function g05eyc Example Text 2 nag_return_discrete Pseudo-random integer from reference vector g05ezc Example Text 2 nag_return_multi_normal Pseudo-random multivariate Normal vector from reference vector g05fec Example Text 2 nag_random_beta Pseudo-random real numbers from the beta distribution g05ffc Example Text 2 nag_random_gamma Pseudo-random real numbers from the gamma distribution g05hac Example Text 3 nag_arma_time_series ARMA time series of n terms g05hkc 6 nag_generate_agarchI Univariate time series, generate n terms of either a symmetric GARCH process or a GARCH process with asymmetry of the form (εt-1 + γ)2 g05hlc 6 nag_generate_agarchII Univariate time series, generate n terms of a GARCH process with asymmetry of the form (|εt-1| + γ εt-1)2 g05hmc 6 nag_generate_garchGJR Univariate time series, generate n terms of an asymmetric Glosten, Jagannathan and Runkle (GJR) GARCH process g05kac Example Text 7 nag_rngs_basic Pseudo-random real numbers, uniform distribution over (0,1), seeds and generator number passed explicitly g05kbc Example Text 7 nag_rngs_init_repeatable Initialise seeds of a given generator for random number generating functions (that pass seeds explicitly) to give a repeatable sequence g05kcc Example Text 7 nag_rngs_init_nonrepeatable Initialise seeds of a given generator for random number generating functions (that pass seeds expicitly) to give non-repeatable sequence g05kec Example Text 7 nag_rngs_logical Pseudo-random logical (boolean) value, seeds and generator number passed explicitly g05lac Example Text 7 nag_rngs_normal Generates a vector of random numbers from a Normal distribution, seeds and generator number passed explicitly g05lbc Example Text 7 nag_rngs_students_t Generates a vector of random numbers from a Student's t-distribution, seeds and generator number passed explicitly g05lcc Example Text 7 nag_rngs_chi_sq Generates a vector of random numbers from a χ2 distribution, seeds and generator number passed explicitly g05ldc Example Text 7 nag_rngs_f Generates a vector of random numbers from an F-distribution, seeds and generator number passed explicitly g05lec Example Text 7 nag_rngs_beta Generates a vector of random numbers from a β distribution, seeds and generator number passed explicitly g05lfc Example Text 7 nag_rngs_gamma Generates a vector of random numbers from a γ distribution, seeds and generator number passed explicitly g05lgc Example Text 7 nag_rngs_uniform Generates a vector of random numbers from a uniform distribution, seeds and generator number passed explicitly g05lhc Example Text 7 nag_rngs_triangular Generates a vector of random numbers from a triangular distribution, seeds and generator number passed explicitly g05ljc Example Text 7 nag_rngs_exp Generates a vector of random numbers from an exponential distribution, seeds and generator number passed explicitly g05lkc Example Text 7 nag_rngs_lognormal Generates a vector of random numbers from a lognormal distribution, seeds and generator number passed explicitly g05llc Example Text 7 nag_rngs_cauchy Generates a vector of random numbers from a Cauchy distribution, seeds and generator number passed explicitly g05lmc Example Text 7 nag_rngs_weibull Generates a vector of random numbers from a Weibull distribution, seeds and generator number passed explicitly g05lnc Example Text 7 nag_rngs_logistic Generates a vector of random numbers from a logistic distribution, seeds and generator number passed explicitly g05lpc Example Text 7 nag_rngs_von_mises Generates a vector of random numbers from a von Mises distribution, seeds and generator number passed explicitly g05lqc Example Text 7 nag_rngs_exp_mix Generates a vector of random numbers from an exponential mixture distribution, seeds and generator number passed explicitly g05lzc Example Text 7 nag_rngs_multi_normal Generates a vector of random numbers from a multivariate Normal distribution, seeds and generator number passed explicitly g05mac Example Text 7 nag_rngs_discrete_uniform Generates a vector of random integers from a uniform distribution, seeds and generator number passed explicitly g05mbc Example Text 7 nag_rngs_geom Generates a vector of random integers from a geometric distribution, seeds and generator number passed explicitly g05mcc Example Text 7 nag_rngs_neg_bin Generates a vector of random integers from a negative binomial distribution, seeds and generator number passed explicitly g05mdc Example Text 7 nag_rngs_logarithmic Generates a vector of random integers from a logarithmic distribution, seeds and generator number passed explicitly g05mec Example Text 7 nag_rngs_compd_poisson Generates a vector of random integers from a Poisson distribution with varying mean, seeds and generator number passed explicitly g05mjc Example Text 7 nag_rngs_binomial Generates a vector of random integers from a binomial distribution, seeds and generator number passed explicitly g05mkc Example Text 7 nag_rngs_poisson Generates a vector of random integers from a Poisson distribution, seeds and generator number passed explicitly g05mlc Example Text 7 nag_rngs_hypergeometric Generates a vector of random integers from a hypergeometric distribution, seeds and generator number passed explicitly g05mrc Example Text 7 nag_rngs_gen_multinomial Generates a vector of random integers from a multinomial distribution, seeds and generator number passed explicitly g05mzc Example Text 7 nag_rngs_gen_discrete Generates a vector of random integers from a general discrete distribution, seeds and generator number passed explicitly g05nac Example Text 7 nag_rngs_permute Pseudo-random permutation of an integer vector g05nbc Example Text 7 nag_rngs_sample Pseudo-random sample from an integer vector g05pac Example Text 7 nag_rngs_arma_time_series Generates a realisation of a time series from an ARMA model g05pcc Example Text Example Data 7 nag_rngs_varma_time_series Generates a realisation of a multivariate time series from a VARMA model g05qac Example Text 7 nag_rngs_orthog_matrix Computes a random orthogonal matrix g05qbc Example Text Example Data 7 nag_rngs_corr_matrix Computes a random correlation matrix g05qdc Example Text 7 nag_rngs_2_way_table Generates a random table matrix g05yac Example Text 7 nag_quasi_random_uniform Multi-dimensional quasi-random number generator with a uniform probability distribution g05ybc Example Text 7 nag_quasi_random_normal Multi-dimensional quasi-random number generator with a Gaussian or log-normal probability distribution

Chapter Introduction
NAG C Library Manual

© The Numerical Algorithms Group Ltd, Oxford UK. 2002