[Gmm-commits] r57 - in pkg/gmm: . R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon May 28 19:22:12 CEST 2012


Author: chaussep
Date: 2012-05-28 19:22:12 +0200 (Mon, 28 May 2012)
New Revision: 57

Modified:
   pkg/gmm/DESCRIPTION
   pkg/gmm/R/gel.R
   pkg/gmm/R/momentEstim.R
Log:
Removed the gmmExtra in suggest because it is not ready, solved a bug in gel type ETEL

Modified: pkg/gmm/DESCRIPTION
===================================================================
--- pkg/gmm/DESCRIPTION	2012-05-24 14:16:03 UTC (rev 56)
+++ pkg/gmm/DESCRIPTION	2012-05-28 17:22:12 UTC (rev 57)
@@ -13,7 +13,7 @@
         (GEL) family of estimators, as presented by Smith(1997),
         Kitamura(1997), Newey-Smith(2004) and Anatolyev(2005).
 Depends: R (>= 2.10.0), sandwich
-Suggests: mvtnorm, car, fBasics, MASS, timeDate, timeSeries, gmmExtra
+Suggests: mvtnorm, car, fBasics, MASS, timeDate, timeSeries
 Imports: stats
 License: GPL (>= 2)
 

Modified: pkg/gmm/R/gel.R
===================================================================
--- pkg/gmm/R/gel.R	2012-05-24 14:16:03 UTC (rev 56)
+++ pkg/gmm/R/gel.R	2012-05-28 17:22:12 UTC (rev 57)
@@ -99,6 +99,8 @@
 
 	if (method == "iter")
 		{
+		if (type == "ETEL")
+			type = "ET"
 		for (i in 1:maxiterlam)
 			{
 			r1 <- .rho(gt,l0,derive=1,type=type,k=k)
@@ -240,7 +242,7 @@
 	}
 
 
-  .thetf <- function(tet, P, output=c("obj","all"), l0Env)
+.thetf <- function(tet, P, output=c("obj","all"), l0Env)
     {
     output <- match.arg(output)
     gt <- P$g(tet, P$dat)
@@ -257,7 +259,7 @@
 			tol_obj = P$tol_obj, k = P$k1/P$k2, control = P$Lambdacontrol, method = "optim")
 	    }
 	    else
-		    lamb <- getLamb(gt, l0, type = P$type, tol_lam = P$tol_lam, maxiterlam = P$maxiterlam, 
+		    lamb <- getLamb(gt, l0, type = P$type,	 tol_lam = P$tol_lam, maxiterlam = P$maxiterlam, 
 			tol_obj = P$tol_obj, k = P$k1/P$k2, control = P$Lambdacontrol, method = P$optlam)
 	}
     else

Modified: pkg/gmm/R/momentEstim.R
===================================================================
--- pkg/gmm/R/momentEstim.R	2012-05-24 14:16:03 UTC (rev 56)
+++ pkg/gmm/R/momentEstim.R	2012-05-28 17:22:12 UTC (rev 57)
@@ -762,7 +762,7 @@
   z$type <- P$type
   z$gt <- gt
   rhom <- .rho(z$gt, z$lambda, type = P$typet, k = P$k1/P$k2)
-  z$pt <- -.rho(z$gt, z$lambda, type = P$typet, derive = 1, k = P$k1/P$k2)/n
+  z$pt <- -.rho(z$gt, z$lambda, type = P$typel, derive = 1, k = P$k1/P$k2)/n
 
 # making sure pt>0
   if (P$type=="CUE")



More information about the Gmm-commits mailing list