The Dirichlet distribution will give values that sum to one and with the
correct conditions will have uniform margins.  There are multiple packages
that will generate data from Dirichlet distributions, either gtools or
gmodels is one of them, but there are others as well.


On Wed, Nov 7, 2012 at 6:02 AM, Bärbel <baerbel@latnet.lv> wrote:

> Hi,
> I am looking for a way to generate a matrix of random numbers in a way that
> each row of the matrix would sum to 1 and that the numbers in the columns
> of
> the matrix would have a uniform distribution. So far I have found several
> ways to create random numbers that would sum to 1, but then the
> distribution
> of the individual elements is more or less skewed - there are much more
> small numbers than larger ones.
> Any help and suggestions?
> - Bärbel
>
>
>
> --
> View this message in context:
> http://r.789695.n4.nabble.com/how-to-generate-a-set-of-random-numbers-that-sum-to-1-with-uniform-distribution-of-elements-tp4648695.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> 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.
>



-- 
Gregory (Greg) L. Snow Ph.D.
538280@gmail.com

	[[alternative HTML version deleted]]


