Page 1 of 1

CosmoMC: Importance Sampling

Posted: August 01 2006
by gongbo zhao
Dear all,
I have generated the binary *.data files using all data. Is it possible to substract some dataset by importance sampling (For example, I have *.data of CMB+SN+LSS ,now I want CMB+LSS ) ? Or the importance sampling can only "add" dataset rather than substract?
Thanks so much.


Cheers,
Gong-Bo Zhao

CosmoMC: Importance Sampling

Posted: August 01 2006
by Loison Hoi
Hi,

Set redo_add = F and then include the data sets you need, e.g. CMB+LSS. That should work.

Loison Hoi
1 Aug 2006

CosmoMC: Importance Sampling

Posted: August 02 2006
by gongbo zhao
HI,Loison,
Thanks for your reply.
Something on the "redo_likeoffset" parameter . From the original code in postprocess.f90:
weight = exp(like-truelike+PostParams%redo_likeoffset)
It seems "redo_likeoffset" should be the difference of ln(likelihood)between the new model and the old one. Roughly it can be set as the half of difference of the d.o.f. of the two models. The result is not sensitive to "redo_likeoffset", it just renormalizes the weight to a meaningful quantity. Am I right?

Best,
Gong-Bo Zhao

CosmoMC: Importance Sampling

Posted: August 02 2006
by Loison Hoi
Hi Gong-Bo,

Yes, seems right. At the end of may06 version postprocess.f90, there are two statements:

write (*,*) 'WARNING: use redo_likeoffset to rescale likelihoods'
write (*,*) 'Try redo_likeoffset = ',max_truelike - max_like

So, if you use a wrong value of offset, cosmomc will give you a hint. Usually, I will try several numbers, which are close to the \Delta (-ln L), to make the weight close to unity.

Loison Hoi
2 Aug 2006

CosmoMC: Importance Sampling

Posted: August 05 2006
by gongbo zhao
Thanks very much.

Gong-Bo