p_value {OneTwoSamples} | R Documentation |
Compute the P value
Description
Compute the P value of a cumulative distribution function (cdf).
Usage
p_value(cdf, x, paramet = numeric(0), side = 0)
Arguments
cdf |
The cumulative distribution function. For normal distribution, |
x |
A given value to compute the P value. |
paramet |
The parameter of the corresponding distribution. For normal distribution, |
side |
A parameter indicating whether to compute one sided or two sided P value. When inputting |
Value
The P value.
Author(s)
Ying-Ying Zhang (Robert) robertzhangyying@qq.com
References
Zhang, Y. Y., Wei, Y. (2013), One and two samples using only an R funtion, doi:10.2991/asshm-13.2013.29.
Examples
p_value(pnorm, x = 0, side = 1)
p_value(pt, x = 0, paramet = 5, side = 1)