mGetDist: Multivariate Random Observations Generetor

Description Usage Arguments Value Examples

Description

Multivariate Random observations generator selected from several distributions with user defined mean and variance.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
mgetDist(
  n,
  nv,
  mu = 0,
  sigma = NULL,
  correlation = 0,
  s = NULL,
  dists = NULL,
  dists.par = NULL
)

Arguments

n

scalar. Number of observations to be generated.

nv

scalar. Number of variables to be generated.

mu

scalar. Expected value of the desired distribution.

sigma

scalar. Standard deviation of the desired distribution.

correlation

scalar. Corralation between variables.

s

matrix. Correlation matrix of the variables

dists

list. Select the

dists.par

matrix For each variable (column), specify

  • par.location: Location parameter of the desired distribution. Default 0.

  • par.scale: Scale parameter of the desired distribution. Default 1.

  • par.shape: Shape parameter of the desired distribution, Default 1.

The number of columns must be the same as the number of variables.

Value

A matrix x with n observations generated following the selected distribution with its parameters.

Examples

1
mgetDist(n=5, nv=2, dists=c("Normal", "Normal"),dists.par= matrix(c(0,1,1,0,1,1), ncol=2))

LuisBenavides/SNS documentation built on April 11, 2021, 3:50 p.m.