1
$\begingroup$

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?

$\endgroup$
2
  • $\begingroup$ Why not just using weighted correlation stats.stackexchange.com/questions/221246/… ? $\endgroup$
    – Tim
    Nov 5 '20 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 '20 at 22:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.