[Splm-commits] r199 - in pkg: . R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Sep 9 18:47:05 CEST 2015


Author: the_sculler
Date: 2015-09-09 18:47:05 +0200 (Wed, 09 Sep 2015)
New Revision: 199

Modified:
   pkg/ChangeLog
   pkg/DESCRIPTION
   pkg/R/likelihoodsFE.R
   pkg/R/spfeml.R
Log:
Fixed degenerating matrices in likelihoodsFE.R when only one regressor (K=1)


Modified: pkg/ChangeLog
===================================================================
--- pkg/ChangeLog	2015-08-19 20:36:48 UTC (rev 198)
+++ pkg/ChangeLog	2015-09-09 16:47:05 UTC (rev 199)
@@ -1,3 +1,6 @@
+Changes in Version 1.3-10
+ o Fixed a couple of degenerating matrices when K=1 in likelihoodsFE.R by adding ',drop=FALSE' to subsetting '['
+
 Changes in Version 1.3-8
  o Completed implementation of 'plm' infrastructure in spreml; now works with data.frames plus (possibly implicit) indices or pdata.frames indifferently.
 

Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION	2015-08-19 20:36:48 UTC (rev 198)
+++ pkg/DESCRIPTION	2015-09-09 16:47:05 UTC (rev 199)
@@ -1,7 +1,7 @@
 Package: splm
 Title: Econometric Models for Spatial Panel Data
-Version: 1.3-9
-Date: 2015-05-14
+Version: 1.3-10
+Date: 2015-09-09
 Authors at R: c(person(given = "Giovanni", family = "Millo", role = c("aut", "cre"), email = "giovanni.millo at generali.com"),
              person(given = "Gianfranco", family = "Piras", role = c("aut"), email = "gpiras at mac.com"))
 Author: Giovanni Millo [aut, cre],

Modified: pkg/R/likelihoodsFE.R
===================================================================
--- pkg/R/likelihoodsFE.R	2015-08-19 20:36:48 UTC (rev 198)
+++ pkg/R/likelihoodsFE.R	2015-09-09 16:47:05 UTC (rev 199)
@@ -415,7 +415,7 @@
         rownames(asyva) <- colnames(asyva) <- c("sigma","rho", colnames(xt))
         s2.se <- sqrt(asyva[1, 1])
         rho.se <- asyva[2, 2]
-        asyvar1 <- asyva[-c(1,2),-c(1,2)]
+        asyvar1 <- asyva[-c(1,2),-c(1,2), drop=FALSE]
         asyv <- asyva[-1,-1]
         rownames(asyvar1) <- colnames(asyvar1) <- colnames(xt)
 
@@ -815,7 +815,7 @@
         rho.se <- asyva[2+p, 2+p]
         lambda.se <- asyva[1+p, 1+p]
         rest.se <- sqrt(diag(asyva))[-((p+1):(p+3))]
-        asyvar1 <- asyva[-((p+1):(p+3)),-((p+1):(p+3))]
+        asyvar1 <- asyva[-((p+1):(p+3)),-((p+1):(p+3)), drop=FALSE]
         asyv <- asyva[-(p+3),-(p+3)]
 
 

Modified: pkg/R/spfeml.R
===================================================================
--- pkg/R/spfeml.R	2015-08-19 20:36:48 UTC (rev 198)
+++ pkg/R/spfeml.R	2015-09-09 16:47:05 UTC (rev 199)
@@ -74,7 +74,7 @@
 
   #make sure that the model has no intercept if effects !=pooled
   if (attr(attributes(model.frame(formula,data=data))$terms, "intercept") == 1) {
-  	x <- as.matrix(x[,-1])
+  	x <- as.matrix(x[,-1, drop=FALSE])
     colnames(x)<-clnames[-1]
     dimnames(x)[[1]]<-rwnames
     clnames <- clnames[-1]



More information about the Splm-commits mailing list