Page **1** of **1**

### CosmoMC: problem analyzing simulated noise free data

Posted: **January 20 2005**

by **Tor Helge Huse**

I'm trying to use cosmomc with some simulated noise free data (only cosmic variance) and have written simple chisquared functions to get the likelihoods. All good so far. However I'm not able to produce large enough chains to get any meaningful statistics. The probability distributions for various parameter does not look as nice as they should...

I have tried to vary the standard deviation estimates and start width in params.ini but to no avail.

Have anyone done this and could point me in the right direction to what could be done to improve the lack of chain numbers?

kind regards

Tor Helge Huse

### Re: CosmoMC: problem analyzing simulated noise free data

Posted: **January 20 2005**

by **Antony Lewis**

I have done things at somewhat lower than Planck noise OK, but not at cosmic variance. I think you will have to be very careful with accuracy parameters, and that they are the same in your simulation (and it's not clear that if you are including lensing, the lensed C_l analysis will give the right answer for cosmic variance limited data).

Why do the chains stop? (i.e. do you have a really low acceptance rate? Or is a problem with CosmoMC?)

What are you using for the proposal density? Are you using **MPI_Learn_Propose**?

### CosmoMC: problem analyzing simulated noise free data

Posted: **January 20 2005**

by **Tor Helge Huse**

Why do the chains stop? (i.e. do you have a really low acceptance rate? Or is a problem with CosmoMC?)

I'm not entirly sure what you mean by acceptance rate although I'm sure I should know...

The chains do not stop as such, CosmoMC finishes with something like this:

Code: Select all

```
Finished
Slow proposals: 125000
```

I normally have samples=500000 in params.ini and get something like the above, but then I have only ~1500 chain steps(?) all with very high weight (typically between 100 and 2000). It seems it's very difficult (not surprisingly actually given the data) to find better parameters once a good set is found.

What are you using for the proposal density? Are you using MPI_Learn_Propose?

Unfortunately I haven't been using MPI at all, will try and see if I get that to work. For proposal density I have the following:

Code: Select all

```
propose_scale = 2.4
.
.
.
#parameter start center, min, max, start width, st. dev. e
stimate
#ombh2
param1 = 0.02 0.005 0.1 0.001 0.00005
#omdmh2
param2 = 0.12 0.01 0.99 0.005 0.00005
#theta
param3 = 1.05 0.5 10 0.006 0.000005
#tau
param4 = 0.17 0.01 0.8 0.06 0.0005
#omk
param5 = 0 0 0 0 0
#nufrac
param6 = 0 0 0 0 0
#w
param7 = -1 -1 -1 0 0
#n_s
param8 = 0.96 0.5 1.5 0.005 0.0005
#n_t
param9 = -0.04 -0.1 0.1 0.005 0.0005
#n_run
param10 = 0 -0.1 0.1 0.01 0.0005
#log[10^10 A_s]
param11 = 3.1 2.7 4 0.02 0.001
#amp_ratio
param12 = 0.2 0 1 0.01 0.001
#unused fast parameter
param13 = 0 0 0 0 0
```

Should I change(lower)

**propose_scale**? Or something else?

Tor Helge

### Re: CosmoMC: problem analyzing simulated noise free data

Posted: **January 20 2005**

by **Antony Lewis**

The acceptance rate is like 1/(weight) - yours is far too low. Given your inputs I'd be surprised if it was finding a good fit, it's probably stuck miles away from the best fit (check the likelihood values).

For cosmic variance limited data the conditional distributions are really tiny (though the width depends on what l_{max} you've chosen). I think you need to me much more careful with the proposal density. You might also want to try starting the chains at the known best fit point - set the start widths to zero. That would avoid problems with initial convergence anyway and let you check that the \chi^2 values are OK (i.e. you aren't hitting accuracy issues).

The MPI proposal learning might just do the trick for you, if not I'd try doing an initial run at a much higher temperature (say 10) or with some noise- then use the covariance matrix from that as the starting proposal density for a new run (with a small **propose_scale**). Or try the **estimate_propose_matrix** option to estimate the best fit and Hessian to start you off.

Of course if the cosmic variance limited distribution is multi modal or has other nasty properties, is possible it won't work at all. But that's unlikely for a basic parameter set.

PS. check you have **compute_tensors **= T if you are including tensors (**amp_ratio** seems to be varying).