Page 1 of 1

Does prior[paramname] overwrite param[paramname]?

Posted: April 25 2017
by Sunny Vagnozzi
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: Select all

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: Select all

param[paramname] = center min max start_width propose_width
2) as a corollary of the above (assuming it is correct), does

Code: Select all

prior[paramname]
always overwrite

Code: Select all

param[paramname]
, although the latter is always necessary?

Thanks! Cheers,
Sunny

Re: Does prior[paramname] overwrite param[paramname]?

Posted: April 25 2017
by Antony Lewis
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

Does prior[paramname] overwrite param[paramname]?

Posted: April 25 2017
by Sunny Vagnozzi
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