小弟初学winbugs,需要用这个软件估计sv模型参数,对其代码看不懂,请帮忙注释一下,谢谢。
}model{
}### likelihood: joint distribution of y
}for(i in 1:n)
}{p
<-1/exp(theta)
}y~dnorm(0,p)
}}
}### prior distributions*
}phi1~dbeta(20,1.5)
}phi<-2*phi1-1
}mu~dnorm(0,0.01)
}itau2~dgamma(2.5,0.025)
}tau<-sqrt(1/itau2)
}theta0~dnorm(mu,itau2)
}thmean[1]<-mu+phi*(theta0-mu)
}theta[1]~dnorm(thmean[1],itau2)
}for(j in 2:n)
}{thmean[j]<-mu+phi*(theta[j-1]-mu)
}theta[j]~dnorm(thmean[j],itau2)
}}
}}
本文来自: 人大经济论坛 S-Plus&R专版 版,详细出处参考: https://bbs.pinggu.org/forum.php?mod=viewthread&tid=2153696&page=1&from^^uid=3129293