sampler
manifestos
0.8

# Control the Generation of Random Numbers for Sampling from the Proposal Distribution¶

## Description¶

The functions `mvt.sampler`

and `mvnorm.sampler`

can be used to fine-tune the
construction and sampling from the proposal distribution in the importance sampling
algorithm used in the MCEM algorithm to fit `latpos`

models.

## Usage¶

```
mvt.sampler(df,fix.seed=TRUE) # Multivariate Student's t-distribution
mvnorm.sampler(fix.seed=TRUE) # Multivariate normal distribution
```

## Arguments¶

`df`

a number, the degrees of freedom of the multivariate Student’s t-distribution.

`fix.seed`

a logical value; if TRUE the seed of the random number generated is reset in each MCEM iteration to make sure that approximate marginal log-likelihood surface is continuous while the simulation sample size is constant.

## Value¶

Both functions return a list that contains a function to generate random numbers and to compute the log-density function of the distribution from which random numbers are generated.