Print

Print


Dear ALL,

Any ideas as to how I might be able to sample from this uniform
distribution? I know what I want but I am not sure how to set this up
in WinBUGS.

Thanks,
Raphael

model {

for (j in 1:M) {

                        K[j] ~ dcat(p[1:N])
                        U[j] ~ dunif(-r[K[j]],r[K[j]])

                }

        # Contructive DPP
        for (k in 1:N) { r[k] ~ dgamma(1.5,tau.e) }
        for (k in 1:(N-1)) { V[k] ~ dbeta(1,1) }
        for (k in 2:N) { p[k] <- V[k]*(1-V[k-1])*p[k-1]/V[k-1] }
        V[N] <- 1
        p[1] <- V[1]



        # priors
        tau.e <- pow(2*pow(sig.e,2),-1)
        sig.e ~ dunif(0,6)

}


#### INITS
list(sig.e=3.0)

#### DATA
list(M=10,N=4)

-------------------------------------------------------------------
This list is for discussion of modelling issues and the BUGS software.
For help with crashes and error messages, first mail [log in to unmask]
To mail the BUGS list, mail to [log in to unmask]
Before mailing, please check the archive at www.jiscmail.ac.uk/lists/bugs.html
Please do not mail attachments to the list.
To leave the BUGS list, send LEAVE BUGS to [log in to unmask]
If this fails, mail [log in to unmask], NOT the whole list