library("corrkit")
d <- simulate_cor_data(100)
partial_cor_test(d$IL6, d$fatigue, meth = "spearman")$estimate
[1] 0.5246237
$p.value
[1] 5.712139e-08
$n
[1] 94
$k
[1] 0
$ci_low
[1] 0.3550094
$ci_high
[1] 0.6607999
$engine
[1] "stats::cor.test"
$ci_engine
[1] "correlation::cor_to_ci"
partial_cor_test(d$NfL, d$cognition, Z = d[, c("age", "sex")], meth = "pearson")$estimate
[1] -0.04689676
$p.value
[1] 0.6571061
$n
[1] 94
$k
[1] 2
$ci_low
[1] -0.2493194
$ci_high
[1] 0.1594522
$engine
[1] "ppcor::pcor.test"
$ci_engine
[1] "correlation::cor_to_ci"