CosmoCoffee Forum Index CosmoCoffee

 
 FAQFAQ   SearchSearch  MemberlistSmartFeed   MemberlistMemberlist    RegisterRegister 
   ProfileProfile   Log inLog in 
Arxiv New Filter | Bookmarks & clubs | Arxiv ref/author:

How to marginalize over nuisance parameter using getdist ?
 
Post new topic   Reply to topic    CosmoCoffee Forum Index -> Computers and software
View previous topic :: View next topic  
Author Message
Bob Zou



Joined: 21 Jul 2016
Posts: 5
Affiliation: Beijing Institute of Technology

PostPosted: October 28 2017  Reply with quote

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
Back to top
View user's profile  
Antony Lewis



Joined: 23 Sep 2004
Posts: 1291
Affiliation: University of Sussex

PostPosted: October 28 2017  Reply with quote

Ignoring n2 values is equivalent to marginalization - it's that simple.
Back to top
View user's profile [ Hidden ] Visit poster's website
Bob Zou



Joined: 21 Jul 2016
Posts: 5
Affiliation: Beijing Institute of Technology

PostPosted: October 29 2017  Reply with quote

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
Back to top
View user's profile  
Antony Lewis



Joined: 23 Sep 2004
Posts: 1291
Affiliation: University of Sussex

PostPosted: November 01 2017  Reply with quote

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).
Back to top
View user's profile [ Hidden ] Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    CosmoCoffee Forum Index -> Computers and software All times are GMT + 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group. Sponsored by WordWeb online dictionary and dictionary software.