"AbscontDistribution"AbscontDistribution(r = NULL, d = NULL, p = NULL, q = NULL,
gaps = NULL, param = NULL, img = new("Reals"),
.withSim = FALSE, .withArith = FALSE,
.lowerExact = FALSE, .logExact = FALSE,
withgaps = getdistrOption("withgaps"),
low1 = NULL, up1 = NULL, low = -Inf, up =Inf,
withStand = FALSE,
ngrid = getdistrOption("DefaultNrGridPoints"),
ep = getdistrOption("TruncQuantile"),
e = getdistrOption("RtoDPQ.e"),
Symmetry = NoSymmetry())r to be filledd to be filledp to be filledq to be filled"matrix" with two columns) to be filled
(i.e. t(gaps) must be ordered if read as vector)"OptionalParameter")"rSpace")d
to integrate to 1 --- default is no resp. FALSEsupp, prob
distributional arithmetics was involved, you may set this to TRUE.supp, prob
simulations were involved, you may set this to TRUE.lower.tail=FALSE
part is calculated exactly, avoing a ``1-.''.d,p,q,
we make particular use of a logarithmic representation to enhance accuracy.Symmetry=SphericalSymmetry(center)."AbscontDistribution"r, d, p or q needs to be given as argument.
The other non-given slots are then reconstructed according to the following scheme:
.D2P, q by .P2Q, r by q(runif(n))
- - + - d by .P2D, q by .P2Q, r by q(runif(n))
- + + - q by .P2Q, r by q(runif(n))
- - - + p by .Q2P, d by .P2D, r by q(runif(n))
- + - + p by .Q2P, r by q(runif(n))
- - + + d by .P2D, r by q(runif(n))
- + + + r by q(runif(n))
+ - - - call to RtoDPQ
+ + - - p by .D2P, q by .P2Q
+ - + - d by .P2D, q by .P2Q
+ + + - q by .P2Q
+ - - + p by .Q2P, d by .P2D
+ + - + p by .Q2P
+ - + + d by .P2D
+ + + + nothing
}
For this purpose, one may alternatively give arguments low1 and up1 (NULL each by default,
and determined through slot q, resp. p, resp. d, resp. r in this order
according to availability),
for the (finite) range of values in the support of this distribution,
as well as the possibly infinite theoretical range given by
arguments low and up with default values -Inf, Inf, respectively.
Of course all other slots may be specified as arguments.AbscontDistribution-class,
DiscreteDistribution-class,
RtoDPQplot(Norm())
plot(AbscontDistribution(r = rnorm))
plot(AbscontDistribution(d = dnorm))
plot(AbscontDistribution(p = pnorm))
plot(AbscontDistribution(q = qnorm))
plot(Ac <- AbscontDistribution(d = function(x, log = FALSE){
d <- exp(-abs(x^3))
## unstandardized!!
if(log) d <- log(d)
return(d)},
withStand = TRUE))Run the code above in your browser using DataLab