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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Jan 20 16:26:33 CET 2017


Author: chaussep
Date: 2017-01-20 16:26:32 +0100 (Fri, 20 Jan 2017)
New Revision: 96

Modified:
   pkg/gmm/R/FinRes.R
Log:
fixed a bug with fixed weighting matrix

Modified: pkg/gmm/R/FinRes.R
===================================================================
--- pkg/gmm/R/FinRes.R	2016-05-24 18:01:44 UTC (rev 95)
+++ pkg/gmm/R/FinRes.R	2017-01-20 15:26:32 UTC (rev 96)
@@ -48,7 +48,10 @@
             }
         z$G <- z$gradv(z$coefficients, x)
         G <- z$G
-        v <- .weightFct(z$coefficient, x, P$vcov)
+        if (P$vcov == "TrueFixed")
+            v <- .weightFct(z$coefficient, x, "fixed")
+        else
+            v <- .weightFct(z$coefficient, x, P$vcov)
         z$v <- v
         if (P$vcov == "TrueFixed") 
             {
@@ -99,7 +102,6 @@
             } else {
                 z$w <- P$weightsMatrix
             }
-        
         z$weightsMatrix <- P$weightsMatrix
         z$infVcov <- P$vcov
         z$infWmatrix <- P$wmatrix



More information about the Gmm-commits mailing list