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]

Re: st: Adjacency matrix in Stata


From   jean-luc morin-chesnel <[email protected]>
To   [email protected]
Subject   Re: st: Adjacency matrix in Stata
Date   Sun, 30 Mar 2014 19:46:33 +0200

Thank you very much, Stas!

Maybe I can reduce my dataset to, lets say 5k individuals?
What would you do? Do you have other alternatives in mind?

Thanks!

JL

On 30 March 2014 19:34, Stas Kolenikov <[email protected]> wrote:
> It would be cumbersome whichever way you want to look at it. And at
> any rate Stata won't be able to store a 100K x 100K matrix... only 11K
> x 11K matrices (see -help limits- and -set matsize-).
>
> -- Stas Kolenikov, PhD, PStat (ASA, SSC)
> -- Principal Survey Scientist, Abt SRBI
> -- Opinions stated in this email are mine only, and do not reflect the
> position of my employer
> -- http://stas.kolenikov.name
>
>
>
> On Sun, Mar 30, 2014 at 11:55 AM, jean-luc morin-chesnel
> <[email protected]> wrote:
>> Dear all,
>>
>> I have a panel dataset at the individual - day - product level
>> (unbalanced) and I would like to obtain a adjacency matrix in Stata,
>> but I do not know how to proceed.
>>
>> That is, I assume that 2 individuals are connected in the network if
>> they buy the same product the same day more than N times in my dataset
>> (lets say N=10).
>>
>> So I would like to obtain a matrix of adjacency in Stata: a MxM matrix
>> (M in the number of investors) where the coefficient mij=1 iff
>> investor i and investor j are connected in the network.
>>
>> I do not know how to proceed because I think that I should use loops,
>> but it seems to me that it is not very efficient to do so in Stata
>> (the dataset is large: 100k individuals). Any suggestion is very
>> welcomed.
>>
>> Many thanks,
>> Regards,
>>
>> JL
>> *
>> *   For searches and help try:
>> *   http://www.stata.com/help.cgi?search
>> *   http://www.stata.com/support/faqs/resources/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/faqs/resources/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/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index