Density, distribution function, quantile function
and random generation for the weighted t distribution with
df
degrees of freedom, non-centrality parameter
ncp
, steps steps
(or critical t-values
crit_t
), and weights omega
.
dwt(
x,
df,
ncp,
steps = if (!is.null(crit_t)) NULL,
omega,
crit_t = if (!is.null(steps)) NULL,
type = "two.sided",
log = FALSE
)pwt(
q,
df,
ncp,
steps = if (!is.null(crit_t)) NULL,
omega,
crit_t = if (!is.null(steps)) NULL,
type = "two.sided",
lower.tail = TRUE,
log.p = FALSE
)
qwt(
p,
df,
ncp,
steps = if (!is.null(crit_t)) NULL,
omega,
crit_t = if (!is.null(steps)) NULL,
type = "two.sided",
lower.tail = TRUE,
log.p = FALSE
)
rwt(
n,
df,
ncp,
steps = if (!is.null(crit_t)) NULL,
omega,
crit_t = if (!is.null(steps)) NULL,
type = "two.sided"
)
vector of quantiles.
degrees of freedom (> 0, maybe non-integer).
df = Inf
is allowed.
non-centrality parameter delta.
vector of steps for the weight function.
vector of weights defining the probability of observing a t-statistics between each of the two steps.
vector of t-values defining steps
(if steps
are not supplied).
type of weight function (defaults to "two.sided"
).
logical; if TRUE
, probabilities
p
are given as log(p)
.
logical; if TRUE
(default), probabilities
are \(P[X \le x]\), otherwise, \(P[X \ge x]\).
vector of probabilities.
number of observations. If length(n) > 1, the length is taken to be the number required.
The df
, ncp
, steps
, omega
can be
supplied as a vectors (df
, ncp
) or matrices (steps
,
omega
) with length / number of rows equal to x
/q
/
p
. Otherwise, they are recycled to the length of the result.
The functions quickly lose precision in the tails since they depend on
sums of distribution functions of t distibution
stats::pt
. In cases where the density of
t distribution cannot be computed by stats::dt
,
the implementation switches to DPQ::dnt
.