[Distr-commits] r1258 - in branches/distr-2.8/pkg/distrMod: . R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Aug 8 02:03:59 CEST 2018
Author: ruckdeschel
Date: 2018-08-08 02:03:59 +0200 (Wed, 08 Aug 2018)
New Revision: 1258
Modified:
branches/distr-2.8/pkg/distrMod/DESCRIPTION
branches/distr-2.8/pkg/distrMod/R/L2GroupFamilies.R
branches/distr-2.8/pkg/distrMod/R/SimpleL2ParamFamilies.R
Log:
[distrMod] branch 2.8
+ require more recent versions of distr, distrEx
+ the L2derivatives of the SimpleL2ParamFamilies and the L2GroupFamilies now respect
restrictions in the support of the underlying distribution: the L2derivatives are 0
whenever the argument x has liesInSupport(distribution,x, checkFin = TRUE) == FALSE
(i.e., in discrete distiributions, with a more refined version, extending the checking
of the numerically truncated support).
Modified: branches/distr-2.8/pkg/distrMod/DESCRIPTION
===================================================================
--- branches/distr-2.8/pkg/distrMod/DESCRIPTION 2018-08-07 23:54:32 UTC (rev 1257)
+++ branches/distr-2.8/pkg/distrMod/DESCRIPTION 2018-08-08 00:03:59 UTC (rev 1258)
@@ -7,7 +7,7 @@
Authors at R: c(person("Matthias", "Kohl", role=c("aut", "cph")), person("Peter", "Ruckdeschel",
role=c("cre", "cph"), email="peter.ruckdeschel at uni-oldenburg.de"), person("R Core
Team", role = c("ctb", "cph"), comment="for source file 'format.perc'"))
-Depends: R(>= 2.14.0), distr(>= 2.5.2), distrEx(>= 2.4), RandVar(>= 0.6.3), MASS, stats4,
+Depends: R(>= 2.14.0), distr(>= 2.8.0), distrEx(>= 2.8.0), RandVar(>= 0.6.3), MASS, stats4,
methods
Imports: startupmsg, sfsmisc, graphics, stats, grDevices
Suggests: ismev, evd,
Modified: branches/distr-2.8/pkg/distrMod/R/L2GroupFamilies.R
===================================================================
--- branches/distr-2.8/pkg/distrMod/R/L2GroupFamilies.R 2018-08-07 23:54:32 UTC (rev 1257)
+++ branches/distr-2.8/pkg/distrMod/R/L2GroupFamilies.R 2018-08-08 00:03:59 UTC (rev 1258)
@@ -200,7 +200,7 @@
distr.0 <- scale.0*centraldistribution + loc
fct <- function(x){}
body(fct) <- substitute({y <- 0*x
- inS <- liesInSupport(distr.0, x)
+ inS <- liesInSupport(distr.0, x, checkFin = TRUE)
y[inS] <- ((x[inS] - loc.1)/scale*LogDeriv((x[inS] - loc.1)/scale.1)-1)/scale.1
return(y)},
list(loc.1 = loc, scale.1 = scale.0))
@@ -744,12 +744,12 @@
fct1 <- function(x){}
fct2 <- function(x){}
body(fct1) <- substitute({y <- 0*x
- inS <- liesInSupport(distr.0, x)
+ inS <- liesInSupport(distr.0, x, checkFin = TRUE)
y[inS] <- LogDeriv((x[inS] - loc.1)/scale.1)/scale.1
return(y)},
list(loc.1 = mean.0, scale.1 = sd.0))
body(fct2) <- substitute({y <- 0*x
- inS <- liesInSupport(distr.0, x)
+ inS <- liesInSupport(distr.0, x, checkFin = TRUE)
y[inS] <- ((x[inS] - loc.1)/scale.1 *
LogDeriv((x[inS] - loc.1)/scale.1)-1)/scale.1
return(y)},
Modified: branches/distr-2.8/pkg/distrMod/R/SimpleL2ParamFamilies.R
===================================================================
--- branches/distr-2.8/pkg/distrMod/R/SimpleL2ParamFamilies.R 2018-08-07 23:54:32 UTC (rev 1257)
+++ branches/distr-2.8/pkg/distrMod/R/SimpleL2ParamFamilies.R 2018-08-08 00:03:59 UTC (rev 1258)
@@ -31,7 +31,7 @@
distr.0 <- Binom(size = size, prob = prob.0)
fct <- function(x){}
body(fct) <- substitute({y <- 0*x
- inS <- liesInSupport(distr.0, x)
+ inS <- liesInSupport(distr.0, x, checkFin = TRUE)
y[inS] <- (x[inS]-size*prob.1)/(prob.1*(1-prob.1))
return(y)},
list(size = size, prob.1 = prob.0))
@@ -90,7 +90,7 @@
distr.0 <- Pois(lambda=lambda.0)
fct <- function(x){}
body(fct) <- substitute({y <- 0*x
- inS <- liesInSupport(distr.0, x)
+ inS <- liesInSupport(distr.0, x, checkFin = TRUE)
y[inS] <- x[inS]/lambda.1-1
return(y)},
list(lambda.1 = lambda.0))
@@ -153,7 +153,7 @@
fct <- function(x){}
body(fct) <- substitute({
y <- 0*x
- inS <- liesInSupport(distr.0, x)
+ inS <- liesInSupport(distr.0, x, checkFin = TRUE)
y[inS] <- (size/prob.1- x[inS]/(1-prob.1))
return(y)},
list(size = size, prob.1 = prob.0))
@@ -217,13 +217,13 @@
fct2 <- function(x){}
body(fct2) <- substitute({
y <- 0*x
- inS <- liesInSupport(distr.0, x)
+ inS <- liesInSupport(distr.0, x, checkFin = TRUE)
y[inS] <- (size.1/prob.1- x[inS]/(1-prob.1))
return(y)},
list(size.1 = size.0, prob.1 = prob.0))
body(fct1) <- substitute({
y <- 0*x
- inS <- liesInSupport(distr.0, x)
+ inS <- liesInSupport(distr.0, x, checkFin = TRUE)
y[inS] <- digamma(x[inS]+size.1)-digamma(size.1)+log(prob.1)
return(y)},
list(size.1 = size.0, prob.1 = prob.0))
@@ -303,17 +303,17 @@
fct1.2 <- function(x){}
fct2 <- function(x){}
body(fct1) <- substitute({y <- 0*x
- inS <- liesInSupport(distr.0, x)
+ inS <- liesInSupport(distr.0, x, checkFin = TRUE)
y[inS] <- digamma(x[inS]+size.1)-digamma(size.1)+log(prob.1)
return(y)},
list(size.1 = size.00, prob.1 = prob.00))
body(fct1.2)<- substitute({y <- 0*x
- inS <- liesInSupport(distr.0, x)
+ inS <- liesInSupport(distr.0, x, checkFin = TRUE)
y[inS] <- (size.1/prob.1- x[inS]/(1-prob.1))
return(y)},
list(size.1 = size.00, prob.1 = prob.00))
body(fct2) <- substitute({y <- 0*x
- inS <- liesInSupport(distr.0, x)
+ inS <- liesInSupport(distr.0, x, checkFin = TRUE)
y[inS] <- (1/prob.1-1)* fct1(x[inS]) -
size.1/prob.1^2 * fct1.2(x[inS])
return(y)},
@@ -403,12 +403,12 @@
fct1 <- function(x){}
fct2 <- function(x){}
body(fct1) <- substitute({y <- 0*x
- inS <- liesInSupport(distr.0, x)
+ inS <- liesInSupport(distr.0, x, checkFin = TRUE)
y[inS] <- (x[inS]/scale.1 - shape.1)/scale.1
return(y)},
list(scale.1 = scale.0, shape.1 = shape.0))
body(fct2) <- substitute({y <- 0*x
- inS <- liesInSupport(distr.0, x)
+ inS <- liesInSupport(distr.0, x, checkFin = TRUE)
y[inS] <- log(x[inS]/scale.1) - digamma(shape.1)
return(y)},
list(scale.1 = scale.0, shape.1 = shape.0))
@@ -500,13 +500,13 @@
fct1 <- function(x){}
fct2 <- function(x){}
body(fct1) <- substitute({y <- 0*x
- inS <- liesInSupport(distr.0, x)
+ inS <- liesInSupport(distr.0, x, checkFin = TRUE)
y[inS] <- log(x[inS])-digamma(shape1.1)+
digamma(shape1.1+shape2.1)
return(y)},
list(shape1.1 = shape1.0, shape2.1 = shape2.0))
body(fct2) <- substitute({y <- 0*x
- inS <- liesInSupport(distr.0, x)
+ inS <- liesInSupport(distr.0, x, checkFin = TRUE)
y[inS] <- log(1-x[inS])-digamma(shape2.1)+
digamma(shape1.1+shape2.1)
return(y)},
More information about the Distr-commits
mailing list