我正在尝试使用MCMCglmm建模一些数据,并在是否处于治疗条件下(BZ_ID)于4年(时间)内每年进行一次结局测量(HoNOSTotal)。
我对此很陌生,但这是我到目前为止所拥有的:
k <- length(levels(BZData$HoNOSTotal))
I <- diag(k-1)
J <- matrix(rep(1, (k-1)^2), c(k-1, k-1))
prior1 <- list(R = list(fix=1, V = 0.5*(I+J), nu = 0.002),
G = list(G1 = list(V = diag(1), nu = 0.002)))
mcmc<- MCMCglmm(HoNOSTotal ~ -1 + BZ_ID + Time + Time:BZ_ID,
data = BZData,
random = ~ us(-1 +ID),
family = "gaussian",
prior = prior1,
nitt = 1000,
burnin = 200)
summary(mcmc)
但是我不断收到错误消息:
Error in priorformat(if (NOpriorG) { :
V is the wrong dimension for some prior$G/prior$R elements
In addition: Warning messages:
1: Unknown or uninitialised column: 'family'.
2: Setting row names on a tibble is deprecated.
3: Unknown or uninitialised column: 'MCMC_dummy'.
如果任何人都可以提出有关如何解决此问题的建议,将不胜感激