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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Jul 26 16:15:06 CEST 2022


Author: the_sculler
Date: 2022-07-26 16:15:06 +0200 (Tue, 26 Jul 2022)
New Revision: 245

Modified:
   pkg/DESCRIPTION
   pkg/NAMESPACE
   pkg/R/saremgREmod.R
   pkg/R/semgREmod.R
Log:
Rationalized dependencies from spdep and spatialreg ("gdata" issue)


Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION	2022-07-26 11:20:17 UTC (rev 244)
+++ pkg/DESCRIPTION	2022-07-26 14:15:06 UTC (rev 245)
@@ -1,6 +1,6 @@
 Package: splm
 Title: Econometric Models for Spatial Panel Data
-Version: 1.6-1
+Version: 1.6-2
 Date: 2022-07-26
 Authors at R: c(person(given = "Giovanni", family = "Millo", role = c("aut", "cre"), email = "giovanni.millo at deams.units.it"),
              person(given = "Gianfranco", family = "Piras", role = c("aut"), email = "gpiras at mac.com"),

Modified: pkg/NAMESPACE
===================================================================
--- pkg/NAMESPACE	2022-07-26 11:20:17 UTC (rev 244)
+++ pkg/NAMESPACE	2022-07-26 14:15:06 UTC (rev 245)
@@ -11,6 +11,19 @@
 importFrom(plm, pmodel.response)
 importFrom(plm, pdim)
 importFrom(nlme, fdHess, lme)
+
+
+#if (packageVersion("spdep") < 1.2) {
+#  import(spdep, except=c(do_ldet, eigen_setup, trW, impacts.gmsar, impacts))
+#  importFrom(spatialreg, do_ldet, eigen_setup, trW, impacts)
+#} else {
+#  import(spdep, except=c(set.ClusterOption, set.VerboseOption, set.mcOption, 
+#    get.VerboseOption, get.coresOption, set.coresOption, set.ZeroPolicyOption, 
+#    get.mcOption, get.ClusterOption, get.ZeroPolicyOption))
+#  import(spatialreg)
+#}
+
+## check if we can simplify imports (to avoid dependencies like, e.g., gdata)
 if (packageVersion("spdep") < 1.2) {
   import(spdep, except=c(do_ldet, eigen_setup, trW, impacts.gmsar, impacts))
   importFrom(spatialreg, do_ldet, eigen_setup, trW, impacts)
@@ -18,8 +31,16 @@
   import(spdep, except=c(set.ClusterOption, set.VerboseOption, set.mcOption, 
     get.VerboseOption, get.coresOption, set.coresOption, set.ZeroPolicyOption, 
     get.mcOption, get.ClusterOption, get.ZeroPolicyOption))
-  import(spatialreg)
+  importFrom(spatialreg, impacts,
+             do_ldet, eigen_setup, trW,
+             eigen_pre_setup, Matrix_setup, Matrix_J_setup, spam_setup,
+             spam_update_setup, cheb_setup, mcdet_setup, LU_setup,
+             LU_prepermutate_setup, moments_setup,
+             SE_classic_setup, SE_whichMin_setup, SE_interp_setup,
+             as.spam.listw, get.ZeroPolicyOption)
 }
+
+
 importFrom(ibdreg, pchibar)
 import(Matrix)
 importFrom(spam, as.spam, diag.spam, solve.spam, t.spam, determinant.spam)

Modified: pkg/R/saremgREmod.R
===================================================================
--- pkg/R/saremgREmod.R	2022-07-26 11:20:17 UTC (rev 244)
+++ pkg/R/saremgREmod.R	2022-07-26 14:15:06 UTC (rev 245)
@@ -201,9 +201,6 @@
         solve(crossprod(X, sigma.1) %*% X)
 
     ## final vcov(errcomp)
-        #covTheta <- solve(-fdHess(myparms,
-    #                          function(x) -ll.c(x, y, X, n, t., w, w2, wy))$Hessian)
-    #                                              # lag-specific line: wy
     nvcovpms <- length(nam.errcomp) - 1            # lag-specific line: -1
     ## error handler here for singular Hessian cases
     covTheta <- try(solve(-myHessian), silent=TRUE)

Modified: pkg/R/semgREmod.R
===================================================================
--- pkg/R/semgREmod.R	2022-07-26 11:20:17 UTC (rev 244)
+++ pkg/R/semgREmod.R	2022-07-26 14:15:06 UTC (rev 245)
@@ -190,9 +190,6 @@
         solve(crossprod(X, sigma.1) %*% X)
 
     ## final vcov(errcomp)
-#    covTheta <- solve(-fdHess(myparms,
-#                              function(x) -ll.c(x, y, X, n, t, w, w2, wy))$Hessian)
-#                                        # lag-specific line: wy
     nvcovpms <- length(nam.errcomp)
     ## error handler here for singular Hessian cases
     covTheta <- try(solve(-myHessian), silent=TRUE)



More information about the Splm-commits mailing list