{"action":"created","issue":{"url":"https://api.github.com/repos/nimble-dev/nimble/issues/107","labels_url":"https://api.github.com/repos/nimble-dev/nimble/issues/107/labels{/name}","comments_url":"https://api.github.com/repos/nimble-dev/nimble/issues/107/comments","events_url":"https://api.github.com/repos/nimble-dev/nimble/issues/107/events","html_url":"https://github.com/nimble-dev/nimble/issues/107","id":126777623,"number":107,"title":"initializeModel issues false warning about RHSonly variable not initialized ","user":{"login":"perrydv","id":8012337,"avatar_url":"https://avatars.githubusercontent.com/u/8012337?v=3","gravatar_id":"","url":"https://api.github.com/users/perrydv","html_url":"https://github.com/perrydv","followers_url":"https://api.github.com/users/perrydv/followers","following_url":"https://api.github.com/users/perrydv/following{/other_user}","gists_url":"https://api.github.com/users/perrydv/gists{/gist_id}","starred_url":"https://api.github.com/users/perrydv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/perrydv/subscriptions","organizations_url":"https://api.github.com/users/perrydv/orgs","repos_url":"https://api.github.com/users/perrydv/repos","events_url":"https://api.github.com/users/perrydv/events{/privacy}","received_events_url":"https://api.github.com/users/perrydv/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-15T00:07:28Z","updated_at":"2016-01-15T01:08:00Z","closed_at":null,"body":"a0[n,1:3]~dmnorm(Nmu[1:3],Nomega[1:3,1:3])\r\nlambda[n,1:3] <- exp(a0[n,1:3]) "},"comment":{"url":"https://api.github.com/repos/nimble-dev/nimble/issues/comments/171834293","html_url":"https://github.com/nimble-dev/nimble/issues/107#issuecomment-171834293","issue_url":"https://api.github.com/repos/nimble-dev/nimble/issues/107","id":171834293,"user":{"login":"slope","id":2008869,"avatar_url":"https://avatars.githubusercontent.com/u/2008869?v=3","gravatar_id":"","url":"https://api.github.com/users/slope","html_url":"https://github.com/slope","followers_url":"https://api.github.com/users/slope/followers","following_url":"https://api.github.com/users/slope/following{/other_user}","gists_url":"https://api.github.com/users/slope/gists{/gist_id}","starred_url":"https://api.github.com/users/slope/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slope/subscriptions","organizations_url":"https://api.github.com/users/slope/orgs","repos_url":"https://api.github.com/users/slope/repos","events_url":"https://api.github.com/users/slope/events{/privacy}","received_events_url":"https://api.github.com/users/slope/received_events","type":"User","site_admin":false},"created_at":"2016-01-15T01:08:00Z","updated_at":"2016-01-15T01:08:00Z","body":"This is simplified from code from a user who emailed me.  I think the\nproblem occurs when a node defined on LHS as a vector is split up (used as\nscalars) on the RHS.  This is valid but the resulting RHS nodes are counted\nas RHS-only, triggering the problem.  So it is not necessarily a bug in the\ninitializeModel nimbleFunction, just triggered there.  And the mcmc\ncontinues to run ok, but it has issued an unnecessary warning.\n\n## reduced case\ncode <- nimbleCode({\n    for (n in 1:N){\n        a0[n,1:3]~dmnorm(mu[1:3],Sigma[1:3,1:3])\n  #      lambda[n,1:3] <- exp(a0[n,1:3]) ## alternative, which shifts the\nproblem to lambda\n        for (k in 1:K){\n            lambda[n,k] <- exp(a0[n,k])\n            y[n,k]~dpois(lambda[n,k])\n        }\n    }\n})\n\nm <- nimbleModel(code, constants=list(N = 3, K = 3), inits = list(mu =\nrep(0,3), Sigma = diag(3)), data = list(y = matrix(rpois(9, 3), nrow =3)))\ncm <- compileNimble(m)\n\nRmcmc <- buildMCMC(m)\nCmcmc <- compileNimble(Rmcmc, project = m)\n\nRmcmc$run(1)\nCmcmc$run(1)\n\n## problem may be that lambda elements should not appear here:\nm$modelDef$maps$nodeNamesRHSonly\n\n\n\nOn Thu, Jan 14, 2016 at 4:50 PM, Christopher Paciorek <\nnotifications@github.com> wrote:\n\n> Can you show the full call to nimbleModel()?\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/nimble-dev/nimble/issues/107#issuecomment-171831664>.\n>\n"}}