Page 1 of 1

### How to marginalize over nuisance parameter using getdist ?

Posted: 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?

Best wishes.

Xiaobo

### Re: How to marginalize over nuisance parameter using getdist

Posted: October 28 2017
Ignoring n2 values is equivalent to marginalization - it's that simple.

### How to marginalize over nuisance parameter using getdist ?

Posted: October 29 2017
Hi, Antony

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 ?