Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: creating observations of non-occurrences


From   "Frederick Guy" <[email protected]>
To   <[email protected]>
Subject   st: creating observations of non-occurrences
Date   Wed, 19 May 2010 15:31:52 +0100

I have N observations, each of which records a transaction between an
agent of type A and an agent of type B. 

I want to create a dataset of 11*N observations: the N that I already
have, plus 10*N for AB pairs that did not transact.

More specifically, for each transaction AiBj, i = 1....N, j= 1....T, I
want to draw a random sample of 10 AiBk non-occurrences, from the T-1
cases of k != j.

As usual I expect that this is laughingly simple, but these loops are
new to me.

Thanks.

Frederick



*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index