I find that after importance sampling (with indep=1) the number of samples in the importance sampled chains is far larger, by a factor of 4-5 or so than the number of samples in the original .txt file.
Why this is so? Isn't every accepted sample included in the original .txt file?
cosmomc - importance sampling - #of samples
-
- Posts: 183
- Joined: September 24 2004
- Affiliation: Brookhaven National Laboratory
- Contact:
-
- Posts: 1943
- Joined: September 23 2004
- Affiliation: University of Sussex
- Contact:
Re: cosmomc - importance sampling - #of samples
Every sample is included, but in the compressed form of having > 1 weight in the first column when samples are repeated. The importance sampled samples are always put out on separate lines (usually you want to importance sample thinned samples - saves time - in which case the chance of duplicates is very small).
In your case where you are including all samples the number of lines will increase by the inverse of the acceptance rate of the original chain.
In your case where you are including all samples the number of lines will increase by the inverse of the acceptance rate of the original chain.