18 double& wght=(
double&) _wght;
19 const double rob1=0.95;
20 const double sqrt_tpi =
sqrt(2*
PI);
56 for (
int i=1;i<=nvar;i++)
87 nwght+=-.5*y*y -
log(sqrt_tpi*diff);
93 for (
int j=i;j<=nvar;j++)
107 for (
int i=1;i<=nvar;i++)
142 rwght+=
log((1.0-pprobe)*
exp(-.5*y*y)/(sqrt_tpi*diff)
149 for (
int j=i;j<=nvar;j++)
151 double tmp=y*ch(j,i);
157 double dd=rob1*(
exp(nwght-rwght))+1.0-rob1;
160 cerr <<
"dd <=0" <<
endl;
162 wght =
log(dd)+rwght;
171 double& wght=(
double&) _wght;
172 const double rob1=0.95;
173 const double sqrt_tpi =
sqrt(2*
PI);
199 for (i=1;i<=nvar;i++)
224 nwght+=-.5*y*y -
log(sqrt_tpi*diff);
230 for (
int j=i;j<=nvar;j++)
232 double tmp=y*ch(j,i);
241 for (i=1;i<=nvar;i++)
277 rwght+=
log((1.0-pprobe)*
exp(-.5*y*y)/(sqrt_tpi*diff)
285 wght =
log(rob1*(
exp(nwght-rwght))+(1.0-rob1))+rwght;
286 for (
int j=i;j<=nvar;j++)
288 double tmp=y*ch(j,i);
dvector new_probing_bounded_multivariate_normal(int nvar, const dvector &a1, const dvector &b1, dmatrix &ch, const double &wght, double pprobe, 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 better_rand()
Random number generator.
double myran1(long int &)
double log_density_cauchy(const double &x)
Description not yet available.
Description not yet available.
prnstream & endl(prnstream &)
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 initialize(void)
Initialze all elements of dvector to zero.
double inv_cumd_cauchy(const double &x)
Description not yet available.
void new_probing_bounded_multivariate_normal_mcmc(int nvar, const dvector &a1, const dvector &b1, dmatrix &ch, const double &wght, const dvector &_y, double pprobe, 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.
d3_array log(const d3_array &arr3)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.