Description Usage Arguments Details Value Note Author(s) References See Also Examples
Compute z-score equivalents of t-distributed random deviates.
1 2 |
x |
numeric vector or matrix of values from a t-distribution. |
df |
degrees of freedom (>0) of the t-distribution. |
approx |
logical. If |
method |
character string specifying transformation to be used when |
z |
numeric vector or matrix of values from the standard normal distribution. |
zscoreT
transforms t-distributed values to standard normal.
Each value is converted to the equivalent quantile of the normal distribution so that
if z <- zscoreT(x, df=df)
then pnorm(z)
equals pt(x, df=df)
.
tZscore
is the inverse of zscoreT
and computes t-distribution equivalents of standard normal deviates.
If approx=FALSE
, the transformation is done by converting to log tail probabilities using pt
or pnorm
and then converting back to quantiles using qnorm
or qt
.
For numerical accuracy, the smaller of the two tail probabilities is used for each deviate.
If approx=TRUE
, then an approximate closed-form transformation is used to convert t-statistics to z-scores directly without computing tail probabilities.
The method
argument provides a choice of three transformations.
method="bailey"
is equation (5) of Bailey (1980) or equation (7) of Brophy (1987).
method="hill"
is from Hill (1970) as given by equation (5) of Brophy (1987).
method="wallace"
is from Wallace (1959) as given by equation equation (2) of Brophy (1987).
Bailey's transformation is a modification of Wallace's approximation.
The Hill approximation is generally the most accurate for df > 2 but is poor for df < 1.
Bailey's approximation is faster than Hill's and gives acceptable two-figure accuracy throughout.
Bailey's approximation also works for some extreme values, with very large x
or df
, for which Hill's approximation fails due to overflow.
Numeric vector or matrix of z-scores or t-distribution deviates.
The default approximation used when approx=TRUE
was changed from Hill to Bailey in limma version 3.41.13.
Gordon Smyth
Bailey, B. J. R. (1980). Accurate normalizing transformations of a Student's t variate. Journal of the Royal Statistical Society: Series C (Applied Statistics) 29(3), 304–306.
Hill, GW (1970). Algorithm 395: Student's t-distribution. Communications of the ACM 13, 617–620.
Brophy, AL (1987). Efficient estimation of probabilities in the t distribution. Behavior Research Methods 19, 462–466.
Wallace, D. L. (1959). Bounds on normal approximations to Student's and the chi-square distributions. The Annals of Mathematical Statistics, 30(4), 1121–1130.
zscoreNBinom
in the edgeR package.
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.