rSMSN {BayesCR} | R Documentation |

## Generate SMSN Random Variables

### Description

`rSMSN`

Generate random variables with one of the following distributions:
Normal, Student-t, Contaminated Normal, Slash, Skew-Normal, Skew-t and Skew-Slash.

### Usage

```
rSMSN(n, mu, sigma2, lambda, nu, dist)
```

### Arguments

`n` |
Number of observations to be generated. |

`mu` |
Location parameter. |

`sigma2` |
Scale parameter. |

`lambda` |
Shape parameter (control skewness). Only must be provided for Skew-Normal, Skew-t and Skew-Slash distributions. |

`nu` |
Degree of freedom. Must not be provided for Normal and Skew-Normal distribution. Must be a vector of length 2 for Contaminated-Normal distribution. |

`dist` |
Distribution to be used: "Normal" for Normal model, "T" for Student-t model, "Slash" for slash model, "NormalC" for contaminated Normal model, "SN" for Skew-Normal model, "ST" for Skew-t model and "SSL" for Skew-Slash model. |

### Details

If Y follows a Contaminated Normal model, than a observation y comes from a normal distribution with mean "mu"" and variance "sigma2/rho" with probabilty "nu" and comes from a normal distribution with mean "mu" and variace "sigma2" with probability "1-nu".

### See Also

### Examples

```
# Generate a sample with 100 observations of a symmetric Student-t distribution
sample <- rSMSN(n=100,mu=5,sigma2=2,lambda=0,nu=3,dist="T")
```

*BayesCR*version 2.1 Index]