Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: generating data sets with specific parameters

From   "Scott Merryman" <[email protected]>
To   <[email protected]>
Subject   st: RE: generating data sets with specific parameters
Date   Wed, 18 Aug 2004 18:56:46 -0500

You might try -corr2data-

. corr2data newvar, mean(10.62) sd(1.74) n(109)
(obs 109)

. sum

    Variable |       Obs        Mean    Std. Dev.       Min        Max
      newvar |       109       10.62        1.74   6.648153     14.176

Also, -drawnorm- and Joseph Hilbe's random number generators -rnd- might be

Hope this helps,

> -----Original Message-----
> From: [email protected] [mailto:owner-
> [email protected]] On Behalf Of 
> Sent: Wednesday, August 18, 2004 4:50 PM
> To: [email protected]
> Subject: st: generating data sets with specific parameters
> Hello statalist,
> After reviewing the faq's and the archive I've been unable to find
> guidance
> or a module that would assist in generating data sets from scratch or at
> least near it. For instance, is it possible to identify statistical
> parameters, input them into stata, which would produce a data set as its
> product, such as, generate a newvariable with 109 observations that have a
> mean of 10.62 and a standev of 1.74. Maybe I've missed some guidance or
> perhaps such a command is not possible (or desirable?), or this is a goofy
> thought to start with. I reviewed -generate-, -exp-, -if-, etc but
> everything appears to build on a primary data set. When reading articles
> or
> text examples, one doesn't have access to the data set often, and
> sometimes
> I'd like to test what's being put forward on a dataset, just simply run
> the
> numbers. I have used -display- and some of the -i- commands, that's fine,
> but one can't work from other angles what's being put forward in the
> article/text, etc.
> Thank you.

*   For searches and help try:

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