how does jags impute left -censored data

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

how does jags impute left -censored data

huyn0098

I read your post on censored data
http://doingbayesiandataanalysis.blogspot.com/2012/01/complete-example-of-right-censoring-in.html

and I am wondering if you know how JAGS internally imputes the censored values.  In the post, you indicated that the likelihood function but how exactly does that work?

Also in WINBUGS, there is a way to obtain the missing values, can we do that in JAGS?  
Thank you for your book and effort to make Bayesian understandable.


model {
        for (i in 1:N) {
                above.lod[i] ~ dinterval( x[i] , llodVec[i] )
                x[i] ~ dnorm( mu , tau)
        }
        mu ~ dnorm(0, 0.01)
        tau <- 1/(sigma*sigma)
        sigma ~ dunif(0.18, 2.5)
}
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how does jags impute left -censored data

John K. Kruschke
Administrator

I think you just code isCensored as 0 for left censored and 1 for not censored. This is because of the meaning of saying that
isCensored ~ dinterval( y , limit )
dinterval gives a value of 0 below the limit and 1 above the limit. (Actually, you can put in a vector of limits.) The 0 and 1 values should not be interpreted as true and false; the 0 and 1 simply mark below or above the limit.

Hope this helps!



On Tue, Jul 16, 2013 at 12:39 PM, huyn0098 [via Doing Bayesian Data Analysis] <[hidden email]> wrote:

I read your post on censored data
http://doingbayesiandataanalysis.blogspot.com/2012/01/complete-example-of-right-censoring-in.html

and I am wondering if you know how JAGS internally imputes the censored values.  In the post, you indicated that the likelihood function but how exactly does that work?

Also in WINBUGS, there is a way to obtain the missing values, can we do that in JAGS?  
Thank you for your book and effort to make Bayesian understandable.


model {
        for (i in 1:N) {
                above.lod[i] ~ dinterval( x[i] , llodVec[i] )
                x[i] ~ dnorm( mu , tau)
        }
        mu ~ dnorm(0, 0.01)
        tau <- 1/(sigma*sigma)
        sigma ~ dunif(0.18, 2.5)
}



If you reply to this email, your message will be added to the discussion below:
http://doing-bayesian-data-analysis.12272.x6.nabble.com/how-does-jags-impute-left-censored-data-tp5000697.html
To start a new topic under Doing Bayesian Data Analysis, email [hidden email]
To unsubscribe from Doing Bayesian Data Analysis, click here.
NAML

Loading...