pvalt | R Documentation |
Function to compute the P-value for a Standard t-distributed random variable.
pvalt(t.value, df, decnum = 14)
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. |
It is suited to compute the P-value for any random variable following a Standard t probability density function (pdf). For instance, to obtain the p-value in a t-test.
The function returns the P-value or probability of getting a value as large as t.value.
Christian Salas-Eljatib
# Load dataset
df <- datana::fertiliza2
head(df)
## Computes the t-test statistics (from the 'stats' package)
t.value <- stats::t.test(df$vol)
t.value
t.v <- as.numeric(t.value$statistic);t.v
deg.f <- as.numeric(t.value$parameter);deg.f
## Obtaining the p ## pvalt(t.v,deg.f)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.