# RNG (random number generators)
# install.packages("MCMCpack")
require(MCMCpack)
## Loading required package: MCMCpack
## Loading required package: coda
## Loading required package: MASS
## ##
## ## Markov Chain Monte Carlo Package (MCMCpack)
## ## Copyright (C) 2003-2021 Andrew D. Martin, Kevin M. Quinn, and Jong Hee Park
## ##
## ## Support provided by the U.S. National Science Foundation
## ## (Grants SES-0350646 and SES-0350613)
## ##
# Uniform distribution generator
# num <- number of variants to generate
# min <- minimum  number in range
# max <- maximum number in range
x     <- runif(200,min = 5,max = 10) 


# Normal distribution generator
# num = number of deviates to generate
# xmean = mean of the distribution you want
# xSD = standard deviation of deviates you want
w = rnorm(200,-12,16.3)


# Chi-square generator
# num = number of deviates to generate
# df = degrees of freedom
# ncp = non-centrality parameter, usually 0
w = rchisq(15,24,0)



# Inverted Wishart matrix generator
# df = degrees of freedom
# SS = matrix of sum of squares and cross products
# U = riwish(df,SS)

# New (co)variance matrix is the inverse of U
# V = ginv(U)