Density, distribution function, quantile function
and random generation for the weighted normal distribution with
mean
, standard deviation sd
, steps steps
(or critical values) crit_x
), and weights omega
.
dwnorm(
x,
mean,
sd,
steps = if (!is.null(crit_x)) NULL,
omega,
crit_x = if (!is.null(steps)) NULL,
type = "two.sided",
log = FALSE
)pwnorm(
q,
mean,
sd,
steps = if (!is.null(crit_x)) NULL,
omega,
crit_x = if (!is.null(steps)) NULL,
type = "two.sided",
lower.tail = TRUE,
log.p = FALSE
)
qwnorm(
p,
mean,
sd,
steps = if (!is.null(crit_x)) NULL,
omega,
crit_x = if (!is.null(steps)) NULL,
type = "two.sided",
lower.tail = TRUE,
log.p = FALSE
)
rwnorm(
n,
mean,
sd,
steps = if (!is.null(crit_x)) NULL,
omega,
crit_x = if (!is.null(steps)) NULL,
type = "two.sided"
)
dwnorm
gives the density, dwnorm
gives the
distribution function, qwnorm
gives the quantile function,
and rwnorm
generates random deviates.
vector of quantiles.
mean
standard deviation.
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 critical 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 mean
, sd
, steps
, omega
can be
supplied as a vectors (mean
, sd
) or matrices (steps
,
omega
) with length / number of rows equal to x
/q
/
p
. Otherwise, they are recycled to the length of the result.