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?

  • $\begingroup$ Why not just using weighted correlation stats.stackexchange.com/questions/221246/… ? $\endgroup$
    – Tim
    Nov 5, 2020 at 21:47
  • $\begingroup$ @Tim Sorry, I didn't want to mean I'm interested in some correlation measure. I want to see the "bivariate shape" of the weighted simulations. $\endgroup$ Nov 5, 2020 at 22:09


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.