GMMStuff/R/mean.variance.gmm.vector.R

21 lines
601 B
R
Raw Normal View History

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 X 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
#' @export meanvariance.gmm.vector
2014-02-27 03:45:46 +00:00
#' @author François Pelletier
meanvariance.gmm.vector <- function(param,X,meanf,variancef)
2014-02-27 03:45:46 +00:00
{
cbind(X-meanf(param),(X-meanf(param))^2 - variancef(param))
}