我正在编写一个JAGS
脚本(分层贝叶斯模型),其中事件的时间被建模为两个进程之间的竞争。
观察:time
是事件的测量时间。
模型:两个具有高斯率的过程-哪个过程最先完成都会触发该事件。
目标:估算两个过程的速度。
model{
# Priors
mu1 ~ dnorm( 0,1 ) # rate of one process
mu2 ~ dnorm( 0,1 ) # rate of other process
sigma1 <- 1 # variability in rate
sigma2 <- 0.1 # variability in rate
# Observations
for (i in 1:N)
rate1[i] ~ dnorm( mu1, sigma1 ) # Sample the two
rate2[i] ~ dnorm( mu2, sigma2 ) # racing processes.
rmax[i] <- max( rate1[i], rate2[i] ) # which was faster?
time[i] ~ 1/rmax[i] #### This is wrong!
}
}
问题:如何显示时间是从两个比率中较大的一个中取样的,每个比率都是从不同的分布中取样的?
示例模拟的time
数据的直方图,对于两个过程(固定为1和0.1)使用具有不同标准偏差的mu1=3, mu2=3