2014-02-27 03:45:46 +00:00
|
|
|
# Estimated covariance matrix
|
|
|
|
#
|
|
|
|
# Author: Francois Pelletier
|
|
|
|
#
|
|
|
|
# LGPL-3.0
|
|
|
|
###############################################################################
|
|
|
|
|
|
|
|
#' Estimated covariance matrix
|
|
|
|
#' @param conditions.vector Vector of moment conditions
|
|
|
|
#' @param n Sample size
|
|
|
|
#' @param ... Parameters of the vector of moment conditions
|
|
|
|
#' @return A square covariance matrix
|
|
|
|
#'
|
|
|
|
#' @author François Pelletier
|
2014-02-28 04:05:30 +00:00
|
|
|
covariance.GMM <- function(conditions.vector,n,...)
|
2014-02-27 03:45:46 +00:00
|
|
|
{
|
|
|
|
t(conditions.vector(...)) %*% conditions.vector(...) / n
|
|
|
|
}
|