JAGS Poisson计数检查数据 [英] JAGS Poisson count censored data

查看:76
本文介绍了JAGS Poisson计数检查数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

R,Bayestats和Jags新手在这里.我正在对一些计数数据进行建模,并进行了正确的审查.泊松似乎是我最好的猜测.我想做一个分层模型,因为它给我提供了更多微调参数的可能性.我可以简单地写这样的东西吗?

R, Bayestats and Jags newbie here. I'm working on modeling some count data, right censored. Poisson seems to be my best guess. I wanna do a hierarchical model, as it leaves me with more possibilities to fine tune the parameterss. Can I simply write something like this:

A[i,j] <- dpois(a[i,j])

a[i,j]) <- b[i,]*x[i,j] +c[i] for all j,

其中x[i,j]是我的变量,还是应该将检查的时间间隔与之前的时间间隔或其他内容分开?

where x[i,j] are my variables, or should I separate the censored time interval from the previous ones or something?

b[,]c具有优先级.

谢谢!

推荐答案

对我来说,这尚不清楚,这应该是分层的.
您可以将时间效应与协变量效应分开,在这种情况下,协变量效应与桩号无关.
此外,您的GLM的线性部分应该为正,因为泊松分布需要正值.在这里查看: http://www.petrkeil.com/?p=1709
您的提议可能是:

This is not clear to me what is supposed to be hierarchical.
You can have the time effect separated from the covariate effect, in which case the covariate effect is not related to the station.
Moreover, the linear part of your GLM should be positive because poisson distribution requires positive values. Look here: http://www.petrkeil.com/?p=1709
A proposition for you could be:

b1 ~ prior
b2 ~ prior
c ~ prior
for (t in 1:n_time) {
  b_time[t] ~ prior
  for (i in 1:n_stations) {
    A[i,t] <- dpois(a[i,t])
    log(a[i,t]) <- b1*b_time[t]*X1[i,t] + b2*b_time[t]*X2[i,t]+ c[i]
}}

这篇关于JAGS Poisson计数检查数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆