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
|