multinomial model help

15 views
Skip to first unread message

Brook Milligan

unread,
Nov 5, 2025, 11:42:42 AMNov 5
to nimble-users
I am trying to get a multinomial model (see attached) to work but get the following error:

Error in genVarInfo3() : inconsistent dimensions for variable lambda
Calls: nimbleMCMC ... mcmc_createModelObject -> nimbleModel -> <Anonymous> -> genVarInfo3
Execution halted

I suspect the problem is from the following line:

q[1:N] <- k[1:N] ^ lambda

in which I try to raise a vector to a scalar power. However, I may be misunderstanding.

Is this not possible? If not, how can a model like this be expressed?

Thanks for your help.

Cheers,
Brook


test.R

Dr. Heather Gaya

unread,
Nov 5, 2025, 1:12:35 PMNov 5
to Brook Milligan, nimble-users
Hey Brook,

Check your initial values. runif(0.01, 1) doesn't create any values. I think you meant runif(1, .01, 1). 

-Heather 

--
You received this message because you are subscribed to the Google Groups "nimble-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nimble-users...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/nimble-users/1091A970-F436-4117-A73B-7F820DDFD3E1%40biology.nmsu.edu.

Brook Milligan

unread,
Nov 5, 2025, 1:39:50 PMNov 5
to Dr. Heather Gaya, nimble-users
Hi Heather,

Thanks a lot. Of course that was the problem. I was too used to the model section, where the extra argument is not needed, that I overlooked it. Good catch.

Cheers,
Brook
Reply all
Reply to author
Forward
0 new messages