These functions are used internally by qqplot of package distr.
.inGaps(x,gapm)
.isReplicated(x, tol = .Machine$double.eps)
.NotInSupport(x,D)
.SingleDiscrete(x,D)
.makeLenAndOrder(x,ord).BinomCI.in(t,p.bi,x.i, del.i=0,D.i,n.i,alpha.i)
.BinomCI(x,p.b,D,n,alpha, silent0 = TRUE)
.BinomCI.nosym(x,p.b,D,n,alpha, silent0 = TRUE)
.q2kolmogorov(alpha,n,exact=(n<100), silent0="TRUE)" .q2pw(x,p.b,d,n,alpha,exact="(n<100),nosym=FALSE,">
.confqq(x,D, datax=FALSE, withConf.pw = TRUE, withConf.sim = TRUE, alpha,
col.pCI, lty.pCI, lwd.pCI, pch.pCI, cex.pCI,
col.sCI, lty.sCI, lwd.sCI, pch.sCI, cex.sCI,
n,exact.sCI=(n<100),exact.pci=(n<100), nosym.pci="FALSE," with.legend="TRUE," legend.bg="white" ,="" legend.pos="topleft" legend.cex="0.8," legend.pref="" legend.postf="" legend.alpha="alpha," qqb0="NULL," transf0="NULL," debug="FALSE)
.deleteItemsMCL(mcl)
.distrExInstalled
100),exact.pci=(n<100),>100),>
a logical vector of same length as x
.
a logical vector of same length as x
.
a logical vector of same length as x
.
a vector of same length as x
with entries in the
set \(\{0,1,2,3,4\}\).
a numeric of length length(ord
.
a numeric of length 1: the discrepancy $$P(\sqrt{n} |X-x-\delta| \leq t) - \alpha$$
a numeric matrix with two columns "left"
and "right"
with the corresponding pointwise confidence widths.
a numeric matrix with two columns "left"
and "right"
with the corresponding pointwise confidence widths.
a numeric of length 1; a corresponding quantile of the (exact/asymptotic) Kolmogorov distribution
a numeric matrix with two columns "left"
and "right"
with the corresponding pointwise confidence widths.
invisible(NULL)
the manipulated list of arguments
a (numeric) vector
matrix; the gap matrix as in slot gaps
of
an "AbscontDistribution"
or "UnivarLebDecDistribution"
object.
numeric; tolerance for separating points.
object of class "UnivariateDistribution"
logical; (to be used in distrMod) shall data be plotted on x-axis?
integer; the result of a call to order
numeric in [0,1]; confidence level
integer; sample size
logical; shall finite sample version be used?
current (half of the) width of the confidence interval.
(local) (binomial) c.d.f. value at x.i
.
a (numeric) vector
numeric; a (local) asymmetry parameter to pass on to
optim
and uniroot
--- the endpoints of the searched interval
are x.i+t/sqrt(n)+del.i/sqrt(n)
and x.i-t/sqrt(n)+del.i/sqrt(n)
.
object of class "UnivariateDistribution"
integer; (local) sample size
numeric in [0,1]; (local) confidence level
(binomial) c.d.f. value at x
.
logical; shall we compute shortest (asymmetric) confidence intervals;
logical; shall pointwise confidence lines be plotted?
logical; shall simultaneous confidence lines be plotted?
logical; shall pointwise CIs be determined with exact Binomial distribution?
logical; shall simultaneous CIs be determined with exact kolmogorov distribution?
logical; shall we use (shortest) asymmetric CIs?
color for the pointwise CI
line type for the pointwise CI
line width for the pointwise CI
symbol for points (for discrete mass points) in pointwise CI
magnification factor for points (for discrete mass points) in pointwise CI
color for the simultaneous CI
line type for the simultaneous CI
line width for the simultaneous CI
symbol for points (for discrete mass points) in simultaneous CI
magnification factor for points (for discrete mass points) in simultaneous CI
logical; shall a legend be plotted?
background color for the legend
position for the legend
magnification factor for the legend
character to be prepended to legend text
character to be appended to legend text
nominal coverage probability
arguments in call as a list
precomputed return value of qqbounds
optional transformation of x-values (by default NULL
and then ignored)
logical; if TRUE
additional output to debug confidence bounds.
logical; it is used as argument silent
in try
-catches
within this function.
Peter Ruckdeschel peter.ruckdeschel@uni-oldenburg.de,
.inGaps
produces a logical vector of same length as x
with
entries TRUE
if the corresponding component of x
lies within a
gap as given by gap matrix gapm
and FALSE
otherwise.
.isReplicated
produces a logical vector of same length as x
with
entries TRUE
if the corresponding component of x
appears at least
twice within x
and FALSE
otherwise.
.NotInSupport
produces a logical vector of same length as x
with
entries TRUE
if the corresponding component of x
does not
lie within the support of D
and FALSE
otherwise.
.SingleDiscrete
produces a numerical vector of same length as x
with
values 0
if the corresponding component of x
is discrete mass point
of D
, 1
if the corresponding component of x
lies within
the continuous support of D
, 2
and 3
if the corresponding component of x
is a left resp. right end point of a gap of D
, and 4
if
the corresponding component of x
does not lie within the support of D
at all.
.makeLenAndOrder
by standard recycling roules respectively by truncation
at the end, forces x
to length length{ord}
and then orders the
result according to ord
.
.q2kolmogorov
, in the finite sample version (exact==TRUE
),
returns the corresponding alpha
-quantile
of the exact Kolmogorov distribution multiplied by \(\sqrt{n}\), and
in the asymptotic version (exact==FALSE
),
the the corresponding (upper) alpha
-quantile
of the asymptotic Kolmogorov distribution. Doing so we make use of
C-function "pkolmogorov2x"
(from ks.test
in package stats)
and R-function pkstwo
(again from ks.test
in package stats).
.BinomCI.in
in a non-vectorized form, computes,
for given t
, x
, \(\alpha\), \(\delta\),
and for \(X\sim D\), the discrepancy
$$P(\sqrt{n} |X-x-\delta| \leq t) - \alpha$$
.BinomCI
, in a vectorized form, computes,
for given x
, \(\alpha\), \(\delta\),
values t
such that,
pointwise in x
and for \(X\sim D\),
$$P(\sqrt{n} |X-x-\delta| \leq t) = \alpha$$
.BinomCI.nosym
, in an outer loop, by varying del
in the former
formula, tries to minimize the length of
a corresponding level alpha confidence interval containing the estimate.
.q2pw
computes pointwise finite sample or asymptotic confidence widths
by means of binomial probabilities / quantiles, in the former case either
symmetric (default) or shortest asymmetric; in the asymptotic case, for
distributions without a Lebesgue density, for the corresponding
density value at the quantile appearing in the expression for the
asymptotic variance, we make an approximation of (D-E(D))/sd(D)
by
the standard normal, using the density of the latter one; this latter approximation
is only available if .distrExInstalled == TRUE
; otherwise the corresponding
columns will be filled with NA
.
.confqq
calls qqbound
to compute the confidence intervals
and plots them; returns the return value of qqbound.
.deleteItemsMCL
deletes arguments from a call list which
functions like plot
, lines
, points
cannot digest;
this is necessary in the manipulation of an original call
to a specific qqplot
method to pass on the ...
argument
correctly to calls the mentioned functions.
.distrExInstalled
is a constant logical --- TRUE
if package
distrEx is installed.
ks.test
, qqplot
, qqplot
, qqplot