Here is my problem: I need to use hupossion in MCMCglmm package. Here is my prior:
> prior = list(R = list(V = diag(2), nu = 0.002), + G = list(G1 = list(V = diag(10), nu = 0.002), + G2 = list(V = 1, nu = 0.002)))
and here is my training:
> myTrain <- MCMCglmm(pipenumyearnosameday ~ trait - 1 + + at.level(trait,1):lastyearnumnosameday + + at.level(trait,1):pipeInsideSizemm, + random = ~idh(pipematerialgroup1):installyeargroup1, + data = train, + prior = prior, + verbose = F, + pr=T, + family = "hupoisson", + rcov = ~idh(trait):units)
There are 5 levels in the attribute pipematerialroup1. I know sth must be wrong with the prior. I got the following information:
Error in MCMCglmm(pipenumyearnosameday ~ trait - 1 + at.level(trait, 1):lastyearnumnosameday + : prior$G has the wrong number of structures
there is one more thing I need to say:
myPredict <- predict(myTrain,newdata = myTest,type = "response",marginal = ~idh(trait):pipematerialgroup1,interval = "confidence")
This is my prediction part when I just take pipematerialgroup1 as random effect. If combine pipematerialgroup1 and installyeargroup1, what this prediction would be?
Can someone help me get the prior right? Thanks a lot.