pvalt {datana} | R Documentation |
Obtain the P-value for a Standard t-distributed random variable
Description
Function to compute the P-value for a Standard t-distributed random variable.
Usage
pvalt(t.value, df, decnum = 5)
Arguments
t.value |
A numeric random variable following a t-student pdf distribution. |
df |
degrees of freedom of the random variable following a t-student pdf distribution. |
decnum |
the number of decimals to be used in the output. The default is set to 5. |
Details
It is suited to compute the P-value for any random variable following a Standard t probability density function. For instance, to obtain the p-value in a t-test.
Value
The function returns the P-value or probability of getting a value as large as t.value.
Author(s)
Christian Salas-Eljatib
Examples
## Load dataset
df <- datana::araucaria
#
## Computes the t-test statistics (from the 'stats' package)
t.value <- stats::t.test(df$hdom)
t.v <- as.numeric(t.value$statistic)
deg.f <- as.numeric(t.value$parameter)
## Obtaining the p value
pvalt(t.v,deg.f)
[Package datana version 1.0.5 Index]