SCM

Forum: help

Monitor Forum | Start New Thread Start New Thread
RE: Interpretation of sig2 and g in summary.BF [ Reply ]
By: Richard Morey on 2014-09-10 23:16
[forum:41439]
Hi Santiago,

The parameter sig2 is the error variance (same as in classical regression). g is a nuisance parameter you can probably safely ignore. In order to derive the posterior distribution of the residuals you'll have to use the parameters in the MCMC sampler to generate predicted values (there will be 1000 time N of them, if you sampled 1000 iterations), then subtract the observed from the predicted values. The easiest way to do this (right now, until I make a function to output these numbers) is to write a function to take each row of your MCMC results and produce predicted values, then apply() that function to each row.

Interpretation of sig2 and g in summary.BF [ Reply ]
By: Santiago Beguería on 2014-07-21 16:37
[forum:41435]
Hi,

I'm a bit confusing about the interpretation of sig2 and g_... when summarizing (the posterior of) a model fit with BayesFactor. For example:

data(puzzles)
bfFull = lmBF(RT ~ shape + color + shape:color + ID, data = puzzles, whichRandom = "ID")
samples = lmBF(RT ~ shape + color + shape:color + ID, data = puzzles, whichRandom = "ID", posterior = TRUE, iterations = 1000)
summary(samples)

I want to know the posterior distribution of the residuals from the model, but I'm not sure how to compute them from the outputs of summary.BF.

Feeling too newbie to BF, sorry...

Cheers,

Santiago

Thanks to:
Vienna University of Economics and Business Powered By FusionForge