[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
"Nick Cox" <n.j.cox@durham.ac.uk> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
st: RE: constrained sum of random values |

Date |
Wed, 25 Mar 2009 19:04:52 -0000 |

I assume you also mean that they come from a uniform distribution. set obs 77 gen x = uniform() su x, meanonly replace x = 9900 * x / r(sum) Nick n.j.cox@durham.ac.uk Carlo Lazzaro is there any way for imposing Stata 9.2/SE to create a variable composed of 77 random values so that the sum of these random values is 9900? * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**References**:**st: constrained sum of random values***From:*"Carlo Lazzaro" <carlo.lazzaro@tiscalinet.it>

- Prev by Date:
**st: constrained sum of random values** - Next by Date:
**RE: st: constrained sum of random values** - Previous by thread:
**st: constrained sum of random values** - Next by thread:
**Re: st: constrained sum of random values** - Index(es):

© Copyright 1996–2021 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |