# targetFun: Target Distributions In thq80/Cornuet_2012_Adaptive-Mutiple-IS: A R Adaptive Multiple Importance Sampling

## Description

Functions returning a target distribution. These function provide an example of implementation for three interesting targets. They use a function closure approach in order to accept a general set of arguments and to store in their environment the variables specified by the user. The returned function must be in the form

``` target(x) ```

## Arguments

 `x` A `p`-dimensional observation

## Value

The value of the log-density.

## Example of Target Distributions

`targetBanana(sig=100,b=0.01,log=TRUE)`:

Banana Shaped Target from Haario et al. (1999):

`sig`

Variance of x_2;

`b`

"Banana-ness" parameter. Moderate banana shape: b=0.01. Strong banana shape: b=0.03.

log

logical: should the log-density be returned.

`targetMVN(Mu=rep(0,2),Sigma=diag(1,2,2))`:

Multivariate Normal Target:

`Mu`

Vector of Means;

`Sigma`

Covariance Matrix.

`targetMix(alpha=rep(.5,2),Mu=matrix(0,2,2),Sigma=array(cbind(diag(1,2,2),diag(1,2,2)),dim=c(2,2,2)))`:

Gaussian Mixture Target:

`alpha`

Vector of Mixture probabilities;

`Mu`

Matrix of Means (by row);

`Sigma`

Array of Covariance Matrices.

## Author(s)

Luca Pozzi, p.luc@stat.berkeley.edu

## References

Haario, H., Saksman, E., and Tamminen, J. (1999). Adaptive proposal distribution for random walk Metropolis algorithm. Computational Statistics, 14:375-395.

See also `proposal`. For more details see the tutorial in `vignette("demoARAMIS")`.
 ```1 2 3``` ```targetBanana()(c(1,2)) targetMVN()(c(1,2)) targetMix()(c(1,2)) ```