1

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?

Stéphane Laurent
  • 17,425
  • 5
  • 59
  • 101
  • Why not just using weighted correlation https://stats.stackexchange.com/questions/221246/such-thing-as-a-weighted-correlation/222107#222107 ? – Tim Nov 05 '20 at 21:47
  • @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. – Stéphane Laurent Nov 05 '20 at 22:09

0 Answers0