18 double & wght=(
double &) _wght;
20 const double sqrt_tpi =
sqrt(2*
PI);
31 double* pyi = y.
get_v() + 1;
32 double* pai = a.
get_v() + 1;
33 double* pbi = b.
get_v() + 1;
35 for (
int i=1;i<=nvar;++i)
37 double chii = *(pchi->
get_v() + i);
38 double ah = *pai / chii;
39 double bl = *pbi / chii;
42 double diff=upper-lower;
59 wght -= 0.5 * *pyi * *pyi;
68 double* paj = a.
get_v() + i;
69 double* pbj = b.
get_v() + i;
71 for (
int j=i;j<=nvar;++j)
73 double tmp = *pyi * *(pchj->
get_v() + i);
84 wght += in*
log(1./sqrt_tpi);
91 double & wght=(
double &) _wght;
93 const double sqrt_tpi =
sqrt(2*
PI);
109 for (
int i=1;i<=nvar;i++)
121 wght+=
log((1.0-pprobe)*
exp(-.5*y(i)*y(i))/(sqrt_tpi*diff)
129 for (
int j=i;j<=nvar;j++)
131 double tmp=y(i)*ch(j,i);
142 double& wght=(
double&) _wght;
153 for (
int i=1;i<=nvar;i++)
157 lower=
ffmax(-1.0,ah);
161 for (
int j=i;j<=nvar;j++)
163 double tmp=y(i)*ch(j,i);
void probing_bounded_multivariate_normal_mcmc(int nvar, const dvector &a1, const dvector &b1, dmatrix &ch, const double &wght, const dvector &v, double pprobe, const random_number_generator &rng)
Vector of double precision numbers.
double inv_cumd_norm(const double &x)
Description not yet available.
double density_cauchy(const double &x)
Description not yet available.
double ffmax(double a, double b)
double myran1(long int &)
double ffmin(double a, double b)
double log_density_cauchy(const double &x)
Description not yet available.
Description not yet available.
d3_array sqrt(const d3_array &arr3)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Description not yet available.
d3_array exp(const d3_array &arr3)
Returns d3_array results with computed exp from elements in arr3.
dvariable beta(const prevariable &a, const prevariable &b)
Beta density function.
Description not yet available.
void bounded_multivariate_uniform_mcmc(int nvar, const dvector &a1, const dvector &b1, dmatrix &ch, const double &wght, const dvector &y, const random_number_generator &rng)
double cumd_cauchy(const double &x)
Description not yet available.
double cumd_norm(const double &x)
Culative normal distribution; constant objects.
void bounded_multivariate_normal_mcmc(int nvar, const dvector &a1, const dvector &b1, dmatrix &ch, const double &wght, const dvector &y, const random_number_generator &rng)
d3_array log(const d3_array &arr3)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.