2014-02-22 18:28:27 +00:00
|
|
|
# Derivative of scale and location transform to the GAL distribution
|
|
|
|
#
|
|
|
|
# Author: Francois Pelletier
|
|
|
|
#
|
|
|
|
# LGPL 3.0
|
|
|
|
###############################################################################
|
|
|
|
|
|
|
|
#' Derivative of scale and location transform to the GAL distribution
|
|
|
|
#' @param param Parameter vector
|
|
|
|
#' @param type Choose between "mu" or "kappa" parametrization
|
|
|
|
#' @param location Location shift (unitary)
|
|
|
|
#' @param scale Scale shift (in standard deviations)
|
|
|
|
#' @param log Logical for log-parameters
|
|
|
|
#' @return The matrix derivative of the transformed parameter vector
|
2014-03-06 02:44:52 +00:00
|
|
|
#' @export dscaleGAL
|
2014-02-22 18:28:27 +00:00
|
|
|
#' @author Francois Pelletier
|
|
|
|
dscaleGAL <- function(param,type="kappa",location,scale,log=FALSE)
|
|
|
|
{
|
|
|
|
if(log)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if(type=="kappa")
|
|
|
|
{
|
2014-03-06 02:44:52 +00:00
|
|
|
return(diag(c(scale,scale,1,1)))
|
2014-02-22 18:28:27 +00:00
|
|
|
}
|
|
|
|
else if (type=="mu")
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|