CosmoCoffee Forum Index CosmoCoffee

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

Does prior[paramname] overwrite param[paramname]?
 
Post new topic   Reply to topic    CosmoCoffee Forum Index -> Computers and software
View previous topic :: View next topic  
Author Message
Sunny Vagnozzi



Joined: 15 Aug 2016
Posts: 32
Affiliation: Oskar Klein Centre, Stockholm University

PostPosted: April 25 2017  Reply with quote

Dear Antony et al.,

I have a basic question concerning priors (Gaussian or flat) on parameters in CosmoMC. If I add a new parameter, let's call it paramname:
1) if I want to give it a Gaussian prior via
Code:
prior[paramname]=mean std
do I still need to specify a range (i.e. a flat prior) anyway (e.g. in the same .ini file?)
Code:
param[paramname] = center min max start_width propose_width

2) as a corollary of the above (assuming it is correct), does
Code:
prior[paramname]
always overwrite
Code:
param[paramname]
, although the latter is always necessary?

Thanks! Cheers,
Sunny
Back to top
View user's profile  
Antony Lewis



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

PostPosted: April 25 2017  Reply with quote

1. Yes
2. No, the two are independent things. param[paramnames] sets hard bounds for the range of the parameters, prior[paramname] sets a Gaussian-shaped prior within that bound
Back to top
View user's profile [ Hidden ] Visit poster's website
Sunny Vagnozzi



Joined: 15 Aug 2016
Posts: 32
Affiliation: Oskar Klein Centre, Stockholm University

PostPosted: April 25 2017  Reply with quote

Thanks Antony,

as for 2), what I meant is, while specifying param[paramname] is necessary, if I on top of it specify prior[paramname], CosmoMC will be sampling that parameter from the Gaussian distributionspecified by prior[paramname], using param[paramname] only to restrict the range of values from which it draws samples (hard limits), but not sampling this parameter according to the associated uniform distribution? Is this correct?

Cheers,
Sunny
Back to top
View user's profile  
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.