s-news
[Top] [All Lists]

Re: regression error

To: Joe Cerniglia <cj5815@yahoo.com>
Subject: Re: regression error
From: Prof Brian Ripley <ripley@stats.ox.ac.uk>
Date: Mon, 13 Dec 2004 15:31:21 +0000 (GMT)
Cc: s-news@wubios.wustl.edu
In-reply-to: <20041213152920.33329.qmail@web50209.mail.yahoo.com>
References: <20041213152920.33329.qmail@web50209.mail.yahoo.com>
I think you want to add singular.ok=T to your lm call. Please see the help page for details.

On Mon, 13 Dec 2004, Joe Cerniglia wrote:

I am recieving the following error while running the
following regression:

ret.size.ols <- lm(formula = returns ~ ln.size,
na.action = na.exclude)

Problem in lm.fit.qr(unset(x), unset(y)): computed fit
is singular, rank 1

What could be causing the problem?  Are there
functions that can modify the data?

This call to lm is in a loop.  If an error occur the
loop ends. How can I get the loop to continue if an
error occurs?

See ?try if you don't want to consider singular fits.

--
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 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

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