To view this discussion on the web visit https://groups.google.com/d/msgid/nimble-users/276114410.3368806.1631191185395%40mail.yahoo.com.
Hello,
Thank you for the quick response.I have assign dflat() as a prior and also dnorm(0.0,1. 0E-4) (in previous attempts), as show in the file JS_NimbleCode.txt
the .png file idea was to show where I am adding the beta0 and beta1.Please, find attached all the code, that will be able to make a reproducibe example with the file "Data1.txt" of the first message.The small amount of iteration is to make sure that the model is working. I have increase it, but the result still the same.
To view this discussion on the web visit https://groups.google.com/d/msgid/nimble-users/00390c1a-0baa-4f12-b337-b0ae243d4c80n%40googlegroups.com.
Hi,
You need better starting values to fit the model. Try using *for z*:
z.init <- Data1
z.init[z.init==0] <- 1
and use:
inits<- list(…. z=z.init,…)
Good luck!
José
De: nimble...@googlegroups.com <nimble...@googlegroups.com>
En nombre de diegoro...@gmail.com
Enviado el: jueves, 9 de septiembre de 2021 15:00
Para: nimble-users <nimble...@googlegroups.com>
Asunto: Re: JS model, Bayesian popualtion analysis
Hello,
Thank you for the quick response.
I have assign dflat() as a prior and also
dnorm(0.0,1. 0E-4) (in previous attempts), as show in the file JS_NimbleCode.txt
the .png file idea was to show where I am adding the beta0 and beta1.
Please, find attached all the code, that will be able to make a reproducibe example with the file "Data1.txt" of the first message.
The small amount of iteration is to make sure that the model is working. I have increase it, but the result still the same.
On Thursday, September 9, 2021 at 3:50:38 PM UTC+3 db...@williams.edu wrote:
To view this discussion on the web visit https://groups.google.com/d/msgid/nimble-users/00390c1a-0baa-4f12-b337-b0ae243d4c80n%40googlegroups.com.
nimbleOptions(buildInterfacesForCompiledNestedNimbleFunctions = TRUE)at the beginning of the script.
nimbleOptions(MCMCsaveHistory = TRUE)
(SJ.conf$getSamplers())[[1]] # to check that this sampler is beta0
(SJ.conf$getSamplers())[[2]] # to check that this sampler is beta1
SJ.samples <- runMCMC(SJ.cMCMC, niter = 100000, nburnin = 500,
nchains = 1, summary=TRUE)
# Acceptance history for beta1
> SJ.cMCMC$samplerFunctions[[2]]$acceptanceHistory
[1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[38] 0 0 0 0 0 0 0 0 0 0 0 0 0
# Scale history for beta1
> SJ.cMCMC$samplerFunctions[[2]]$scaleHistory
[1] 1.000000e+00 2.342284e-01 6.955616e-02 2.435549e-02 9.632360e-03
[6] 4.184906e-03 1.959725e-03 9.757500e-04 5.113471e-04 2.798741e-04
[11] 1.590176e-04 9.333845e-05 5.637687e-05 3.492686e-05 2.213414e-05
[16] 1.431594e-05 9.431663e-06 6.318920e-06 4.298888e-06 2.966065e-06
[21] 2.073176e-06 1.466555e-06 1.049038e-06 7.581905e-07 5.532984e-07
[26] 4.074402e-07 3.025849e-07 2.265103e-07 1.708381e-07 1.297638e-07
[31] 9.922632e-08 7.635721e-08 5.911277e-08 4.602460e-08 3.602924e-08
[36] 2.835077e-08 2.241895e-08 1.781189e-08 1.421539e-08 1.139404e-08
[41] 9.170403e-09 7.409987e-09 6.010296e-09 4.892817e-09 3.997109e-09
[46] 3.276421e-09 2.694424e-09 2.222767e-09 1.839227e-09 1.526317e-09
warning: problem initializing stochastic node z[49, 3]: logProb is -Inf.
warning: problem initializing stochastic node z[53, 4]: logProb is -Inf.
Hello,
Thank you for the quick response.I have assign dflat() as a prior and also dnorm(0.0,1. 0E-4) (in previous attempts), as show in the file JS_NimbleCode.txt
the .png file idea was to show where I am adding the beta0 and beta1.Please, find attached all the code, that will be able to make a reproducibe example with the file "Data1.txt" of the first message.
The small amount of iteration is to make sure that the model is working. I have increase it, but the result still the same.
On Thursday, September 9, 2021 at 3:50:38 PM UTC+3 db...@williams.edu wrote:
To view this discussion on the web visit https://groups.google.com/d/msgid/nimble-users/00390c1a-0baa-4f12-b337-b0ae243d4c80n%40googlegroups.com.