If I may jump into a question aimed at Andrew, the formula you refer to
based on the variance of the deviance is almost but not quite right.
Instead of adding the contributions to the deviance and summing them,
you should take the variances of the individual contributions to the
deviance and add them. That gives you the WAIC penalty.
Martyn
On Thu, 2014-05-22 at 12:45 +0000, Corey Sparks wrote:
> Andrew, do you still condone using this definition of DIC, where pD is
> based off the variance in the deviance, which is always positive?
>
>
> http://andrewgelman.com/2006/07/06/number_of_param/
>
>
> Corey
>
> Corey Sparks
> Assistant Professor
> Department of Demography
> College of Public Policy
> 501 West Cesar E Chavez Blvd
> Monterrey Building 2.270C
> San Antonio, TX 78207
> corey.sparks 'at' utsa.edu
> 210 458 3166
>
> On May 22, 2014, at 5:48, "Andrew Gelman" <[log in to unmask]>
> wrote:
>
>
> > Hi, I recommend you use WAIC instead of DIC; see here:
> > http://www.stat.columbia.edu/~gelman/research/published/waic_understand3.pdf
> > and here:
> > http://www.stat.columbia.edu/~gelman/research/unpublished/waic_stan.pdf
> > Andrew
> >
> > On May 21, 2014, at 9:29 AM, Arunabh Tripathi <[log in to unmask]>
> > wrote:
> >
> > > I fitted the following model in data but the DIC came negative .
> > > Whether it is wrong or right.
> > >
> > >
> > >
> > >
> > >
> > >
> > > DbarDhat pDDIC
> > > y54.556 608.981-554.425 -499.869
> > > total54.556 608.981-554.425 -499.869
> > >
> > >
> > >
> > >
> > > model
> > > {
> > > for( i in 1 : 16 ) {
> > > y[i] ~ dnorm(mu[i], tau)
> > > mu[i] <- alpha - beta * pow(gamma,X1[i])
> > > }
> > > alpha ~ dnorm(0.0, 1.0E-6)
> > > beta ~ dnorm(0.0, 1.0E-6)
> > > gamma ~ dunif(0.5, 1.0)
> > > tau ~ dgamma(0.001, 0.001)
> > > sigma <- 1 / sqrt(tau)
> > >
> > > }
> > > X1[] y[]
> > > 0 71
> > > 1 72
> > > 2 70
> > > 3 68
> > > 4 66
> > > 5 NA
> > > 6 60
> > > 7 58
> > > 8 58
> > > 9 57
> > > 10 55
> > > 11 53
> > > 12 50
> > > 13 47
> > > 14 44
> > > 15 42
> > > END
> > >
> > >
> > > list(alpha = 1, beta = 1, tau = 1, gamma = 0.9)
> > > ------------------------------------------------------------------- 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
> >
> >
> > -------------------------------------------------------------------
> > 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
> -------------------------------------------------------------------
> 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
-----------------------------------------------------------------------
This message and its attachments are strictly confidential. If you are
not the intended recipient of this message, please immediately notify
the sender and delete it. Since its integrity cannot be guaranteed,
its content cannot involve the sender's responsibility. Any misuse,
any disclosure or publication of its content, either whole or partial,
is prohibited, exception made of formally approved use
-----------------------------------------------------------------------
-------------------------------------------------------------------
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
|