我叫地球仪 发表于 2011-12-8 21:36 
能否请童鞋讲的更清楚些?比如说我想做收益方程扰动项符号来做,那我该怎么编?是
if(e>0),y
You can not use “if” or “then” or “where” type statements in WinBUGS, 
but you can essentially implement such statements with creative code that 
utilizes the “step” and“equals” functions.
ex:
  y~dnorm(mu,tau)
  mu <- mu0 + beta*(step(x)*x + (1-step(x))*pow(x,2))
  fits a linear model for x>0 and a quadratic response for x<0 
http://www.mrc-bsu.cam.ac.uk/bugs/faqs/contents.shtml#q15