adequate convergence.
Which means what? The chains came to the same central tendency?
adequate convergence.
Which means what? The chains came to the same central tendency?
With 28 subjects, there are a total of 30 parameters being estimated.
what are they? 28 omegas and ?? two thetas??
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.
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.
kappaMinusTwo
Where is this defined?
we must use one that adequately expresses our prior knowledge.
I have to keep asking....What if we have no prior knowledge?
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?
K = 75 instead of K = 5. T
So K is super important. How do we guess about it again?
of the two subjects, and simultaneously estimate ω of the drug that influenced them.
Are we talking about people or coins here?
θ depends on the value of ω
the bias of the coin depends on the bias of the factory? Well, I hope so.
The value of κ governs how near θ is to θ,
is this a mistake? Are there supposed to be different symbols for theta?
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...
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?
no signs of orphaned chains.
Which would look like what?
codaSamples
Is the term "coda" here related to the musical term (which refers to the ending passage of a song)?
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.
orphaned
Does this mean isolated in a corner of parameter space? If so, how does that relate to loss of parents?
model {for(i in 1:Ntotal ) { y[i] ~ dbern( theta )} theta ~ dbeta(1, 1)}
Are spaces and line returns important here??
sum(y)/length(y)
Yep, that's the mean.
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.
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?!?!?
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!!!!
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.
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.
Bernoulli distribution
I'm starting to regret this thread in the book. Can we use Bernoulli for anything else???
and a prior distribution,
OK. included in the model.
All we have to do is tell JAGS the data and the model
Not prior??? How the hell?
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?