I am trying to randomly simulate a population of $N$ individuals among which a predefined number $K$ of them have an outcome. The trick is that I want to assign different probabilities to the individuals such that some are more 'at risk' than the others.
To give an example, let's say that I have $N = 10$ individuals and I know that $K = 4$ of them have the outcome. Besides, let's say that individuals 6 to 10 are twice as likely than the others to have the outcome, which means that a vector of probability would be $(1, 1, 1, 1, 1, 2, 2, 2, 2, 2) / 15$. How do I simulate such populations?
I tried using the R function sample without replacement to draw the indices of individuals having the outcome. However, for some reason, the obtained proportions in the end are not quite right.
Another way to put the problem is that I would like a distribution such as the multinomial one, but for which the count can't be larger than one for each category.
Is there such a distribution?