View previous topic :: View next topic |
Author |
Message |
Sunny Vagnozzi
Joined: 15 Aug 2016 Posts: 43 Affiliation: Oskar Klein Centre, Stockholm University
|
Posted: April 25 2017 |
|
|
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 always overwrite , although the latter is always necessary?
Thanks! Cheers,
Sunny |
|
Back to top |
|
 |
Antony Lewis
Joined: 23 Sep 2004 Posts: 1332 Affiliation: University of Sussex
|
Posted: April 25 2017 |
|
|
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 |
|
 |
Sunny Vagnozzi
Joined: 15 Aug 2016 Posts: 43 Affiliation: Oskar Klein Centre, Stockholm University
|
Posted: April 25 2017 |
|
|
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 |
|
 |
|