Ajout des return() et update du namespace avec roxygen

This commit is contained in:
François Pelletier 2014-03-05 21:48:37 -05:00
parent e0cbfdc2c7
commit ca602c5f75
9 changed files with 18 additions and 19 deletions

View file

@ -1,8 +1,7 @@
export(covariance.GMM,
delta.method.covariance.GMM,
fourmoments.gmm.vector,
iterative.GMM,
mean.variance.gmm.vector,
objective.GMM,
optim.GMM
)
export(covariance.GMM)
export(delta.method.covariance.GMM)
export(fourmoments.gmm.vector)
export(iterative.GMM)
export(meanvariance.gmm.vector)
export(objective.GMM)
export(optim.GMM)

View file

@ -11,7 +11,7 @@
#' @param sample Individual data sample
#' @param ... Functions of the vector of moment conditions
#' @return A square covariance matrix
#'
#' @export covariance.GMM
#' @author François Pelletier
covariance.GMM <- function(conditions.vector,param,sample...)
{

View file

@ -11,7 +11,7 @@
#' @param gradient Gradient matrix of the moment conditions
#' @param size Sample size
#' @return The covariance matrix of the parameters
#'
#' @export delta.method.covariance.GMM
#' @author François Pelletier
delta.method.covariance.GMM <- function(covariance,gradient,size)
{

View file

@ -13,7 +13,7 @@
#' @param skewnessf Skewness function
#' @param kurtosisf Kurtosis function
#' @return A four column matrix of differences
#'
#' @export fourmoments.gmm.vector
#' @author François Pelletier
fourmoments.gmm.vector <- function(param,sample,meanf,variancef,skewnessf,kurtosisf)
{

View file

@ -17,7 +17,7 @@
#' @param max.iter Maximum number of iterations
#' @param epsilon Minimum precision level
#' @return A list containing the optimized vector of parameter and corresponding covariance matrix
#'
#' @export iterative.GMM
#' @author François Pelletier
iterative.GMM <- function(start,conditions.vector,sample,...,
W,R,r,max.iter=50,epsilon=1E-6)

View file

@ -12,9 +12,9 @@
#' @param meanf Mean function
#' @param variancef Variance function
#' @return A two column matrix of differences
#'
#' @export meanvariance.gmm.vector
#' @author François Pelletier
mean.variance.gmm.vector <- function(param,sample,meanf,variancef)
meanvariance.gmm.vector <- function(param,sample,meanf,variancef)
{
cbind(X-meanf(param),(X-meanf(param))^2 - variancef(param))
}

View file

@ -14,7 +14,7 @@
#' @param R Linear constraint matrix of coefficients
#' @param r Linear constraint constants
#' @return A scalar value
#'
#' @export objective.GMM
#' @author François Pelletier
objective.GMM <- function(param.lagrangian,conditions.vector,sample,...,
W=diag(length(conditions.vector)),R=0,r=0)

View file

@ -8,7 +8,7 @@
#' @param R Linear constraint matrix of coefficients
#' @param r Linear constraint constants
#' @return une liste contenant le résultat de l'optimisation
#'
#' @export optim.GMM
#' @author François Pelletier
optim.GMM <- function(start,conditions.vector,sample,...,W,R,r)
{

View file

@ -1,8 +1,8 @@
\name{mean.variance.gmm.vector}
\alias{mean.variance.gmm.vector}
\name{meanvariance.gmm.vector}
\alias{meanvariance.gmm.vector}
\title{GMM vector for mean and variance moment conditions}
\usage{
\method{mean}{variance.gmm.vector}(param, sample, meanf, variancef)
meanvariance.gmm.vector(param, sample, meanf, variancef)
}
\arguments{
\item{param}{Estimated parameters}