Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: AW: drawnorm for discrete variables


From   Tyler Frazier <tyfrazier@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: AW: drawnorm for discrete variables
Date   Fri, 30 Apr 2010 13:47:44 +0200

these are my variables -- I want to synthetically generate a persons
table for approximately 200,000 people

. summarize

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
    hhrelate |      3447    2.714244    1.887394          1         10
         sex |      3447    1.506818    .5000261          1          2
-------------+--------------------------------------------------------
         age |      3447    27.49956    17.14807          3         90
    ethnicit |      3291    22.25433    16.06378          1         90
    religion |      3445    5.190131    4.651516          1         96
    marstatu |      2808    3.746439    2.297089          1          6
    educatio |      3181    3.600126    3.494621          1         16
-------------+--------------------------------------------------------
      income |      3444     6046706    2.21e+07          0   5.76e+08
    occupati |      1382    561.4363    245.7125         11        933
    industry |      1376    5334.578    2261.297        111       9900
      sector |       757    6.015852    2.695727          1         10


On Fri, Apr 30, 2010 at 1:30 PM, Martin Weiss <martin.weiss1@gmx.de> wrote:
>
> <>
>
>
> What do you want your _discrete_ normal variable to look like in theory? As
> in:
>
>
> *****
> clear*
> set obs 10000
> gen mydiscrvar=irecode(rnormal(),-4,-3,-2,-1,0,1,2,3,4)
> hist mydiscrvar
> *****
>
>
>
> HTH
> Martin
>
> -----Ursprüngliche Nachricht-----
> Von: owner-statalist@hsphsun2.harvard.edu
> [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Tyler Frazier
> Gesendet: Freitag, 30. April 2010 12:50
> An: statalist@hsphsun2.harvard.edu
> Betreff: st: drawnorm for discrete variables
>
> Whats the best way to drawnorm for discrete variables in stata -- for
> example ethnicity, education, religion, occupation, etc...
>
> Thank you,
> Ty Frazier
> *
> *   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/
>
>
> *
> *   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/
>

*
*   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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index