From 0a21668604e7c61d1d0cc8e638c74d82e45cf3e5 Mon Sep 17 00:00:00 2001 From: franc00018 Date: Sat, 29 Mar 2014 11:02:43 -0400 Subject: [PATCH] =?UTF-8?q?modification=20ordre=20des=20param=C3=A8tres=20?= =?UTF-8?q?covariance.GMM?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- R/covariance.GMM.R | 4 ++-- R/iterative.GMM.R | 2 +- man/covariance.GMM.Rd | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/R/covariance.GMM.R b/R/covariance.GMM.R index e0cf340..ca12f4d 100644 --- a/R/covariance.GMM.R +++ b/R/covariance.GMM.R @@ -6,14 +6,14 @@ ############################################################################### #' Estimated covariance matrix -#' @param conditions.vector Vector of moment conditions #' @param param Vector of estimated parameters +#' @param conditions.vector Vector of moment conditions #' @param data Individual data sample #' @param ... Functions of the vector of moment conditions #' @return A square covariance matrix #' @export covariance.GMM #' @author François Pelletier -covariance.GMM <- function(conditions.vector,param,data,...) +covariance.GMM <- function(param,conditions.vector,data,...) { t(conditions.vector(param,data,...)) %*% conditions.vector(param,data,...) / length(data) } \ No newline at end of file diff --git a/R/iterative.GMM.R b/R/iterative.GMM.R index 63dc27b..a122bb2 100644 --- a/R/iterative.GMM.R +++ b/R/iterative.GMM.R @@ -24,7 +24,7 @@ iterative.GMM <- function(start.value,conditions.vector,data,W,...,max.iter=50,e repeat { theta2 <- optim.GMM(theta1,conditions.vector,data,W,...)$par - S <- covariance.GMM(conditions.vector,theta2,data,...) + S <- covariance.GMM(theta2,conditions.vector,data,...) if(sqrt(sum((theta1-theta2)^2))max.iter) diff --git a/man/covariance.GMM.Rd b/man/covariance.GMM.Rd index 38da47d..baffefc 100644 --- a/man/covariance.GMM.Rd +++ b/man/covariance.GMM.Rd @@ -2,13 +2,13 @@ \alias{covariance.GMM} \title{Estimated covariance matrix} \usage{ -covariance.GMM(conditions.vector, param, data, ...) +covariance.GMM(param, conditions.vector, data, ...) } \arguments{ - \item{conditions.vector}{Vector of moment conditions} - \item{param}{Vector of estimated parameters} + \item{conditions.vector}{Vector of moment conditions} + \item{data}{Individual data sample} \item{...}{Functions of the vector of moment conditions}