s-news
[Top] [All Lists]

Re: [S] matrix inversion question

To: "S" <s-news@wubios.wustl.edu>
Subject: Re: [S] matrix inversion question
From: "deric hetzel" <dhetzel@sprintmail.com>
Date: Mon, 31 Jan 2000 17:54:13 -0500
References: <Pine.GSO.4.05.10001312206270.11150-100000@auk.stats>
Sender: owner-s-news@wubios.wustl.edu
Question does not directly relate to matrix inversion, but when I tried to
test the time it takes to invert a 1000x1000 matrix I tried to create this
size matrix and got the following error:

> X_matrix(rnorm(1000^2),1000,1000)
Error in rnorm(1000^2): Cannot allocate 8000000 bytes: options("object.
size") is 5000000: see options help file

Any thoughts on how to increase the allocation byte size?

----- Original Message -----
From: Prof Brian D Ripley <ripley@stats.ox.ac.uk>
To: Elaine Florio <eflorio@jhsph.edu>
Cc: <s-news@wubios.wustl.edu>
Sent: Monday, January 31, 2000 5:17 PM
Subject: Re: [S] matrix inversion question


>
> On Mon, 31 Jan 2000, Elaine Florio wrote:
>
> > Does anyone know the minimum and maximum time I should wait for SPLUS to
> > invert a matrix of dimension 500 x 500 or 1000 x 1000?  Also, if I can
> > batch the inversion out to another program, which would do this task the
> > fastest?
>
> It depends on your version of S and how much memory you have,
> but inverting an n x n matrix is an O(n^3) calculation.  On a fast PC
> I would say 500x500 would take a few seconds (12 on the one I tested) and
> 25Mb or so. It is very likely that if you do not have enough memory
> (I have 192Mb) it will take a lot longer.
>
> Do you really need to invert the matrix? most matrix inversion is used to
> solve systems of equations, and they are better done directly.
>
> --
> Brian D. Ripley,                  ripley@stats.ox.ac.uk
> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
> University of Oxford,             Tel:  +44 1865 272861 (self)
> 1 South Parks Road,                     +44 1865 272860 (secr)
> Oxford OX1 3TG, UK                Fax:  +44 1865 272595
>
> -----------------------------------------------------------------------
> This message was distributed by s-news@wubios.wustl.edu.  To unsubscribe
> send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
> message:  unsubscribe s-news
>

-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu.  To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message:  unsubscribe s-news

<Prev in Thread] Current Thread [Next in Thread>