Skip to content
Prev 77988 / 398502 Next

Question on lm(): When does R-squared come out as NA?

On Wed, Sep 28, 2005 at 08:23:59AM +0100, Prof Brian Ripley wrote:
It was a mistake on my part. Just in case others are able to
recognise the situation, what was going on was that all the objects
being used in the lm() call were zoo objects.

It is a mystery to me as to why everything should work correctly but
the R2 should break, but that happened. I found that when I switched
to coredata(z) all was well.

Gabor reminded me that I should really be using his dyn package so as
to avoid such situations. Sorry for the false alarm,

   -ans.