model{

  ## Likelihood ##
      for( i in 1 : Nbobs ) {
        M[i] ~ dnorm(mu[i], prec.obs[i])
        mu[i] ~ dnorm(theta, prec.date)
        prec.obs[i] <- 1/(s[i]*s[i])
        }
        
        # Introduction of a random effect : use of the Shrinkage distribution
        u ~ dunif(0,1) 
        prec.date <- 1/s02 *u /(1-u)     
        sd <- 1/sqrt(prec.date)
      
  ## Prior on the distribution of the date theta ##  
      theta ~ dunif(ta,tb)
      
}
