mardi 26 mai 2020

Inconsistent results between dqrng and R API for PRNG in RCPP

I am attempting to implement a particle filter within Rcpp and use OpenMP to parallelise the transition step. I am using dqrng to create threadsafe RNG with using the boost distribution functions as per here.

The code for the R API can be found here and introducing dqrng here

The issue I am having is that, using the R API, I achieve correct results, verified against alternate implementations, with the density of the estimator being roughly normally distributed as expected. However, for the dqrng version the density of the estimator does not appear correct with differing results being obtained. The density plots can be seen below.

Density of estimator with dqrng

Density of estimator with R API

Does anyone have any understanding of why this might be the case?




Aucun commentaire:

Enregistrer un commentaire