pDtrend {skedastic} | R Documentation |
Cumulative distribution function of nonparametric trend statistic D
Description
This function computes \Pr(D \le k)
(\Pr(D \ge k)
), i.e.
lower (upper) cumulative probabilities for
D=\sum_{i=1}^{n} (R_i - i)^2
, the nonparametric trend statistic
proposed by Lehmann (1975), under the assumption
that the ranks R_i
are computed on a series of n
independent and
identically distributed random variables with no ties. The function may be
used to compute one-sided p
-values for the nonparametric test for
heteroskedasticity of Horn (1981). Computation
time is extremely slow for n > 10
if usedata
is set to
FALSE
; thus a normal approximation is implemented, including a
continuity correction.
Usage
pDtrend(
k,
n,
lower.tail = TRUE,
exact = (n <= 10),
tiefreq = NA,
override = FALSE
)
Arguments
k |
An integer of |
n |
A positive integer representing the number of observations in the series. |
lower.tail |
A logical. Should lower tailed cumulative probability be
calculated? Defaults to |
exact |
A logical. Should exact distribution of |
tiefreq |
A double vector corresponding to the value of |
override |
A logical. By default, the |
Value
A double between 0 and 1 representing the probability/ies of D
taking on at least (at most) the value(s) in the names
attribute.
References
Horn P (1981).
“Heteroscedasticity of Residuals: A Non-Parametric Alternative to the Goldfeld-Quandt Peak Test.”
Communications in Statistics - Theory and Methods, 10(8), 795–808.
Lehmann EL (1975).
Nonparametrics: Statistical Methods Based on Ranks.
Holden-Day, San Francisco.
See Also
Examples
# For an independent sample of size 6, the probability that D is <= 50 is
# 0.8222
pDtrend(k = 50, n = 6)
# Normal approximation of the above with continuity correction is
# 0.8145
pDtrend(k = 50, n = 6, exact = FALSE)