jrfaulkner / spmrf

R package for Bayesian nonparametric adaptive smoothing with Stan
GNU Lesser General Public License v3.0
8 stars 4 forks source link

bug in get_model() for binomial models #5

Closed pgajer closed 6 years ago

pgajer commented 6 years ago

Hi Jim,

In the line bintrans <- "real pp[N];\n\treal logp[N];\n\n\tfor (i in 1:N){\n\t\tpp[j] = (y[i]+0.0)/(Nsize[i]+0.0);\n\t\tif (pp[i]==0.0)\n\t\t\tpp[i] = 0.005;\n\t\tif (pp[i]==1.0)\n\t\t\tpp[i] = 0.995;\n\t\tlogp[i] = logit(pp[i]);\n\t}\n"

pp[j] should be changed to pp[i]

Best, :) pawel

jrfaulkner commented 6 years ago

Pawel, thank you very much for finding the error! I apologize for not being able to fix it yet. I hope to have time tomorrow evening to work on it. Thanks again!

Jim

On Wed, Nov 29, 2017 at 9:00 AM, Pawel notifications@github.com wrote:

Hi Jim,

In the line bintrans <- "real pp[N];\n\treal logp[N];\n\n\tfor (i in 1:N){\n\t\tpp[j] = (y[i]+0.0)/(Nsize[i]+0.0);\n\t\tif (pp[i]==0.0)\n\t\t\tpp[i] = 0.005;\n\t\tif (pp[i]==1.0)\n\t\t\tpp[i] = 0.995;\n\t\tlogp[i] = logit(pp[i]);\n\t}\n"

pp[j] should be changed to pp[i]

Best, :) pawel

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jrfaulkner/spmrf/issues/5, or mute the thread https://github.com/notifications/unsubscribe-auth/AKVwoBZ6FzBL8du3RSxytlZu4YkoP-eTks5s7Y2TgaJpZM4QvTF2 .

jrfaulkner commented 6 years ago

Fixed today. Thanks again, Pawel!