1

My data is stored in a dataframe called 'Gap3',and the structure is like below:

> summary(Gap3)
           region         time          rC2R             g        
 Beijing      : 19   1995   : 31   Min.   :0.000   Min.   : 3.80  
 Tianjin      : 19   1996   : 31   1st Qu.:2.404   1st Qu.: 9.70  
 Hebei        : 19   1997   : 31   Median :2.819   Median :11.50  
 Shanxi       : 19   1998   : 31   Mean   :2.898   Mean   :11.47  
 InnerMongolia: 19   1999   : 31   3rd Qu.:3.240   3rd Qu.:12.90  
 Liaoning     : 19   2000   : 31   Max.   :5.605   Max.   :23.80  
 (Other)      :475   (Other):403   NA's   :2                      
     CCover            FDI               FDS              HC        
 Min.   :0.0348   Min.   :0.00000   Min.   :0.732   Min.   : 2.599  
 1st Qu.:0.2402   1st Qu.:0.01100   1st Qu.:1.884   1st Qu.: 7.040  
 Median :0.2945   Median :0.02240   Median :2.303   Median : 7.852  
 Mean   :0.3130   Mean   :0.03247   Mean   :2.438   Mean   : 7.805  
 3rd Qu.:0.3726   3rd Qu.:0.04180   3rd Qu.:2.733   3rd Qu.: 8.546  
 Max.   :0.7852   Max.   :0.44940   Max.   :7.303   Max.   :12.028  
 NA's   :2        NA's   :8         NA's   :2                       
       I                IE          MedCResCover     MedCWoCover    
 Min.   :0.0000   Min.   :0.0000   Min.   :0.0000   Min.   :0.0000  
 1st Qu.:0.3332   1st Qu.:0.0792   1st Qu.:0.0536   1st Qu.:0.0518  
 Median :0.4389   Median :0.1231   Median :0.2201   Median :0.2159  
 Mean   :0.4879   Mean   :0.3029   Mean   :0.3159   Mean   :0.2103  
 3rd Qu.:0.6251   3rd Qu.:0.3269   3rd Qu.:0.5560   3rd Qu.:0.3000  
 Max.   :1.1126   Max.   :2.0513   Max.   :1.9183   Max.   :0.9507  
                                   NA's   :3                        
      pGDP          rCityRate          RCover            rFkOut      
 Min.   :  1826   Min.   :0.1590   Min.   :0.00160   Min.   :0.0492  
 1st Qu.:  6226   1st Qu.:0.3300   1st Qu.:0.04312   1st Qu.:0.1060  
 Median : 12437   Median :0.4210   Median :0.08665   Median :0.1456  
 Mean   : 19034   Mean   :0.4447   Mean   :0.21798   Mean   :0.1829  
 3rd Qu.: 26133   3rd Qu.:0.5280   3rd Qu.:0.27025   3rd Qu.:0.2071  
 Max.   :100105   Max.   :0.8960   Max.   :1.05240   Max.   :1.2914  
                                   NA's   :153       NA's   :1       
     TCover          UnCover      
 Min.   :0.0000   Min.   :0.0000  
 1st Qu.:0.0997   1st Qu.:0.1536  
 Median :0.1591   Median :0.1880  
 Mean   :0.2273   Mean   :0.2028  
 3rd Qu.:0.3090   3rd Qu.:0.2376  

And the number of missing values is:

> sum(is.na(Gap3))
[1] 171

the dimension is :

> dim(Gap3)
[1] 589  18

My current purpose is to decide which effect I should use, the Fix Effect or the Random Effect. My model function and what i did is showed below:

> form1
rC2R ~ TCover + MedCResCover + UnCover + pGDP + I(pGDP^2) + g + 
    FDS + FDI + IE + I + rFkOut + HC + rCityRate
>gap.fe1 <- plm(form1, data=Gap3,model="within")    
>gap.rd1 <- plm(form1, data=Gap3,model="random")
>phtest(gap.fe1,gap.rd1)
Error in solve.default(dvcov) : 
  system is computationally singular: reciprocal condition number = 1.117e-22

Then I multiplied variables who is less than 1 by 100, and did the procedure again, but the singularity sitll exsited. In my 3rd attempt, I deleted the pGDP and I(pGDP^2), this time it worked sucessfully.

phtest(gap.fe3,gap.rd3)

        Hausman Test

data:  form3
chisq = 94.967, df = 11, p-value = 1.762e-15
alternative hypothesis: one model is inconsistent

Could anybody tell me the reason, why the pGDP and I(pGDP^2) caused singularity?

Helix123
  • 3,502
  • 2
  • 16
  • 36
Jim
  • 51
  • 1
  • 9
  • Given the model, `plm` is unable to estimate parameters from the data. Change one or the other. – Roman Luštrik Dec 17 '15 at 10:46
  • why nobady helps me? – Jim Dec 18 '15 at 14:32
  • Try estimating a simpler model first. – Roman Luštrik Dec 19 '15 at 20:00
  • have a look at `summary(gap.fe1)` and `summary(gap.rd1)` and compare to your formula. Most likely some coefficients are silently dropped due to linear dependence for the estimation. This means one or both models should be changed slightly, i.e. the variable causing the linear dependence should be dropped from formula. – Helix123 Feb 10 '16 at 15:22

0 Answers0