How to marginalize over nuisance parameter using getdist ?
How to marginalize over nuisance parameter using getdist ?
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
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

 Posts: 1444
 Joined: September 23 2004
 Affiliation: University of Sussex
 Contact:
Re: How to marginalize over nuisance parameter using getdist
Ignoring n2 values is equivalent to marginalization  it's that simple.
How to marginalize over nuisance parameter using getdist ?
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 fastslow sampling treat model parameters and nuisance parameters differently in the dynamical MCMC sampling. So (2) Is fastslow 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
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 fastslow sampling treat model parameters and nuisance parameters differently in the dynamical MCMC sampling. So (2) Is fastslow 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

 Posts: 1444
 Joined: September 23 2004
 Affiliation: University of Sussex
 Contact:
Re: How to marginalize over nuisance parameter using getdist
Even in standard MetropolisHastings 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).
If samples_are_chains = F you should still be OK (as long as weights are all one, not being ignored).