Skip to content
Prev 15827 / 20628 Next

MCMCglmm Poisson with an offset term and splines

Hello Jarrod,


Thank you so much for your patience!


This is the model that I used:


mcmc <- MCMCglmm(y ~ age+x2+x8+x9+x3+l_lfvcspo+x4+x5+x6+x7+offset,
                 random =~ STUDYID+class+idv(l_lfvcspn),
                 data   = newdatab1,
                 family = "poisson", prior=prior)

I simply do not understand what am I doing wrong. These are my fixed terms:


1) age

2) x2

3) x8

4) x9

5) x3

6) l_lfvcspo

7) x4

8) x5

9) x6

10) x7

11) offset


There are thus 11 terms. If I add the intercept I obtain 12 fixed effects.


If I put k=12 per the number of fixed effects that I have, I get this error:


Error in MCMCglmm(y ~ age + x2 + x8 + x9 + x3 + l_lfvcspo + x4 + x5 +  :
  fixed effect mu prior is the wrong dimension


Do you think it might be an issue with the structure of the newdatab1 dataset? It seems Ok when I look at it. I do not know what else to do, I seem to have exhausted all options.


I apologize again, I really do not understand what am I doing wrong and how can I improve.


Best,

DNM


Sent from Outlook<http://aka.ms/weboutlook>