Correction fonction startparamGAL

This commit is contained in:
François Pelletier 2014-03-05 19:25:03 -05:00
parent ae40f58427
commit 861e3b6339
3 changed files with 10 additions and 3 deletions

View file

@ -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

View file

@ -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))
}
}

View file

@ -6,6 +6,11 @@
}
\arguments{
\item{param}{GAL parameters}
\item{Data}{Data sample}
\item{type}{Choose between "mu" or "kappa"
parametrization}
}
\value{
gradient matrix