Description Usage Arguments Value Examples

The function ARsim() draws from the random variable, which is specified by the density f, using acceptance rejection sampling. The default proposal density is the exponential density with rate 1. If you want to use a different density you have to set the argument "exponential" to FALSE and specify your new proposal density and the corresponding inverse distribution function.

1 2 |

`f` |
target density |

`C` |
constant such that f(x) <= C*g(x) |

`N` |
number of samples |

`exponential` |
indicates if we want to use the exponential density as proposal |

`rate` |
corresponding rate |

`propdensity` |
alternative proposal if needed |

`inveresepropdist` |
corresponding inverse distribution function |

returns a list containing the value of the integral, the 0.95-confidence interval, number of simulations and the function f

1 2 3 4 5 |

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.