ajout de scaleGAL
This commit is contained in:
parent
473c634d72
commit
b19ce5e6bf
2 changed files with 31 additions and 2 deletions
|
@ -8,12 +8,12 @@
|
|||
<intAttribute key="de.walware.statet.r.debug/RConsole/objectdb.lists.max_length" value="10000"/>
|
||||
<stringAttribute key="de.walware.statet.r.debug/RConsole/type" value="local.rjs-rmi"/>
|
||||
<stringAttribute key="de.walware.statet.r.debug/REnv/REnvSetting" value="default-workbench;"/>
|
||||
<stringAttribute key="de.walware.statet.r.debug/REnv/workingDirectory" value="${workspace_loc:/GeneralizedAsymmetricLaplace}"/>
|
||||
<stringAttribute key="de.walware.statet.r.debug/REnv/workingDirectory" value="${workspace_loc:/FourierStuff}"/>
|
||||
<booleanAttribute key="de.walware.statet.r.debug/integrationintegration.rdbgext.enabled" value="true"/>
|
||||
<booleanAttribute key="de.walware.statet.r.debug/integrationintegration.rgraphics.asdefault" value="true"/>
|
||||
<booleanAttribute key="de.walware.statet.r.debug/integrationintegration.rhelp.enabled" value="true"/>
|
||||
<stringAttribute key="de.walware.statet.r/renv/REnvCode" value="default-workbench;"/>
|
||||
<stringAttribute key="de.walware.statet.r/renv/WorkingDirectory" value="${workspace_loc:/GeneralizedAsymmetricLaplace}"/>
|
||||
<stringAttribute key="de.walware.statet.r/renv/WorkingDirectory" value="${workspace_loc:/FourierStuff}"/>
|
||||
<intAttribute key="history.File.mode" value="1"/>
|
||||
<stringAttribute key="history.File.path" value="${session_startup_wd}/.Rhistory"/>
|
||||
<booleanAttribute key="history.Prepend.Timestamp.enable" value="true"/>
|
||||
|
|
29
R/scaleGAL.R
Normal file
29
R/scaleGAL.R
Normal file
|
@ -0,0 +1,29 @@
|
|||
# Apply scale and location transform to the GAL distribution
|
||||
#
|
||||
# Author: Francois Pelletier
|
||||
#
|
||||
# LGPL 3.0
|
||||
###############################################################################
|
||||
|
||||
|
||||
#' Apply 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)
|
||||
#' @return The transformed parameter vector
|
||||
#'
|
||||
#' @author Francois Pelletier
|
||||
scaleGAL <- function(param,type="kappa",location,scale)
|
||||
{
|
||||
if(type=="kappa")
|
||||
{
|
||||
param * c(scale,scale,1,1) + c(location,0,0,0)
|
||||
}
|
||||
else
|
||||
{
|
||||
changetypeGAL(
|
||||
scaleGAL(changetypeGAL(param,type="mu",target="kappa"),type="kappa",location,scale),
|
||||
type="kappa",target="mu")
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue