Learn R Programming

RoBMA (version 1.2.0)

weightedt: Weighted t distribution

Description

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.

Usage

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" )

Arguments

x, q

vector of quantiles.

df

degrees of freedom (> 0, maybe non-integer). df = Inf is allowed.

ncp

non-centrality parameter delta.

steps

vector of steps for the weight function.

omega

vector of weights defining the probability of observing a t-statistics between each of the two steps.

crit_t

vector of t-values defining steps (if steps are not supplied).

type

type of weight function (defaults to "two.sided").

log, log.p

logical; if TRUE, probabilities p are given as log(p).

lower.tail

logical; if TRUE (default), probabilities are \(P[X \le x]\), otherwise, \(P[X \ge x]\).

p

vector of probabilities.

n

number of observations. If length(n) > 1, the length is taken to be the number required.

Details

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.

See Also

Normal, dnt