% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bayes_approx.R
\name{importance_sampling_censored}
\alias{importance_sampling_censored}
\title{Importance Sampling for Posterior Estimation}
\usage{
importance_sampling_censored(
  log_target,
  proposal_pdf,
  rproposal,
  n_sim = 10000
)
}
\arguments{
\item{log_target}{Function evaluating log target density (unnormalized log posterior).}

\item{proposal_pdf}{Density function of proposal distribution.}

\item{rproposal}{Random generation function for proposal distribution.}

\item{n_sim}{Sample size of proposal draws.}
}
\value{
List with posterior mean estimates, normalized importance weights, and effective sample size.
}
\description{
Importance Sampling for Posterior Estimation
}
\examples{
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
)
}
