[Gmm-commits] r66 - in pkg/gmm: . R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu Nov 15 20:14:22 CET 2012
Author: chaussep
Date: 2012-11-15 20:14:22 +0100 (Thu, 15 Nov 2012)
New Revision: 66
Modified:
pkg/gmm/DESCRIPTION
pkg/gmm/NEWS
pkg/gmm/R/FinRes.R
Log:
Fixed a bug, see NEWS
Modified: pkg/gmm/DESCRIPTION
===================================================================
--- pkg/gmm/DESCRIPTION 2012-11-13 19:44:08 UTC (rev 65)
+++ pkg/gmm/DESCRIPTION 2012-11-15 19:14:22 UTC (rev 66)
@@ -1,6 +1,6 @@
Package: gmm
-Version: 1.4-3
-Date: 2012-07-02
+Version: 1.4-4
+Date: 2012-11-15
Title: Generalized Method of Moments and Generalized Empirical
Likelihood
Author: Pierre Chausse <pchausse at uwaterloo.ca>
Modified: pkg/gmm/NEWS
===================================================================
--- pkg/gmm/NEWS 2012-11-13 19:44:08 UTC (rev 65)
+++ pkg/gmm/NEWS 2012-11-15 19:14:22 UTC (rev 66)
@@ -1,3 +1,7 @@
+Changes in version 1.4-4
+
+o Fixed an instability problem when the model is just identified and wmatrix is set to "ident"
+
Changes in version 1.4-3
o Added the option "constrOptim" to optfct for nonlinear models
Modified: pkg/gmm/R/FinRes.R
===================================================================
--- pkg/gmm/R/FinRes.R 2012-11-13 19:44:08 UTC (rev 65)
+++ pkg/gmm/R/FinRes.R 2012-11-15 19:14:22 UTC (rev 66)
@@ -98,7 +98,10 @@
else
w <- P$weightsMatrix
- T1 <- try(solve(t(G)%*%w%*%G,t(G)%*%w), silent = TRUE)
+ if (dim(G)[1] == dim(G)[2])
+ T1 <- try(solve(G), silent=TRUE)
+ else
+ T1 <- try(solve(t(G)%*%w%*%G,t(G)%*%w), silent = TRUE)
if(class(T1) == "try-error")
{
z$vcov <- matrix(Inf,length(z$coef),length(z$coef))
More information about the Gmm-commits
mailing list