% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bayes_approx.R
\name{bayes_mh_censored}
\alias{bayes_mh_censored}
\title{Bayesian Inference via Metropolis-Hastings MCMC Algorithm}
\usage{
bayes_mh_censored(
  log_posterior,
  init_par,
  n_sim = 5000,
  burn_in = 1000,
  proposal_sd = 0.1
)
}
\arguments{
\item{log_posterior}{Function evaluating log-posterior density.}

\item{init_par}{Initial parameter values.}

\item{n_sim}{Total MCMC sample size.}

\item{burn_in}{Discarded burn-in samples.}

\item{proposal_sd}{Proposal standard deviation vector.}
}
\value{
S3 object of class \code{bayes_fit}.
}
\description{
Bayesian Inference via Metropolis-Hastings MCMC Algorithm
}
\examples{
log_post <- function(th) {
  if (th[1] <= 0) return(-Inf)
  dexp(th[1], rate = 1, log = TRUE) +
    sum(dexp(c(0.5, 1.2, 0.8), rate = th[1], log = TRUE))
}
bayes_mh_censored(
  log_post, init_par = c(1.0),
  n_sim = 1000, burn_in = 200
)
}
