I have some weighted simulations of two variables. I would like to have an idea of how they are correlated. An option is to use a bivariate density estimate which allows the weights. Another option is to pick at random the simulations according to their weight, and to graph the scatterplot of this thing:
## 'Sims' is a dataframe containing 5000 weighted simulations of 'x1' and 'x2' indices <- sample.int(5000, replace = TRUE, prob = the_weights) result <- Sims[indices, ] plot(x2 ~ x1, data = result)
Does this "thing" has a name? Perhaps a sample from the empirical distribution of the simulations, or something like that?