Robbie wrote:
Could someone point me toward an example of using MCMC with weighted
observations? Even a WinBugs sample would help me get off dead center
on this.
Assuming a Gaussian response, the weights would go into the precision:
# Model
model {
for(i in 1:N) {
x[i] ~ dnorm(mu, tau[i])
tau[i] <- wt[i]*tau0
}
mu ~ dnorm(0,0.001)
tau0 ~ dgamma(0.01, 0.01) # May not be the best prior!
}
# Data
list(N=5, x=c(2,3,4,5,6), wt=c(1,1,4,2,7))
Bob
--
Bob O'Hara
Department of Mathematics and Statistics
P.O. Box 68 (Gustaf Hällströmin katu 2b)
FIN-00014 University of Helsinki
Finland
Telephone: +358-9-191 51479
Mobile: +358 50 599 0540
Fax: +358-9-191 51400
WWW:
http://www.RNI.Helsinki.FI/~boh/
Journal of Negative Results - EEB:www.jnr-eeb.org