How to marginalize over nuisance parameter using getdist ?

Use of Healpix, camb, CLASS, cosmomc, compilers, etc.
Post Reply
Bob Zou
Posts: 5
Joined: July 21 2016
Affiliation: Beijing Institute of Technology

How to marginalize over nuisance parameter using getdist ?

Post by Bob Zou » October 28 2017

Hi,
I am confused about how getdist do marginalizing over nuisance parameters. if we sample over N=n1+n2, N is number of total MCMC parameters, n1 is number of model parameters while n2 is number of nuisance parameters. After successfully sampling, we got the chains file (test.txt), each column corresponds to the chains of each parameters.

Here my confusion comes. How should we do marginalizing over n2 nuisance parameters, of course we can just read columns of n1 model paramters and get the contour plot, but it seems that no integration or averaging over nuisance n2 parameters is done.

So what is right way to use getdist to marginalize over n2 nuisance parameters?

Thanks for your reply.
Best wishes.

Xiaobo

Antony Lewis
Posts: 1353
Joined: September 23 2004
Affiliation: University of Sussex
Contact:

Re: How to marginalize over nuisance parameter using getdist

Post by Antony Lewis » October 28 2017

Ignoring n2 values is equivalent to marginalization - it's that simple.

Bob Zou
Posts: 5
Joined: July 21 2016
Affiliation: Beijing Institute of Technology

How to marginalize over nuisance parameter using getdist ?

Post by Bob Zou » October 29 2017

Hi, Antony
thanks for your quick reply.

In the chain file (.txt), the first two column are weights of this MCMC step.
It seems that the marginalization over nuisance parameters has been done every step in your MCMC engine and quantified with the two weights value. So (1) Could you give me a brief picture that how the weights are produced for every step? We know that your fast-slow sampling treat model parameters and nuisance parameters differently in the dynamical MCMC sampling. So (2) Is fast-slow responsible for the weights?

In the given getdist script, there is an option "samples_are_chains = ". If I have got sampling chains using other MCMC engine like emcee and want to use getdist separately to produce the plot (samples_are_chains = F), there are no weights value in the chains file(.txt) that emcee produced. (3) if I want to marginalize over nuisance parameters in this case, will that be wrong if I still just ignore the columns of the nuisance parameters ?

Thanks for your reply.
Best Wishes

Xiaobo

Antony Lewis
Posts: 1353
Joined: September 23 2004
Affiliation: University of Sussex
Contact:

Re: How to marginalize over nuisance parameter using getdist

Post by Antony Lewis » November 01 2017

Even in standard Metropolis-Hastings CosmoMC produces integer weights that are not necessarily equal to one: it's just the number of steps at each point that the chain stays on that point after rejecting proposals.

If samples_are_chains = F you should still be OK (as long as weights are all one, not being ignored).

Post Reply