Calculates the p-value for a given coefficient of correlation between two variables, using the t-statistic (student-t distribution).
pval_corr(r, n, side = c("two", "one"))
r | The coefficient of correlation to test |
---|---|
n | Sample size from the sample |
side | To either get a two-tail or one-tail p-value (Default is "two") |
P-value
r <- 0.597 n <- 10 pval_corr(r, n)#> [1] 0.0684