Hello everybody,
I have a problem with the the function PVCM in the plm package:
I have an unbalanced panel with over 200 companies and 1 to 14 years for
each company. I already excluded all NAs:
> dataset<-na.omit(dataset)
Now I'm trying to fit a variable coefficients model:
> model_vc <- pvcm(v1 ~ lag(v2,1), model="within", data=dataset)
This results in the following error message: "Fehler in lm.fit(x, y, offset
= offset, singular.ok = singular.ok, ...) : 0 (non-NA) cases"
I can't figure out what's wrong... Can somebody help me, please?
Thanks so much!
Johannes
PS: Here's additional information on my dataset:
> str(dataset)
Classes ?plm.dim? and 'data.frame': 1531 obs. of 4 variables:
$ company: Factor w/ 210 levels "1164","1177",..: 1 1 1 1 1
1 1 1 1 1 ...
$ year : Factor w/ 16 levels "1993","1994",..: 2 3 4 5 6
7 8 9 10 11 ...
$ v1 : num 0.0993 0.1488 0.0604 0.0902 0.0573 ...
$ v2 : int 75 75 78 72 74 73 70 70 70 67 ...
- attr(*, "na.action")=Class 'omit' Named int [1:979] 12 13
14 15 16 17 18
26 39 40 ...
.. ..- attr(*, "names")= chr [1:979] "12" "13"
"14" "15" ...
> summary(dataset)
company year v1 v2
3121 : 15 2007 :136 Min. :-1.05746 Min. :49.00
8762 : 15 2006 :128 1st Qu.: 0.08706 1st Qu.:71.00
1382 : 14 2005 :125 Median : 0.12834 Median :76.00
1388 : 14 2003 :119 Mean : 0.13399 Mean :75.37
1440 : 14 2004 :119 3rd Qu.: 0.18909 3rd Qu.:80.00
1663 : 14 2002 :115 Max. : 0.71280 Max. :90.00
(Other):1445 (Other):789
--
View this message in context:
http://www.nabble.com/Problem-with-PVCM%3A-%220-%28non-NA%29-cases%22-tp21933499p21933499.html
Sent from the R help mailing list archive at Nabble.com.