  We develop generalized approach to obtaining Edgeworth expansions for
$t$-statistics of an arbitrary order using computer algebra and combinatorial
algorithms. To incorporate various versions of mean-based statistics, we
introduce Adjusted Edgeworth expansions that allow polynomials in the terms to
depend on a sample size in a specific way and prove their validity. Provided
results up to 5th order include one and two-sample ordinary $t$-statistics with
biased and unbiased variance estimators, Welch $t$-test, and moderated
$t$-statistics based on empirical Bayes method, as well as general results for
any statistic with available moments of the sampling distribution. These
results are included in a software package that aims to reach a broad community
of researchers and serve to improve inference in a wide variety of analytical
procedures; practical considerations of using such expansions are discussed.
