Control the Generation of Random Numbers for Sampling from the Proposal Distribution¶
Description¶
The functions mvt.sampler
and mvnorm.sampler
can be used to finetune 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 tdistribution
mvnorm.sampler(fix.seed=TRUE) # Multivariate normal distribution
Arguments¶
df

a number, the degrees of freedom of the multivariate Student’s tdistribution.
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 loglikelihood 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 logdensity function of the distribution from which random numbers are generated.