28 Matching Annotations
  1. Apr 2022
    1. how easy it is to implement a hierarchical model in JAGS

      This makes me really angry. I am so far from being able to specify this sort of thing. Just want to stop reading now.

    2. dgamma distribution generates a variable called kappaMinusTwo, and then kappa itself is kappaMinusTwo + 2. This

      So JAGS is not working in an ordered fashion. If it ran top to bottom then KappaMinusTwo would be undefined.

    3. In real situations, we do not know the value of κ in advance, and instead we let the data inform us regarding its credible values. Intuitively, when the data from different coins show very similar proportions of heads, we have evidence that κ is high. But when the data from different coins show diverse proportions of heads, then we have evidence that κ is small.

      OK, so K is estimated by first looking at the data?

  2. www.sciencedirect.com www.sciencedirect.com
    1. Here is the “Bernoulli ones trick.” First, notice that dbern(1|θ) = θ. In other words, if we write JAGS code 1 ~ dbern( theta ), it yields a likelihood that is the value of theta. If we define, in another line of JAGS code, the value of theta as the desired likelihood at y[i], then the result is the likelihood at y[i] . Thus, the JAGS model statements together yield the same thing as y[i] ~ pdf ( parameters ). The variable name spy[i] stands for scaled probability of yi.

      Not getting this at all...

    2. It is straight forward to have JAGS generate an MCMC sample from the prior: We simply run the program with no data included.

      Seems simple - but why do we have to sample it with Jags. Why not just get a small systematic sample?

    3. To install JAGS, s

      Just "brew install jags" for macs.

      or maybe not. runjags cannot seem to find the jags installation. rjags seems OK with it. Going to do library office hours tomorrow I guess.

      OK. DEFINITELY NOT. BREW JUST MESSES THIS UP. DOWNLOAD THE INSTALLER LIKE A GOOD LITTLE PERSON.

    4. The MLE is the value of the parameter that maximizes the likelihood function, which is to say, the value of the parameter that maximizes the probability of the data.

      I'm thinking this is going to be an incredibly complicated way of getting to the mean of the coin flips.

    5. JAGS employs comment syntax just like R<math><mstyle fontfamily="Centaur" is="true"><mi mathvariant="normal" is="true">R</mi></mstyle></math>.

      Good to know. What about white space and line returns?!?!?

    6. To get the model specification into JAGS, we create the specification as a character string in R<math><mstyle fontfamily="Centaur" is="true"><mi mathvariant="normal" is="true">R</mi></mstyle></math>

      This should be stated first!!!!

    7. model { for(i in 1:Ntotal ) { y[i] ~ dbern( theta ) # likelihood}theta ~ dbeta(1, 1) # prior}

      What do we do with this. R does not accept this as code.

    8. To reiterate: when describing a model, the description logically flows from data to likelihood (with its parameters) to prior. If the representational medium is graphs of distributions, then the logical flow goes from bottom to top. If the representational medium is text such as English or computer code, then the logical flow goes from top to bottom.

      What? Why? When? How? What a load of useless abstraction.

  3. Jan 2022
    1. I will use a noncommittal and vague prior that places virtually equal prior credibility across a vast range of possible values for the slope and intercept, both centered at zero

      This is too vague for me. Are we talking about a function, a distribution, a number, or what?