| importance_sampling_censored | R Documentation |
Importance Sampling for Posterior Estimation
importance_sampling_censored(
log_target,
proposal_pdf,
rproposal,
n_sim = 10000
)
log_target |
Function evaluating log target density (unnormalized log posterior). |
proposal_pdf |
Density function of proposal distribution. |
rproposal |
Random generation function for proposal distribution. |
n_sim |
Sample size of proposal draws. |
List with posterior mean estimates, normalized importance weights, and effective sample size.
importance_sampling_censored(
log_target = function(th) dexp(th, rate = 2, log = TRUE),
proposal_pdf = function(th) dexp(th, rate = 1),
rproposal = function(n) rexp(n, rate = 1),
n_sim = 1000
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.