[CosmoMC Nov 2016] Selective sampling off CosmoMC likelihood calculator
[CosmoMC Nov 2016] Selective sampling off CosmoMC likelihood
Dear Antony,
I'm currently thinking of using CosmoMC for the calculation of the likelihood for a given set of parameter lists, where I can set the parameter values that CosmoMC samples from.
Am I right in thinking this should be done in the GenericLikelihoodFunction part of the code because I'd assume that's reserved for calculating the likelihood in a different way, rather than just attaining a given likelihood for a given set of parameters.
Once again, apologies if this is obvious, my Fortran is a bit shaky so any help will be appreciated!
Luke
I'm currently thinking of using CosmoMC for the calculation of the likelihood for a given set of parameter lists, where I can set the parameter values that CosmoMC samples from.
Am I right in thinking this should be done in the GenericLikelihoodFunction part of the code because I'd assume that's reserved for calculating the likelihood in a different way, rather than just attaining a given likelihood for a given set of parameters.
Once again, apologies if this is obvious, my Fortran is a bit shaky so any help will be appreciated!
Luke

 Posts: 1445
 Joined: September 23 2004
 Affiliation: University of Sussex
 Contact:
Re: [CosmoMC Nov 2016] Selective sampling off CosmoMC likeli
If you are using a custom function, rather than cosmology codes + likelihoods using them, you can use GenericLikelihoodFunction to use CosmoMC as a generic sampler.
[CosmoMC Nov 2016] Selective sampling off CosmoMC likelihood
Sorry Antony I donâ€™t think I was clear in what I needed.
I want specific samples from CosmoMC using the same infrastructure. Using the same datasets in the same way
However, the sampling on the grid I want is just a set amount of samples around the fiducial model. Essentially just the best fit parameters and then each parameter plus or minus a small change, as necessary for the Fisher analysis.
I also need to vary one integer parameter that indexes certain changes to my code. So I believe itâ€™s a little more complicated than just using estimate_propose_matrix.
Thanks
Luke
I want specific samples from CosmoMC using the same infrastructure. Using the same datasets in the same way
Code: Select all
include(BAO.ini)
I also need to vary one integer parameter that indexes certain changes to my code. So I believe itâ€™s a little more complicated than just using estimate_propose_matrix.
Thanks
Luke

 Posts: 1445
 Joined: September 23 2004
 Affiliation: University of Sussex
 Contact:
Re: [CosmoMC Nov 2016] Selective sampling off CosmoMC likeli
I guess you'd need to write your own code to call the likelihood functions. e.g. you can see how the minimize.f90 file does it for minimization.
[CosmoMC Nov 2016] Selective sampling off CosmoMC likelihood
Dear Antony,
Thank you for your suggestions, I'm currently rooting around in CosmoMC now. The complication I'm finding is that I'm trying to make sure that nuisance parameters are marginalised over as well, so I'm struggling to see where I can pass these new samples over and how. The BOBYQA routines are giving me hints but I'm confused as to how they actually get a set list of samples.
Thanks
Luke
Thank you for your suggestions, I'm currently rooting around in CosmoMC now. The complication I'm finding is that I'm trying to make sure that nuisance parameters are marginalised over as well, so I'm struggling to see where I can pass these new samples over and how. The BOBYQA routines are giving me hints but I'm confused as to how they actually get a set list of samples.
Thanks
Luke