[Gmm-commits] r244 - in pkg/gmm: . man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Aug 5 17:40:54 CEST 2025


Author: chaussep
Date: 2025-08-05 17:40:53 +0200 (Tue, 05 Aug 2025)
New Revision: 244

Modified:
   pkg/gmm/DESCRIPTION
   pkg/gmm/man/ATEgel.Rd
   pkg/gmm/man/bwWilhelm.Rd
   pkg/gmm/man/estfun.Rd
   pkg/gmm/man/gel.Rd
   pkg/gmm/man/getLamb.Rd
   pkg/gmm/man/gmm.Rd
   pkg/gmm/man/growth.Rd
   pkg/gmm/man/plot.Rd
   pkg/gmm/man/smoothG.Rd
   pkg/gmm/man/sysGmm.Rd
   pkg/gmm/man/tsls.Rd
   pkg/gmm/man/vcov.Rd
   pkg/gmm/man/wage.Rd
Log:
fixed linked problems in manual

Modified: pkg/gmm/DESCRIPTION
===================================================================
--- pkg/gmm/DESCRIPTION	2025-06-18 18:37:27 UTC (rev 243)
+++ pkg/gmm/DESCRIPTION	2025-08-05 15:40:53 UTC (rev 244)
@@ -1,9 +1,11 @@
 Package: gmm
-Version: 1.9
-Date: 2024-05-26
+Version: 1.9-1
+Date: 2025-08-4
 Title: Generalized Method of Moments and Generalized Empirical
         Likelihood
-Author: Pierre Chausse <pchausse at uwaterloo.ca>
+Authors at R: person(given="Pierre", family="Chausse", role=c("aut","cre"),
+	     	    email="pchausse at uwaterloo.ca")
+Author: Pierre Chausse [aut, cre]
 Maintainer: Pierre Chausse <pchausse at uwaterloo.ca>
 Description: It is a complete suite to estimate models based on moment conditions. It includes the two step Generalized method of moments (Hansen 1982; <doi:10.2307/1912775>), the iterated GMM and continuous updated estimator (Hansen, Eaton and Yaron 1996; <doi:10.2307/1392442>) and several methods that belong to the Generalized Empirical Likelihood family of estimators (Smith 1997; <doi:10.1111/j.0013-0133.1997.174.x>, Kitamura 1997; <doi:10.1214/aos/1069362388>, Newey and Smith 2004; <doi:10.1111/j.1468-0262.2004.00482.x>, and Anatolyev 2005 <doi:10.1111/j.1468-0262.2005.00601.x>).	
 Depends: R (>= 2.10.0), sandwich

Modified: pkg/gmm/man/ATEgel.Rd
===================================================================
--- pkg/gmm/man/ATEgel.Rd	2025-06-18 18:37:27 UTC (rev 243)
+++ pkg/gmm/man/ATEgel.Rd	2025-08-05 15:40:53 UTC (rev 244)
@@ -95,8 +95,8 @@
 \item{data}{A data.frame or a matrix with column names (Optional). }
 
 \item{Lambdacontrol}{Controls for the optimization of the vector of
-  Lagrange multipliers used by either \code{\link{optim}},
-  \code{\link{nlminb}} or \code{\link{constrOptim}}}
+  Lagrange multipliers used by either \code{\link[stats]{optim}},
+  \code{\link[stats]{nlminb}} or \code{\link[stats]{constrOptim}}}
 
 \item{model, X, Y}{logicals.  If \code{TRUE} the corresponding
   components of the fit (the model frame, the model matrix, the response)
@@ -106,8 +106,8 @@
 
 \item{tolConv}{The tolerance for comparing moments between groups}
 
-\item{...}{More options to give to \code{\link{optim}} or
-  \code{\link{nlminb}}. In \code{checkConv}, they are options passed to
+\item{...}{More options to give to \code{\link[stats]{optim}} or
+  \code{\link[stats]{nlminb}}. In \code{checkConv}, they are options passed to
   \code{\link{getImpProb}}.}
 
 }

Modified: pkg/gmm/man/bwWilhelm.Rd
===================================================================
--- pkg/gmm/man/bwWilhelm.Rd	2025-06-18 18:37:27 UTC (rev 243)
+++ pkg/gmm/man/bwWilhelm.Rd	2025-08-05 15:40:53 UTC (rev 244)
@@ -21,7 +21,7 @@
 the observations are assumed to be ordered (e.g., a time
 series).}
 
-\item{kernel}{type of kernel used to compute the covariance matrix of the vector of sample moment conditions (see \code{\link{kernHAC}} for more details)}
+\item{kernel}{type of kernel used to compute the covariance matrix of the vector of sample moment conditions (see \code{\link[sandwich]{kernHAC}} for more details)}
 
 \item{approx}{A character specifying the approximation method if the bandwidth has to be chosen by \code{bwAndrews}.}
 
@@ -31,7 +31,7 @@
 
 \item{prewhite}{logical or integer. Should the estimating functions be prewhitened? If \code{TRUE} or greater than 0 a VAR model of order \code{as.integer(prewhite)} is fitted via \code{ar} with method \code{"ols"} and \code{demean = FALSE}.}
 
-\item{ar.method}{character. The \code{method} argument passed to \code{\link{ar}} for prewhitening.}
+\item{ar.method}{character. The \code{method} argument passed to \code{\link[stats]{ar}} for prewhitening.}
 
 \item{data}{an optional data frame containing the variables in the 'order.by' model.}
 
@@ -54,7 +54,7 @@
 }
 
 \note{
-  The function was written by Daniel Wilhelm and is based on \link{bwAndrews}.
+  The function was written by Daniel Wilhelm and is based on \link[sandwich]{bwAndrews}.
 }
 
 \examples{

Modified: pkg/gmm/man/estfun.Rd
===================================================================
--- pkg/gmm/man/estfun.Rd	2025-06-18 18:37:27 UTC (rev 243)
+++ pkg/gmm/man/estfun.Rd	2025-08-05 15:40:53 UTC (rev 244)
@@ -6,7 +6,7 @@
 \alias{model.matrix.tsls}
 \title{Extracts the empirical moment function}
 \description{
-It extracts the matrix of empirical moments so that it can be used by the \code{\link{kernHAC}} function. 
+It extracts the matrix of empirical moments so that it can be used by the \code{\link[sandwich]{kernHAC}} function. 
 }
 \usage{
 \method{estfun}{gmmFct}(x, y = NULL, theta = NULL, ...)
@@ -26,11 +26,11 @@
 \details{
 For \code{estfun.gmmFct}, it returns a \eqn{n \times q} matrix with typical element \eqn{g_i(\theta,y_t)} for \eqn{i=1,...q} and \eqn{t=1,...,n}. It is only used by \code{gmm} to obtain the estimates.
 
-For \code{estfun.gmm}, it returns the matrix of first order conditions of \eqn{\min_\theta \bar{g}'W\bar{g}/2}, which is a \eqn{n \times k} matrix with the \eqn{t^{th}} row being \eqn{g(\theta, y_t)W G}, where \eqn{G} is \eqn{d\bar{g}/d\theta}. It allows to compute the sandwich covariance matrix using \code{\link{kernHAC}} or \code{\link{vcovHAC}} when \eqn{W} is not the optimal matrix.
+For \code{estfun.gmm}, it returns the matrix of first order conditions of \eqn{\min_\theta \bar{g}'W\bar{g}/2}, which is a \eqn{n \times k} matrix with the \eqn{t^{th}} row being \eqn{g(\theta, y_t)W G}, where \eqn{G} is \eqn{d\bar{g}/d\theta}. It allows to compute the sandwich covariance matrix using \code{\link[sandwich]{kernHAC}} or \code{\link[sandwich]{vcovHAC}} when \eqn{W} is not the optimal matrix.
 
 The method if not yet available for \code{gel} objects.
 
-For tsls, model.matrix and estfun are used by \code{vcov()} to compute different covariance matrices using the \code{\link{sandwich}} package. See \code{\link{vcov.tsls}}. \code{model.matrix} returns the fitted values frin the first stage regression and \code{esfun} the residuals.
+For tsls, \code{model.matrix} and estfun are used by \code{\link{vcov.tsls}} to compute different covariance matrices using the \code{sandwich} package. \code{model.matrix} returns the fitted values from the first stage regression and \code{estfun} the residuals.
 }
 
 \value{

Modified: pkg/gmm/man/gel.Rd
===================================================================
--- pkg/gmm/man/gel.Rd	2025-06-18 18:37:27 UTC (rev 243)
+++ pkg/gmm/man/gel.Rd	2025-08-05 15:40:53 UTC (rev 244)
@@ -51,13 +51,13 @@
   probabilities are bounded below by zero. In that case, an analytical
   Kuhn-Tucker method is used to find the solution.}
 
-\item{kernel}{type of kernel used to compute the covariance matrix of the vector of sample moment conditions (see \code{\link{kernHAC}} for more details) and to smooth the moment conditions if "smooth" is set to TRUE. Only two types of kernel are available. The truncated implies a Bartlett kernel for the HAC matrix and the Bartlett implies a Parzen kernel (see Smith 2004).}
+\item{kernel}{type of kernel used to compute the covariance matrix of the vector of sample moment conditions (see \code{\link[sandwich]{kernHAC}} for more details) and to smooth the moment conditions if "smooth" is set to TRUE. Only two types of kernel are available. The truncated implies a Bartlett kernel for the HAC matrix and the Bartlett implies a Parzen kernel (see Smith 2004).}
 
-\item{bw}{The method to compute the bandwidth parameter. By default it is \code{\link{bwAndrews}} which is proposed by Andrews (1991). The alternative is \code{\link{bwNeweyWest}} of Newey-West(1994).}
+\item{bw}{The method to compute the bandwidth parameter. By default it is \code{\link[sandwich]{bwAndrews}} which is proposed by Andrews (1991). The alternative is \code{\link[sandwich]{bwNeweyWest}} of Newey-West(1994).}
 
 \item{prewhite}{logical or integer. Should the estimating functions be prewhitened? If \code{TRUE} or greater than 0 a VAR model of order \code{as.integer(prewhite)} is fitted via \code{ar} with method \code{"ols"} and \code{demean = FALSE}.}
 
-\item{ar.method}{character. The \code{method} argument passed to \code{\link{ar}} for prewhitening.}
+\item{ar.method}{character. The \code{method} argument passed to \code{\link[stats]{ar}} for prewhitening.}
 
 \item{approx}{a character specifying the approximation method if the bandwidth has to be chosen by \code{bwAndrews}.}
 
@@ -69,9 +69,9 @@
 
 \item{tol_obj}{Tolerance for the gradiant of the objective function to compute \eqn{\lambda} (see \code{\link{getLamb}}).}
 
-\item{optfct}{Only when the dimension of \eqn{\theta} is 1, you can choose between the algorithm \code{\link{optim}} or \code{\link{optimize}}. In that case, the former is unreliable. If \code{\link{optimize}} is chosen, "t0" must be \eqn{1\times 2} which represents the interval in which the algorithm seeks the solution.It is also possible to choose the \code{\link{nlminb}} algorithm. In that case, borns for the coefficients can be set by the options \code{upper=} and \code{lower=}.}
+\item{optfct}{Only when the dimension of \eqn{\theta} is 1, you can choose between the algorithm \code{\link[stats]{optim}} or \code{\link[stats]{optimize}}. In that case, the former is unreliable. If \code{\link[stats]{optimize}} is chosen, "t0" must be \eqn{1\times 2} which represents the interval in which the algorithm seeks the solution.It is also possible to choose the \code{\link[stats]{nlminb}} algorithm. In that case, borns for the coefficients can be set by the options \code{upper=} and \code{lower=}.}
 
-\item{constraint}{If set to TRUE, the constraint optimization algorithm is used. See \code{\link{constrOptim}} to learn how it works. In particular, if you choose to use it, you need to provide "ui" and "ci" in order to impose the constraint \eqn{ui \theta - ci \geq 0}.}
+\item{constraint}{If set to TRUE, the constraint optimization algorithm is used. See \code{\link[stats]{constrOptim}} to learn how it works. In particular, if you choose to use it, you need to provide "ui" and "ci" in order to impose the constraint \eqn{ui \theta - ci \geq 0}.}
 
 \item{tol_mom}{It is the tolerance for the moment condition \eqn{\sum_{t=1}^n p_t g(\theta(x_t)=0}, where \eqn{p_t=\frac{1}{n}D\rho(<g_t,\lambda>)} is the implied probability. It adds a penalty if the solution diverges from its goal.}
 
@@ -82,7 +82,7 @@
 
 \item{data}{A data.frame or a matrix with column names (Optional). }
 
-\item{Lambdacontrol}{Controls for the optimization of the vector of Lagrange multipliers used by either \code{\link{optim}}, \code{\link{nlminb}} or \code{\link{constrOptim}}}
+\item{Lambdacontrol}{Controls for the optimization of the vector of Lagrange multipliers used by either \code{\link[stats]{optim}}, \code{\link[stats]{nlminb}} or \code{\link[stats]{constrOptim}}}
 
 \item{model, X, Y}{logicals.  If \code{TRUE} the corresponding components of the fit (the model frame, the model matrix, the response) are returned if g is a formula.}
 
@@ -97,12 +97,12 @@
 \item{onlyCoefficients}{If \code{TRUE}, only the vector of coefficients
   and Lagrange multipliers are returned}
 
-\item{...}{More options to give to \code{\link{optim}}, \code{\link{optimize}} or \code{\link{constrOptim}}.}
+\item{...}{More options to give to \code{\link[stats]{optim}}, \code{\link[stats]{optimize}} or \code{\link[stats]{constrOptim}}.}
 
 }
 
 \details{
-If we want to estimate a model like \eqn{Y_t = \theta_1 + X_{2t}\theta_2 + ... + X_{k}\theta_k + \epsilon_t} using the moment conditions \eqn{Cov(\epsilon_tH_t)=0}, where \eqn{H_t} is a vector of \eqn{Nh} instruments, than we can define "g" like we do for \code{\link{lm}}. We would have \code{g = y~x2+x3+...+xk} and the argument "x" above would become the matrix H of instruments. As for \code{\link{lm}}, \eqn{Y_t} can be a \eqn{Ny \times 1} vector which would imply that \eqn{k=Nh \times Ny}. The intercept is included by default so you do not have to add a column of ones to the matrix \eqn{H}. You do not need to provide the gradiant in that case since in that case it is embedded in \code{\link{gel}}. The intercept can be removed by adding -1 to the formula. In that case, the column of ones need to be added manually to H.
+If we want to estimate a model like \eqn{Y_t = \theta_1 + X_{2t}\theta_2 + ... + X_{k}\theta_k + \epsilon_t} using the moment conditions \eqn{Cov(\epsilon_tH_t)=0}, where \eqn{H_t} is a vector of \eqn{Nh} instruments, than we can define "g" like we do for \code{\link[stats]{lm}}. We would have \code{g = y~x2+x3+...+xk} and the argument "x" above would become the matrix H of instruments. As for \code{\link[stats]{lm}}, \eqn{Y_t} can be a \eqn{Ny \times 1} vector which would imply that \eqn{k=Nh \times Ny}. The intercept is included by default so you do not have to add a column of ones to the matrix \eqn{H}. You do not need to provide the gradiant in that case since in that case it is embedded in \code{\link{gel}}. The intercept can be removed by adding -1 to the formula. In that case, the column of ones need to be added manually to H.
 
 If "smooth" is set to TRUE, the sample moment conditions \eqn{\sum_{t=1}^n g(\theta,x_t)} is replaced by:
 \eqn{\sum_{t=1}^n g^k(\theta,x_t)},
@@ -148,9 +148,9 @@
 
 \item{conv_mes}{Convergence message for "lambda" (see \code{\link{getLamb}})}
 
-\item{conv_par}{Convergence code for "coefficients" (see \code{\link{optim}}, \code{\link{optimize}} or \code{\link{constrOptim}})}
+\item{conv_par}{Convergence code for "coefficients" (see \code{\link[stats]{optim}}, \code{\link[stats]{optimize}} or \code{\link[stats]{constrOptim}})}
 
-\item{terms}{the \code{\link{terms}} object used when g is a formula.}
+\item{terms}{the \code{\link[stats]{terms}} object used when g is a formula.}
 
 \item{call}{the matched call.}
  

Modified: pkg/gmm/man/getLamb.Rd
===================================================================
--- pkg/gmm/man/getLamb.Rd	2025-06-18 18:37:27 UTC (rev 243)
+++ pkg/gmm/man/getLamb.Rd	2025-08-05 15:40:53 UTC (rev 244)
@@ -44,7 +44,7 @@
 \item{method}{The iterative procedure uses a Newton method for solving
   the FOC. It i however recommended to use \code{optim} or
   \code{nlminb}. If type is set to "EL" and method to "optim",
-  \code{\link{constrOptim}} is called to prevent \eqn{log(1-gt'\lambda)}
+  \code{\link[stats]{constrOptim}} is called to prevent \eqn{log(1-gt'\lambda)}
   from producing NA. The gradient and hessian is provided to
   \code{nlminb} which speed up the convergence. The latter is therefore
   the default value. "Wu" is for "EL" only. It uses the algorithm of Wu
@@ -51,8 +51,8 @@
   (2005). The value of \code{method} is ignored for "CUE" because in
   that case, the analytical solution exists.}
 
-\item{control}{Controls to send to \code{\link{optim}},
-\code{\link{nlminb}} or \code{\link{constrOptim}}} } \details{ It solves
+\item{control}{Controls to send to \code{\link[stats]{optim}},
+\code{\link[stats]{nlminb}} or \code{\link[stats]{constrOptim}}} } \details{ It solves
 the problem \eqn{\max_{\lambda} \frac{1}{n}\sum_{t=1}^n
 \rho(gt'\lambda)}. For the type "ETEL", it is only used by
 \code{\link{gel}}. In that case \eqn{\lambda} is obtained by maximizing
@@ -59,7 +59,7 @@
 \eqn{\frac{1}{n}\sum_{t=1}^n \rho(gt'\lambda)}, using
 \eqn{\rho(v)=-\exp{v}} (so ET) and \eqn{\theta} by minimizing the same
 equation but with \eqn{\rho(v)-\log{(1-v)}}. To avoid NA's,
-\code{\link{constrOptim}} is used with the restriction \eqn{\lambda'g_t
+\code{\link[stats]{constrOptim}} is used with the restriction \eqn{\lambda'g_t
 < 1}. The type "ETHD" is experimental and proposed by Antoine-Dovonon
 (2015). The paper is not yet available.  }
 

Modified: pkg/gmm/man/gmm.Rd
===================================================================
--- pkg/gmm/man/gmm.Rd	2025-06-18 18:37:27 UTC (rev 243)
+++ pkg/gmm/man/gmm.Rd	2025-08-05 15:40:53 UTC (rev 244)
@@ -38,7 +38,7 @@
 
 \item{tetw}{A \eqn{k \times 1} vector to compute the weighting matrix.}
 
-\item{gradv}{A function of the form \eqn{G(\theta,x)} which returns a \eqn{q\times k} matrix of derivatives of \eqn{\bar{g}(\theta)} with respect to \eqn{\theta}. By default, the numerical algorithm \code{numericDeriv} is used. It is of course strongly suggested to provide this function when it is possible. This gradient is used to compute the asymptotic covariance matrix of \eqn{\hat{\theta}} and to obtain the analytical gradient of the objective function if the method is set to "CG" or "BFGS" in \code{\link{optim}} and if "type" is not set to "cue". If "g" is a formula, the gradiant is not required (see the details below).}
+\item{gradv}{A function of the form \eqn{G(\theta,x)} which returns a \eqn{q\times k} matrix of derivatives of \eqn{\bar{g}(\theta)} with respect to \eqn{\theta}. By default, the numerical algorithm \code{numericDeriv} is used. It is of course strongly suggested to provide this function when it is possible. This gradient is used to compute the asymptotic covariance matrix of \eqn{\hat{\theta}} and to obtain the analytical gradient of the objective function if the method is set to "CG" or "BFGS" in \code{\link[stats]{optim}} and if "type" is not set to "cue". If "g" is a formula, the gradiant is not required (see the details below).}
 
 \item{type}{The GMM method: "twostep" is the two step GMM proposed by Hansen(1982) and the "cue" and "iterative" are respectively the continuous updated and the iterative GMM proposed by Hansen, Eaton et Yaron (1996)}
 
@@ -46,20 +46,20 @@
 
 \item{vcov}{Assumption on the properties of the random vector x. By default, x is a weakly dependant process. The "iid" option will avoid using the HAC matrix which will accelerate the estimation if one is ready to make that assumption. The option "TrueFixed" is used only when the matrix of weights is provided and it is the optimal one.}
 
-\item{kernel}{type of kernel used to compute the covariance matrix of the vector of sample moment conditions (see \code{\link{kernHAC}} for more details)}
+\item{kernel}{type of kernel used to compute the covariance matrix of the vector of sample moment conditions (see \code{\link[sandwich]{kernHAC}} for more details)}
 
 \item{crit}{The stopping rule for the iterative GMM. It can be reduce to increase the precision.}
 
 \item{bw}{The method to compute the bandwidth parameter in the HAC
-  weighting matrix. The default is \code{link{bwAndrews}} (as proposed in Andrews
+  weighting matrix. The default is \code{link[sandwich]{bwAndrews}} (as proposed in Andrews
   (1991)), which minimizes the MSE of the weighting matrix. Alternatives
   are \code{link{bwWilhelm}} (as proposed in Wilhelm
   (2015)), which minimizes the mean-square error (MSE) of the resulting
-  GMM estimator, and \code{link{bwNeweyWest}} (as proposed in Newey-West(1994)).}
+  GMM estimator, and \code{link[sandwich]{bwNeweyWest}} (as proposed in Newey-West(1994)).}
 
 \item{prewhite}{logical or integer. Should the estimating functions be prewhitened? If \code{TRUE} or greater than 0 a VAR model of order \code{as.integer(prewhite)} is fitted via \code{ar} with method \code{"ols"} and \code{demean = FALSE}.}
 
-\item{ar.method}{character. The \code{method} argument passed to \code{\link{ar}} for prewhitening.}
+\item{ar.method}{character. The \code{method} argument passed to \code{\link[stats]{ar}} for prewhitening.}
 
 \item{approx}{A character specifying the approximation method if the bandwidth has to be chosen by \code{bwAndrews}.}
 
@@ -67,7 +67,7 @@
 
 \item{itermax}{The maximum number of iterations for the iterative GMM. It is unlikely that the algorithm does not converge but we keep it as a safety.}
 
-\item{optfct}{Only when the dimension of \eqn{\theta} is 1, you can choose between the algorithm \code{\link{optim}} or \code{\link{optimize}}. In that case, the former is unreliable. If \code{\link{optimize}} is chosen, "t0" must be \eqn{1\times 2} which represents the interval in which the algorithm seeks the solution. It is also possible to choose the \code{\link{nlminb}} algorithm. In that case, boundaries for the coefficients can be set by the options \code{upper=} and \code{lower=}. The \code{\link{constrOptim}} is only available for nonlinear models for now. The standard errors may have to be corrected if the estimtes reach the boundary set by ui and ci.}
+\item{optfct}{Only when the dimension of \eqn{\theta} is 1, you can choose between the algorithm \code{\link[stats]{optim}} or \code{\link[stats]{optimize}}. In that case, the former is unreliable. If \code{\link[stats]{optimize}} is chosen, "t0" must be \eqn{1\times 2} which represents the interval in which the algorithm seeks the solution. It is also possible to choose the \code{\link[stats]{nlminb}} algorithm. In that case, boundaries for the coefficients can be set by the options \code{upper=} and \code{lower=}. The \code{\link[stats]{constrOptim}} is only available for nonlinear models for now. The standard errors may have to be corrected if the estimtes reach the boundary set by ui and ci.}
 
 \item{model, X, Y}{logical.  If \code{TRUE} the corresponding components of the fit (the model frame, the model matrix, the response) are returned if g is a formula.}
 
@@ -100,11 +100,11 @@
   the coefficient estimates. It may be of interest when the standard
   errors are not needed}
 
-\item{...}{More options to give to \code{\link{optim}}.}
+\item{...}{More options to give to \code{\link[stats]{optim}}.}
 }
 
 \details{
-If we want to estimate a model like \eqn{Y_t = \theta_1 + X_{2t} \theta_2 + \cdots + X_{k}\theta_k + \epsilon_t} using the moment conditions \eqn{Cov(\epsilon_tH_t)=0}, where \eqn{H_t} is a vector of \eqn{Nh} instruments, than we can define "g" like we do for \code{\link{lm}}. We would have \eqn{g = y ~\tilde{}~ x2+x3+ \cdots +xk} and the argument "x" above would become the matrix H of instruments. As for \code{\link{lm}}, \eqn{Y_t} can be a \eqn{Ny \times 1} vector which would imply that \eqn{k=Nh \times Ny}. The intercept is included by default so you do not have to add a column of ones to the matrix \eqn{H}. You do not need to provide the gradiant in that case since in that case it is embedded in \code{\link{gmm}}. The intercept can be removed by adding -1 to the formula. In that case, the column of ones need to be added manually to H. It is also possible to express "x" as a formula. For example, if the instruments are \eqn{\{1,z_1,z_2,z_3\}}, we can set "x" to \eqn{\tilde{} z1+z2+z3}. By default, a column of ones is added. To remove it, set "x" to \eqn{\tilde{}z1+z2+z3-1}. 
+If we want to estimate a model like \eqn{Y_t = \theta_1 + X_{2t} \theta_2 + \cdots + X_{k}\theta_k + \epsilon_t} using the moment conditions \eqn{Cov(\epsilon_tH_t)=0}, where \eqn{H_t} is a vector of \eqn{Nh} instruments, than we can define "g" like we do for \code{\link[stats]{lm}}. We would have \eqn{g = y ~\tilde{}~ x2+x3+ \cdots +xk} and the argument "x" above would become the matrix H of instruments. As for \code{\link[stats]{lm}}, \eqn{Y_t} can be a \eqn{Ny \times 1} vector which would imply that \eqn{k=Nh \times Ny}. The intercept is included by default so you do not have to add a column of ones to the matrix \eqn{H}. You do not need to provide the gradiant in that case since in that case it is embedded in \code{\link{gmm}}. The intercept can be removed by adding -1 to the formula. In that case, the column of ones need to be added manually to H. It is also possible to express "x" as a formula. For example, if the instruments are \eqn{\{1,z_1,z_2,z_3\}}, we can set "x" to \eqn{\tilde{} z1+z2+z3}. By default, a column of ones is added. To remove it, set "x" to \eqn{\tilde{}z1+z2+z3-1}. 
 
 The following explains the last example bellow. Thanks to Dieter Rozenich, a student from the Vienna University of Economics and Business Administration. He suggested that it would help to understand the implementation of the Jacobian.  
 
@@ -158,7 +158,7 @@
 
 \item{objective}{the value of the objective function \eqn{\| var(\bar{g})^{-1/2}\bar{g}\|^2}}
 
-\item{terms}{the \code{\link{terms}} object used when g is a formula.}
+\item{terms}{the \code{\link[stats]{terms}} object used when g is a formula.}
 
 \item{call}{the matched call.}
  
@@ -168,7 +168,7 @@
 
 \item{model}{if requested (the default), the model frame used if "g" is a formula.}
 
-\item{algoInfo}{Information produced by either \code{\link{optim}} or \code{\link{nlminb}} related to the convergence if "g" is a function. It is printed by the \code{summary.gmm} method.}
+\item{algoInfo}{Information produced by either \code{\link[stats]{optim}} or \code{\link[stats]{nlminb}} related to the convergence if "g" is a function. It is printed by the \code{summary.gmm} method.}
 
  }
 

Modified: pkg/gmm/man/growth.Rd
===================================================================
--- pkg/gmm/man/growth.Rd	2025-06-18 18:37:27 UTC (rev 243)
+++ pkg/gmm/man/growth.Rd	2025-08-05 15:40:53 UTC (rev 244)
@@ -24,6 +24,5 @@
   \item{LagPop}{Population of the previous period}
 }
 }
-
-\source{\url{http://fhayashi.fc2web.com/datasets.htm}}
+\source{\url{https://sites.google.com/view/fumio-hayashis-hp/hayashi-econometrics}}
 \keyword{datasets}

Modified: pkg/gmm/man/plot.Rd
===================================================================
--- pkg/gmm/man/plot.Rd	2025-06-18 18:37:27 UTC (rev 243)
+++ pkg/gmm/man/plot.Rd	2025-08-05 15:40:53 UTC (rev 244)
@@ -28,10 +28,10 @@
   \item{main}{Vector of titles for each plot.
   }
   \item{panel}{panel function.  The useful alternative to
-    \code{\link{points}}, \code{\link{panel.smooth}} can be chosen
+    \code{\link[graphics]{points}}, \code{\link[graphics]{panel.smooth}} can be chosen
     by \code{add.smooth = TRUE}.}
   \item{ask}{logical; if \code{TRUE}, the user is \emph{ask}ed before
-    each plot, see \code{\link{par}(ask=.)}.}
+    each plot, see \code{\link[graphics]{par}(ask=.)}.}
   \item{\dots}{other parameters to be passed through to plotting
     functions.}
   \item{add.smooth}{logical indicating if a smoother should be added to

Modified: pkg/gmm/man/smoothG.Rd
===================================================================
--- pkg/gmm/man/smoothG.Rd	2025-06-18 18:37:27 UTC (rev 243)
+++ pkg/gmm/man/smoothG.Rd	2025-08-05 15:40:53 UTC (rev 244)
@@ -16,8 +16,8 @@
     order \code{as.integer(prewhite)} is fitted via \code{ar} with
     method \code{"ols"} and \code{demean = FALSE}.}
 \item{ar.method}{character. The \code{method} argument passed to
-   \code{\link{ar}} for prewhitening.}
-\item{weights}{The smoothing weights can be computed by \code{\link{weightsAndrews}} of it can be provided manually. If provided, it has to be a \eqn{r\times 1}vector (see details). }
+   \code{\link[stats]{ar}} for prewhitening.}
+\item{weights}{The smoothing weights can be computed by \code{\link[sandwich]{weightsAndrews}} of it can be provided manually. If provided, it has to be a \eqn{r\times 1}vector (see details). }
 \item{approx}{a character specifying the approximation method if the
     bandwidth has to be chosen by \code{bwAndrews}.}
 \item{tol}{numeric. Weights that exceed \code{tol} are used for computing

Modified: pkg/gmm/man/sysGmm.Rd
===================================================================
--- pkg/gmm/man/sysGmm.Rd	2025-06-18 18:37:27 UTC (rev 243)
+++ pkg/gmm/man/sysGmm.Rd	2025-08-05 15:40:53 UTC (rev 244)
@@ -36,15 +36,15 @@
   dependent processes and "CondHom" implies conditional
   homoscedasticity. The option "TrueFixed" is used only when the matrix of weights is provided and it is the optimal one.}
 
-\item{kernel}{type of kernel used to compute the covariance matrix of the vector of sample moment conditions (see \code{\link{kernHAC}} for more details)}
+\item{kernel}{type of kernel used to compute the covariance matrix of the vector of sample moment conditions (see \code{\link[sandwich]{kernHAC}} for more details)}
 
 \item{crit}{The stopping rule for the iterative GMM. It can be reduce to increase the precision.}
 
-\item{bw}{The method to compute the bandwidth parameter. By default it is \code{\link{bwAndrews}} which is proposed by Andrews (1991). The alternative is \code{\link{bwNeweyWest}} of Newey-West(1994).}
+\item{bw}{The method to compute the bandwidth parameter. By default it is \code{\link[sandwich]{bwAndrews}} which is proposed by Andrews (1991). The alternative is \code{\link[sandwich]{bwNeweyWest}} of Newey-West(1994).}
 
 \item{prewhite}{logical or integer. Should the estimating functions be prewhitened? If \code{TRUE} or greater than 0 a VAR model of order \code{as.integer(prewhite)} is fitted via \code{ar} with method \code{"ols"} and \code{demean = FALSE}.}
 
-\item{ar.method}{character. The \code{method} argument passed to \code{\link{ar}} for prewhitening.}
+\item{ar.method}{character. The \code{method} argument passed to \code{\link[stats]{ar}} for prewhitening.}
 
 \item{approx}{A character specifying the approximation method if the bandwidth has to be chosen by \code{bwAndrews}.}
 
@@ -91,7 +91,7 @@
 
 \item{objective}{the value of the objective function \eqn{\| var(\bar{g})^{-1/2}\bar{g}\|^2}}
 
-\item{terms}{The list of \code{\link{terms}} objects for each equation}
+\item{terms}{The list of \code{\link[stats]{terms}} objects for each equation}
 
 \item{call}{the matched call.}
  

Modified: pkg/gmm/man/tsls.Rd
===================================================================
--- pkg/gmm/man/tsls.Rd	2025-06-18 18:37:27 UTC (rev 243)
+++ pkg/gmm/man/tsls.Rd	2025-08-05 15:40:53 UTC (rev 244)
@@ -23,7 +23,7 @@
 \deqn{
 Y_i = X_i\beta + u_i
 }
-In the first step, \code{\link{lm}}  is used to regress \eqn{X_i} on the set of instruments \eqn{Z_i}. The second step also uses \code{\link{lm}} to regress \eqn{Y_i} on the fitted values of the first step. 
+In the first step, \code{\link[stats]{lm}}  is used to regress \eqn{X_i} on the set of instruments \eqn{Z_i}. The second step also uses \code{\link[stats]{lm}} to regress \eqn{Y_i} on the fitted values of the first step. 
 }
 
 \value{
@@ -43,7 +43,7 @@
 
 \item{objective}{the value of the objective function \eqn{\| var(\bar{g})^{-1/2}\bar{g}\|^2}}
 
-\item{terms}{the \code{\link{terms}} object used when g is a formula.}
+\item{terms}{the \code{\link[stats]{terms}} object used when g is a formula.}
 
 \item{call}{the matched call.}
  
@@ -53,7 +53,7 @@
 
 \item{model}{if requested (the default), the model frame used if "g" is a formula.}
 
-\item{algoInfo}{Information produced by either \code{\link{optim}} or \code{\link{nlminb}} related to the convergence if "g" is a function. It is printed by the \code{summary.gmm} method.}
+\item{algoInfo}{Information produced by either \code{\link[stats]{optim}} or \code{\link[stats]{nlminb}} related to the convergence if "g" is a function. It is printed by the \code{summary.gmm} method.}
 }
 
 

Modified: pkg/gmm/man/vcov.Rd
===================================================================
--- pkg/gmm/man/vcov.Rd	2025-06-18 18:37:27 UTC (rev 243)
+++ pkg/gmm/man/vcov.Rd	2025-08-05 15:40:53 UTC (rev 244)
@@ -19,7 +19,7 @@
  \item{object}{An object of class \code{gmm} or \code{gmm} returned by the function \code{\link{gmm}} or \code{\link{gel}}}
 \item{lambda}{If set to TRUE, the covariance matrix of the Lagrange multipliers is produced.}
 \item{type}{Type of covariance matrix for the meat}
-\item{hacProp}{A list of arguments to pass to \code{\link{kernHAC}}}
+\item{hacProp}{A list of arguments to pass to \code{\link[sandwich]{kernHAC}}}
 \item{robToMiss}{If \code{TRUE}, it computes the robust to
  misspecification covariance matrix}
 \item{...}{Other arguments when \code{vcov} is applied to another class object}

Modified: pkg/gmm/man/wage.Rd
===================================================================
--- pkg/gmm/man/wage.Rd	2025-06-18 18:37:27 UTC (rev 243)
+++ pkg/gmm/man/wage.Rd	2025-08-05 15:40:53 UTC (rev 244)
@@ -24,7 +24,7 @@
 }
 }
 
-\source{\url{http://fhayashi.fc2web.com/datasets.htm}}
+\source{\url{https://sites.google.com/view/fumio-hayashis-hp/hayashi-econometrics}}
 
 
 \keyword{datasets}



More information about the Gmm-commits mailing list