CosmoMC: drawing samples according to a MVNormal distribution

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
gongbo zhao
Posts: 73
Joined: January 04 2005
Affiliation: NAOC
Contact:

CosmoMC: drawing samples according to a MVNormal distributio

Post by gongbo zhao » September 26 2016

Dear Antony and all,

Suppose I want to draw samples for a set of parameters which obey a given multivariate Gaussian distribution, is it easy to hack CosmoMC to do this? I see there is a patch for this purpose for early cosmomc versions (https://sites.google.com/site/adambmant ... rs#version), and I am wondering if it is easier to do it with new versions? It would be great if you could help with instructions.

Many thanks,
GB

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

Re: CosmoMC: drawing samples according to a MVNormal distrib

Post by Antony Lewis » September 27 2016

You can set 'test_likelihood=T. This will use as a likelihood your prior bounds and a Gaussian given by the covariance matrix (propose matrix) supplied.

Or you can use generic_mcmc=T and write your own in Generic_GetLogLikeMain.

Post Reply