[R-sig-Geo] Openbugs doesn't seen to want to thin.. ?

Virgilio Gómez-Rubio virgilio.gomez at uclm.es
Mon Aug 26 12:51:50 CEST 2013


Hi James,


How many areas do you have? Also, 40K seems too much. Try to reduce it
to 4K. I believe that this number is not the total number of iterations
(including thinning) but the number of iterations to keep after
thinning. So, if you set it to a thinning of 10 and 4K iterations
OpenBUGS will be running for 10*5k iterations and keeping just 4k.
But I may be wrong as I have not used the script language in WB for a
long time.

If your data set is large, you may also want to try INLA to fit the same
model. It is faster and it can handle large datasets.


Hope this helps,

Virgilio

El lun, 26-08-2013 a las 11:22 +0100, James Rooney escribió:
> Hi all,
> 
> Doing some spatial smoothing using the BYM model from the ASDAR book.
> I was using Winbugs but had lots of troubles so switched to Openbugs.
> Unfortunately having a new problem running out of memory.
> I have tried to fix it with thinning - however Openbugs does not seem to want to thin.
> My Openscript is below (generated by R2Openbugs).
> But no matter what I set the thin level too it still gives me the full 40,000 iterations in the CODA file.
> This is a problem because Openbugs is 32bit and above 40k iterations my model gets bigger than 4GB.
> 
> Anyone know why it is not thinning ?
> Thanks,
> James
> 
> Script (FYI - I've clipped the pathnames out). This runs fine but the 3 in the modelUpdate() command has no effect - no matter what I change it to it saves all 40,000 samples.
> 
> modelDisplay('log')
> modelCheck('model.txt')
> modelData('data.txt')
> modelCompile(2)
> modelSetRN(1)
> modelInits('inits1.txt',1)
> modelInits('inits2.txt',2)
> modelGenInits()
> modelUpdate(1000,3,1000)
> samplesSet(theta)
> samplesSet(alpha)
> samplesSet(tau)
> samplesSet(precv)
> samplesSet(deviance)
> summarySet(theta)
> summarySet(alpha)
> summarySet(tau)
> summarySet(precv)
> summarySet(deviance)
> dicSet()
> modelUpdate(40000,3,40000)
> samplesCoda('*', '//')
> summaryStats('*')
> dicStats()
> samplesHistory('*')
> modelSaveLog('log.odc')
> modelSaveLog('log.txt')
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo



More information about the R-sig-Geo mailing list