[Gmm-commits] r119 - pkg/gmm/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Mar 12 15:25:26 CET 2018


Author: chaussep
Date: 2018-03-12 15:25:26 +0100 (Mon, 12 Mar 2018)
New Revision: 119

Modified:
   pkg/gmm/R/Methods.gmm.R
   pkg/gmm/R/momentEstim.R
Log:
fixed a few print issues

Modified: pkg/gmm/R/Methods.gmm.R
===================================================================
--- pkg/gmm/R/Methods.gmm.R	2017-11-27 18:32:19 UTC (rev 118)
+++ pkg/gmm/R/Methods.gmm.R	2018-03-12 14:25:26 UTC (rev 119)
@@ -110,9 +110,14 @@
 	cat(paste(deparse(x$call), sep="\n", collapse = "\n"), "\n\n", sep="")
 	cat("\nMethod: ", x$met,"\n")
 	if (x$met=="cue")
-            cat("         (",x$cue$message,")\n\n")
-	else
-            cat("\n")
+            {
+                if (!is.null(x$cue$message))
+                    {
+                        cat("         (",x$cue$message,")\n\n")
+                    }
+            } else {
+                cat("\n")
+            }
 	if( !is.null(x$kernel))
             {
 		cat("Kernel: ", x$kernel)

Modified: pkg/gmm/R/momentEstim.R
===================================================================
--- pkg/gmm/R/momentEstim.R	2017-11-27 18:32:19 UTC (rev 118)
+++ pkg/gmm/R/momentEstim.R	2018-03-12 14:25:26 UTC (rev 119)
@@ -583,7 +583,7 @@
                         argDots$ci <- NULL
                         allArgOptim <- list(theta = P$t0, f = .objCue, grad = NULL, ui = ui, ci = ci, x = dat, type = P$vcov)
                         allArgOptim <- c(allArgOptim,argDots)
-                        res <- do.call(constrOptim,allArgOptim)
+                        res2 <- do.call(constrOptim,allArgOptim)
                     }
                 if (P$optfct == "nlminb")
                     {
@@ -707,10 +707,10 @@
                                                   message = res$algoInfo$message)
                     }
             }
-        z$dat <- P$x
+        z$dat <- x
         z$gradv <- P$gradv
-        z$gt <- P$g(z$coefficients, P$x)
-        z$w0 <- .weightFct(z$coefficients, P$x, P$vcov)        
+        z$gt <- P$g(z$coefficients, x)
+        z$w0 <- .weightFct(z$coefficients, x, P$vcov)        
         z$iid <- P$iid
         z$g <- P$g
         z$cue <- list(weights=P$fixedKernW,message=P$weightMessage)



More information about the Gmm-commits mailing list