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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Oct 12 23:00:49 CEST 2017


Author: the_sculler
Date: 2017-10-12 23:00:49 +0200 (Thu, 12 Oct 2017)
New Revision: 217

Modified:
   pkg/DESCRIPTION
   pkg/R/slmtest.R
Log:
Small fixes for compatibility of new plm version: as.numeric(mod$residuals)


Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION	2017-09-10 18:23:58 UTC (rev 216)
+++ pkg/DESCRIPTION	2017-10-12 21:00:49 UTC (rev 217)
@@ -1,7 +1,7 @@
 Package: splm
 Title: Econometric Models for Spatial Panel Data
-Version: 1.4-9
-Date: 2017-09-10
+Version: 1.4-10
+Date: 2017-10-12
 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/slmtest.R
===================================================================
--- pkg/R/slmtest.R	2017-09-10 18:23:58 UTC (rev 216)
+++ pkg/R/slmtest.R	2017-10-12 21:00:49 UTC (rev 217)
@@ -36,7 +36,7 @@
     NT <- pdim(mod)$nT$N
 
     X <- model.matrix(mod)
-    y <- pmodel.response(mod)
+    y <- as.numeric(pmodel.response(mod))
     hatY <- X %*% coef(mod)
 
     ## check w or listw and in case transform to matrix
@@ -63,7 +63,7 @@
     Whaty <- bigW %*% hatY
 
     ## extract residuals as a vector (no pseries features)
-    e <- mod$residuals
+    e <- as.numeric(mod$residuals)
 
     sigma2 <- crossprod(e)/NT
 



More information about the Splm-commits mailing list