GMMStuff/R/covariance.GMM.R

18 lines
513 B
R
Raw Normal View History

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
covariance.GMM <- function(conditions.vector,n,...)
2014-02-27 03:45:46 +00:00
{
t(conditions.vector(...)) %*% conditions.vector(...) / n
}