A very simple question:
Imagine I’m running winbugs to fit a model like this
(is only to show my question)
model
{for (i in 1:N)
{Data[i]~dnorm(mu[i],a[i])
mu[i]<-ma+mb
a[i]<-sa+sb
}
# priors
ma~dnorm(0,0.01)
mb~dnorm(0,0.01)
sa~dgamma(0.1,0.01)
sb~dgamma(0.1,0.01)
########### end
of model
ma and sa, mb
and sb, are respectively the mean and std. dev of two effects described by:
effectA~dnorm(ma,sa)
effectB~dnorm(mb,sb)
The problem is
this: if I want to see the distribution with mean=ma and standard deviation=sa
what have I to do?
Is there a way to
simulate it within winbugs code?
Usually I use
the results of the calculation and I sample the distribution with another code
(Matlab):
I draw samples
from ma and sa and I sample from a normal with mean and std. dev sampled
before.
However this is
not very comfortable and fast.
I imagine there
is a way to do this in winbugs but probably I’m not too skilled….
Warm Regards and
thank you
Stefano Albieri
_________________________________________________________________________________________________________________
Questo messaggio e da intendersi esclusivamente ad uso del destinatario e puo contenere informazioni che sono di natura privilegiata, confidenziale
o non divulgabile secondo le leggi vigenti. Se il lettore del presente messaggio non e il destinatario designato, o il dipendente/agente responsabile
per la consegna del messaggio al destinatario designato, si informa che ogni disseminazione, distribuzione o copiatura di questa comunicazione e
strettamente proibita anche ai sensi del decreto legislativo 196/03 . Se avete ricevuto questo messaggio per errore, vi preghiamo di notificarcelo
immediatamente a mezzo e-mail di risposta e successivamente di procedere alla cancellazione di questa e-mail e relativi allegati dal vostro sistema.
_________________________________________________________________________________________________________________
This message is intended only for the use of the addressee and may contain information that is privileged, confidential and exempt from
disclosure under applicable law. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the
message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly
prohibited. If you have received this e-mail in error, please notify us immediately by return e-mail and delete this e-mail and all attachments from
your system.
_________________________________________________________________________________________________________________