[Splm-commits] r237 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Jul 12 19:14:57 CEST 2022


Author: the_sculler
Date: 2022-07-12 19:14:57 +0200 (Tue, 12 Jul 2022)
New Revision: 237

Modified:
   pkg/R/saremsrmod.R
Log:
Fixed error handler for singular numerical Hessians


Modified: pkg/R/saremsrmod.R
===================================================================
--- pkg/R/saremsrmod.R	2022-07-12 16:29:26 UTC (rev 236)
+++ pkg/R/saremsrmod.R	2022-07-12 17:14:57 UTC (rev 237)
@@ -195,7 +195,7 @@
     nvcovpms <- length(nam.errcomp) - 1
     ## error handler here for singular Hessian cases
     covTheta <- try(solve(-myHessian), silent=TRUE)
-    if(class(covTheta) == "try-error") {
+    if(class(covTheta)[1] == "try-error") {
         covTheta <- matrix(NA, ncol=nvcovpms+1,
                            nrow=nvcovpms+1)
         warning("Hessian matrix is not invertible")



More information about the Splm-commits mailing list