Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: RE: insufficient memory for matrix 11 r(950)


From   "Stas Kolenikov" <[email protected]>
To   [email protected]
Subject   Re: st: RE: insufficient memory for matrix 11 r(950)
Date   Tue, 29 Jul 2008 11:47:31 -0500

In all likelihood, this is easily doable in Mata. If your vectors are
variables, then that's a sort of cross(X,X) operation. If your vectors
are panels of a longitudinal data set, then you can also use Mata's
-panelsetup- to perform your operations elegantly.

On 7/29/08, Nick Cox <[email protected]> wrote:
> It sounds as if your loop should be not to create 1100 matrices, and
>  then add them, but to keep only a running sum.
>
>  Nick
>  [email protected]
>
>  Victor, Jennifer Nicoll
>
>  I am receiving a memory error while trying to create (and store) many
>  matrices simultaneously.  Increasing the memory allocation to Stata (set
>  mem 1g) does not help.  Essentially, I am taking an nx1 vector and
>  multiplying it by its transpose to create a 438x438 matrix.  I'm doing
>  this 1100 times and then need to add all 1100 matrices together.  State
>  gives me the error "insufficient memory for matrix 11 r(950)" around
>  matrix 440 (or 700 depending on the trial).  Advice?
>
>  *
>  *   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/
>


-- 
Stas Kolenikov, also found at http://stas.kolenikov.name
Small print: I use this email account for mailing lists only.
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index