Simulating Random Observations from an Arbitrary Distribution

Description Usage Arguments Author(s) See Also Examples

Simulation observations from an arbitrary discrete distribution with probabilities arranged in desending/ascending order.

1 | ```
ST_Unordered(N, x, p_x)
``` |

`N` |
number of required random observations |

`x` |
the possible values of the RV |

`p_x` |
the probability vector associated with x |

Prabhanjan N. Tattar

sample

1 2 3 4 | ```
N <- 1e2
x <- 1:10
p_x <- c(0.05,0.17,0.02,0.14,0.11,0.06,0.05,0.04,0.17,0.19)
ST_Unordered(N,x,p_x)
``` |

ACSWR documentation built on May 29, 2017, 8:41 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.