Does prior[paramname] overwrite param[paramname]?

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Sunny Vagnozzi
Posts: 55
Joined: August 15 2016
Affiliation: Kavli Institute for Cosmology (KICC), University of Cambridge

Does prior[paramname] overwrite param[paramname]?

Post by Sunny Vagnozzi » 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: 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

Antony Lewis
Posts: 1936
Joined: September 23 2004
Affiliation: University of Sussex
Contact:

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

Post by Antony Lewis » 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

Sunny Vagnozzi
Posts: 55
Joined: August 15 2016
Affiliation: Kavli Institute for Cosmology (KICC), University of Cambridge

Does prior[paramname] overwrite param[paramname]?

Post by Sunny Vagnozzi » 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

Post Reply