diff --git a/R/mean.variance.GMM.gradient.R b/R/mean.variance.GMM.gradient.R index 5d83fef..09f7ac5 100644 --- a/R/mean.variance.GMM.gradient.R +++ b/R/mean.variance.GMM.gradient.R @@ -10,6 +10,8 @@ #' #' Derivative of the moment conditions according to the vector of parameters #' @param param GAL parameters +#' @param Data Data sample +#' @param type Choose between "mu" or "kappa" parametrization #' @return gradient matrix #' #' @author François Pelletier diff --git a/R/startparamGAL.R b/R/startparamGAL.R index 6768ca6..a0c9551 100644 --- a/R/startparamGAL.R +++ b/R/startparamGAL.R @@ -26,12 +26,12 @@ startparamGAL <- function(data,type="mu",log=FALSE) mu <- mom[3]*sigma*sqrt(2/(3*(mom[4]))) theta <- mom[1]-tau*mu if(log==FALSE) - c(theta,sigma,mu,tau) + return(c(theta,sigma,mu,tau)) else - log(c(theta,sigma,mu,tau)) + return(log(c(theta,sigma,mu,tau))) } if(type=="kappa") { - changetypeGAL(startparamGAL(data,type="mu",log),type="kappa",target="mu",log) + return(changetypeGAL(startparamGAL(data,type="mu",log),type="kappa",target="mu",log)) } } diff --git a/man/mean.variance.GMM.gradient.Rd b/man/mean.variance.GMM.gradient.Rd index 84ba393..4321694 100644 --- a/man/mean.variance.GMM.gradient.Rd +++ b/man/mean.variance.GMM.gradient.Rd @@ -6,6 +6,11 @@ } \arguments{ \item{param}{GAL parameters} + + \item{Data}{Data sample} + + \item{type}{Choose between "mu" or "kappa" + parametrization} } \value{ gradient matrix