Skip to content
Back to formatted view

Raw Message

Message-ID: <20050925144109.GT437@lubyanka.local>
Date: 2005-09-25T14:41:09Z
From: Ajay Shah
Subject: Question on lm(): When does R-squared come out as NA?

I have a situation with a large dataset (3000+ observations), where
I'm doing lags as regressors, where I get:

Call:
lm(formula = rj ~ rM + rM.1 + rM.2 + rM.3 + rM.4)

Residuals:
1990-06-04 1994-11-14 1998-08-21 2002-03-13 2005-09-15 
  -5.64672   -0.59596   -0.04143    0.55412    8.18229 

Coefficients:
             Estimate Std. Error t value Pr(>|t|)    
(Intercept) -0.003297   0.017603  -0.187    0.851    
rM           0.845169   0.010522  80.322   <2e-16 ***
rM.1         0.116330   0.010692  10.880   <2e-16 ***
rM.2         0.002044   0.010686   0.191    0.848    
rM.3         0.013181   0.010692   1.233    0.218    
rM.4         0.009587   0.010525   0.911    0.362    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 

Residual standard error: 1.044 on 3532 degrees of freedom
Multiple R-Squared:    NA,	Adjusted R-squared:    NA 
F-statistic:    NA on 5 and 3532 DF,  p-value: NA 


rM.1, rM.2, etc. are lagged values of rM. The OLS seems fine in every
respect, except that there is an NA as the multiple R-squared. I will
be happy to give sample data to someone curious about what is going
on. I wondered if this was a well-known pathology. The way I know it,
if the data allows computation of (X'X)^{-1}, one can compute the R2.

-- 
Ajay Shah                                                   Consultant
ajayshah at mayin.org                      Department of Economic Affairs
http://www.mayin.org/ajayshah           Ministry of Finance, New Delhi