445e334b28
pour ça
20 lines
601 B
R
20 lines
601 B
R
# 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
|
|
#' @param meanf Mean function
|
|
#' @param variancef Variance function
|
|
#' @return A two column matrix of differences
|
|
#' @export meanvariance.gmm.vector
|
|
#' @author François Pelletier
|
|
meanvariance.gmm.vector <- function(param,X,meanf,variancef)
|
|
{
|
|
cbind(X-meanf(param),(X-meanf(param))^2 - variancef(param))
|
|
}
|