This function returns the difference between the lower tail probability of a non-central t-distribution and a confidence level q where the t-distribution has df degrees of freedom and non-centrality parameter delta.
tRoot(delta, test_stat, df, conf_level)
Non-centrality parameter
Test statistic at which to evaluate the t-distribution
Degrees of freedom
Confidence level (usually alpha/2 or 1-alpha/2)
dif Difference between t-distribution quantile and confidence level