Displaying 3 results from an estimated 3 matches for "logdensity".
2005 Jul 19
1
initial points for arms in package HI
...start. To show the effect I constructed a demonstration
example. It is reproducible without further information.
Please note that my target density is not logconcave.
Thanks for all comments or ideas.
Christoph Buser
## R Code:
library(HI)
## parameter for the distribution
para <- 0.1
## logdensity
logDichteGam <- function(x, u = para, v = para) {
-(u*x + v*1/x) - log(x)
}
## density except for the constant
propDichteGam <- function(x, u = para, v = para) {
exp(-(u*x + v*1/x) - log(x))
}
## calculating the constant
(c <- integrate(propDichteGam, 0, 1000, rel.tol = 10^(-12))$valu...
2008 Sep 29
0
Acceptance rate in metrop
Hi I am using metrop in MCMC library. Since some times the prior density is 0 and
the log prior density would be –Inf, I ask the return value for loglikelihood
equal to Min.log, which is defined as log(.Machine$double.xmin)-400, whenever a
–Inf occurs to the logdensity. However,
I noticed if two Min.log’s happen in a row, the sampled parameter value for the
second Min.log is treated as accepted.
As a result, the parameters result in 0 prior density are included in my
results, which I do not want to do. How
should I deal with it to avoid the acceptance of these...
2008 Oct 15
0
R-help Digest, Vol 67, Issue 31
...o.com>
Content-Type: text/plain
Hi I am using metrop in MCMC library.? Since some times the prior density is 0 and
the log prior density would be ?Inf, I ask the return value for loglikelihood
equal to Min.log, which is defined as log(.Machine$double.xmin)-400, whenever a
?Inf occurs to the logdensity.? However,
I noticed if two Min.log?s happen in a row, the sampled parameter value for the
second Min.log is treated as accepted.?
As a result, the parameters result in 0 prior density are included in my
results, which I do not want to do.? How
should I deal with it to avoid the acceptance of these...