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

From |
"Martin Weiss" <Martin.Weiss1@gmx.de> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: RE: normal distributions |

Date |
Thu, 19 Mar 2009 18:55:05 +0100 |

<> If your version is something other than 10.1, use -invnormal(uniform())- to generate standard normal random numbers. Add the mean and multiply by the sd if desired... HTH Martin -------- Original-Nachricht -------- > Datum: Thu, 19 Mar 2009 11:43:34 -0600 > Von: "Rodrigo Briceño" <rjbriceno@gmail.com> > An: statalist@hsphsun2.harvard.edu > Betreff: Re: st: RE: normal distributions > Thanks Nick. I forgot to mention that I tried with and without spaces, > because the error appears in any case. > . gen rn = rnormal(0,9) > Unknown function rnormal() > r(133); > > > 2009/3/19 Nick Cox <n.j.cox@durham.ac.uk>: > > This is not a matter covered by an FAQ because it's just a matter of > standard syntax as explained in the help and the manuals. > > > > Think about it from Stata's point of view. Only if you write -rnormal()- > with no space -- and arguments supplied within () -- does it know that you > want a function with that name. There is no rule against a variable called > -rnormal-, so your reference to -rnormal- followed by a space indicates to > Stata that you mean to refer to a variable with that name. You don't have > one, so it throws you out in a state of puzzlement with a message that is > perfectly reasonable. > > > > set obs 100 > > gen rn = rnormal(0,9) > > > > Nick > > n.j.cox@durham.ac.uk > > > > Rodrigo Briceño > > > > I would like to know if there is a function similar to this that I > > found in R: norm <- rnorm(100, 2, 5) > > The trick is to generate a variable that contains 100 values with are > > normal distributed with mean 2 and stdev 5. > > > > I found that rnormal is a function in Stata, but I am not sure about > > the way to write the sintax to produce that outcome. I tried with: > > generate rn=rnormal (0,9) but a message telling me rnormal is not > > found appeared. > > > > I looked into FAQ but there are no related issues... > > > > * > > * 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/ > > > > > > -- > Rodrigo Briceño > Economist > +506 22-91-12-00 ext. 113 Office > +506 22-32-08-30 Fax > rjbriceno@gmail.com > > MSN: jbric98@hotmail.com > SKYPE: rbriceno1087 > > * > * 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/ -- Martin Weiss Hackersteigle 3 72076 Tübingen 00497071/793535 00491784597218 Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger01 * * 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: normal distributions***From:*Rodrigo Briceño <rjbriceno@gmail.com>

**st: RE: normal distributions***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

**Re: st: RE: normal distributions***From:*Rodrigo Briceño <rjbriceno@gmail.com>

- Prev by Date:
**RE: st: RE: normal distributions** - Next by Date:
**RE: st: Build groups with the same first two numbers of SIC** - Previous by thread:
**RE: st: RE: normal distributions** - Next by thread:
**Re: st: normal distributions** - Index(es):

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