CosmoMC: "ERROR: Trial parameters excluded by prior or error in likelihood"

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Seshadri Nadathur
Posts: 2
Joined: February 01 2010
Affiliation: Oxford University

CosmoMC: \"ERROR: Trial parameters excluded by prior or

Post by Seshadri Nadathur » February 01 2010

Hi,

I am working with the CosmoMC Oct 2009 release with a modified version of CAMB to include a different routine for generating the primordial power spectrum. (I have extensively tested the functioning of CAMB alone, and it produces output in line with what I expect, based on reproducing earlier results.)

After altering CAMB, I altered settings.f90, params_CMB.f90, params.ini and params_CMB.paramnames in the source directory in order to account for the difference in the parametrization of the primordial power spectrum of my model compared to the standard LCDM. (My parametrization does not require normalization parameters logA and r, however for the sake of convenience I have left them in the params.ini file with fixed values rather than alter the code to avoid problems with norm_freq_ix etc.) I am using WMAP5 data only, without tensors. The total number of parameters I am varying is 7 (3 fast).

As this is the first run of the altered code I do not have a proposal matrix, so I have set propose_matrix empty and estimate_propose_matrix = T.

The code then attempts to find the max-like point and goes through a few iterations of determining the gradient with respect different elements before giving the error message:
ERROR: Trial parameters excluded by prior or error in likelihood
Try starting further away from problem regions?
I have followed through the code and it appears this error message is being generated because the program ends up in subroutine OutOfBounds, because the parameter asz acquires a value that is outside the min-max range set in params.ini (it gets larger than 2 as well as smaller than 0). All other parameters are at values I would have expected.

Can anyone please explain how to get around this problem? I have left the start value, maximum, minimum etc. for asz exactly as they were in the downloaded version of CosmoMC.

Seshadri Nadathur
Posts: 2
Joined: February 01 2010
Affiliation: Oxford University

CosmoMC: \"ERROR: Trial parameters excluded by prior or

Post by Seshadri Nadathur » February 01 2010

As a test, I have instead chosen to keep asz fixed at its central value of 1 (in the downloaded version of Cosmomc, it has start center, min, max, start width and st. dev. estimate as 1, 0, 2, 0.4, 0.4 respectively). Now the code runs, determines a max-like point and starts generating chains fine. So the problem was only with asz.

In params.ini asz is described as the "SZ amplitude, as in WMAP analysis". Being new to this, I'm not actually sure what role asz plays. A trial run with the unmodified version of Cosmomc does not seem to constrain it very much (the marginalized posterior distribution is far from being a Gaussian!), so I'm really unsure how to deal with this problem.

Any help will be much appreciated!

jayanti prasad
Posts: 14
Joined: October 21 2010
Affiliation: Inter-University Centre for Astronomy and Astrophysics (IUCAA)
Contact:

CosmoMC: \"ERROR: Trial parameters excluded by prior or

Post by jayanti prasad » May 09 2012

please answer. I tried very hard to create the covariance matrix but I could not even for the default case. As I understand, in the case when no covariance matrix is given, the program tries to find the maximum likelihood point using conjugate gradient method and then grids are drawn for computing Hessian and covariance matrix.

The program is crashing right in the first part with the message as given in the subject. Please let me know if anyone was able to create a covariance matrix.

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

Re: CosmoMC: \\\"ERROR: Trial parameters excluded by pr

Post by Antony Lewis » May 10 2012

I suggest you just run new chains using a partial covariance matrix (with MPI proposal learning options on), the estimate_propose_matrix option is not very reliable.

jayanti prasad
Posts: 14
Joined: October 21 2010
Affiliation: Inter-University Centre for Astronomy and Astrophysics (IUCAA)
Contact:

CosmoMC: \"ERROR: Trial parameters excluded by prior or

Post by jayanti prasad » May 21 2012

Thanks Antony for the reply.

Could you please explain "partial covariance matrix".

Another thing is that cosmomc gives the same problem for MCMC action=2: (find best fit point only) also, I guess due to the same problem. The module (conjugate gradient) which is used to find the best fit value only for the covariance matrix also seems to be not working.

I really want to use cosmomc for a model for which I do not have any idea of covariance matrix please let me know how to proceed.

Regards
jayanti

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

Re: CosmoMC: \\\"ERROR: Trial parameters excluded by pr

Post by Antony Lewis » May 21 2012

Just start running with one of the supplied standard covariance matrices.

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

Re: CosmoMC: \"ERROR: Trial parameters excluded by pr

Post by Antony Lewis » October 05 2012

As of the Oct 2012 version, best-fit finding (action=2) and estimate_propose_matrix should work more reliably, esp. with parameters that have hard prior cuts.

Post Reply