From: Andrew G. <ge...@st...> - 2007-10-03 22:56:25
|
I'm confused because bugs has sims.list, sims.matrix, and sims.array, but I don't see sims. In the ?bugs help, it says that "for convenience, the 'n.keep * n.chains' simulations in sims.matrix and sims.list (but NOT sims.array) have been randomly permuted" The reason why we scramble the simulations is so we can more easily access random draws from the posterior distribution. We can then just use the first 10 simulations or the first 100 or whatever to do posterior simulations (see chapter 6 of BDA for various examples). Checking for convergence--which is the same thing as assessing mixing--isn't a problem since we check convergence on the unscrambled series that are in sims.array. You can always use sims.array if you want to work with these. Andrew Anon. wrote: > Uwe Ligges wrote: >> I think this was proposed by Andrew Gelman in the original code and I >> already had the discussion but forgot the outcome (people would like >> to have it randomized?, Andrew?). >> >> Anyway, a fix would be to add drop = FALSE as in >> >> sims <- sims [sample(n.sims), , drop = FALSE] # scramble (for >> convenience in analysis) >> >> > I'm curious - how can you check for convergence if the order is > randomised? I'm thinking of cases where both chains are moving in the > same direction towards the part of the posterior with high probability > mass. It also makes mixing more difficult to assess, although this is > less critical. > > I would certainly prefer not to have this randomised - there are > disadvantage, and if you want the results randomise, it's easy to do > (hey, it's one line of code!). OTOH, if it's already randomised, it's > difficult to impossible to unscramble it. > > Bob > -- Andrew Gelman Professor, Department of Statistics Professor, Department of Political Science Director, Applied Statistics Center Columbia University, New York ge...@st... www.stat.columbia.edu/~gelman Usual schedule: Mon, Tues, Fri in Statistics Dept ofc: Social Work Bldg (Amsterdam Ave at 122 St), Room 1016 phone 212-851-2142, fax 212-851-2164 Wed, Thurs in Political Science Dept ofc: International Affairs Bldg (Amsterdam Ave at 118 St), Room 731 phone 212-854-7075, fax 212-222-0598 Wed, Thurs from 2:30pm onward in Playroom: International Affairs Bldg, Room 707 I'm out of town 11-12 Oct, 26 Oct, and 15-23 Nov. |