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 on April 23, and its replacement, statalist.org is already up and running.


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

st: RE: How to (almost) randomly reduce the number of observations?


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: How to (almost) randomly reduce the number of observations?
Date   Mon, 19 Apr 2010 22:46:48 +0200

<>


The first part could be accomplished via

*******
drop if runiform()<.7
*******

if a drop of 70% was desired. The second part, you really have to explain it
more comprehensively, I am afraid...

HTH
Martin

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Dimitrije Tišma
Sent: Montag, 19. April 2010 22:31
To: statalist@hsphsun2.harvard.edu
Subject: st: How to (almost) randomly reduce the number of observations?

Hi,

I would like to ask how to reduce number of observations randomly BUT
in a way that all observations are kept that are related to the person
who still in the dataset. Thanks!

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