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
|
2014-03-08 05:41:05 +00:00
|
|
|
#' @param data Data Sample
|
2014-02-27 03:45:46 +00:00
|
|
|
#' @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-08 05:41:05 +00:00
|
|
|
meanvariance.gmm.vector <- function(param,data,meanf,variancef)
|
2014-02-27 03:45:46 +00:00
|
|
|
{
|
2014-03-08 05:41:05 +00:00
|
|
|
cbind(data-meanf(param),(data-meanf(param))^2 - variancef(param))
|
2014-02-27 03:45:46 +00:00
|
|
|
}
|