2014-02-27 03:45:46 +00:00
|
|
|
# GMM vector for mean and variance moment conditions
|
|
|
|
#
|
|
|
|
# Author: Francois Pelletier
|
|
|
|
#
|
|
|
|
# LGPL-3.0
|
|
|
|
###############################################################################
|
|
|
|
|
|
|
|
|
|
|
|
#' GMM vector for mean and variance moment conditions
|
|
|
|
#' @param param Estimated parameters
|
|
|
|
#' @param sample Data Sample
|
|
|
|
#' @param meanf Mean function
|
|
|
|
#' @param variancef Variance function
|
|
|
|
#' @return A two column matrix of differences
|
2014-03-06 02:48:37 +00:00
|
|
|
#' @export meanvariance.gmm.vector
|
2014-02-27 03:45:46 +00:00
|
|
|
#' @author François Pelletier
|
2014-03-06 02:48:37 +00:00
|
|
|
meanvariance.gmm.vector <- function(param,sample,meanf,variancef)
|
2014-02-27 03:45:46 +00:00
|
|
|
{
|
|
|
|
cbind(X-meanf(param),(X-meanf(param))^2 - variancef(param))
|
|
|
|
}
|