Ala' Jaouni wrote:
>
> I am trying to generate a set of random numbers that fulfill the
> following constraints:
> 
> X1 + X2 + X3 + X4 = 1
> 
> aX1 + bX2 + cX3 + dX4 = n
> 
> where a, b, c, d, and n are known.
> 
> Any function to do this?
> 
You must give more information.

How are those numbers distributed? Are they normal? Positive?

If they can be anything, just generate X1, X2 and then compute X3, X4.

Alberto Monteiro

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to