If I first do a two sided test (≠) and then do two one sided tests with different direction, should not the union of the found variables for the one sided tests be equal to the one from the two sided test?

Answer

That will not be the case and the reason is best explained with an example. In this case for tests with a significance level of 0.05, but the level could of course be different.

For a two-sided t-test (obtained with the ≠ option), a variable obtains a p-value less than 0.05 if its t-statistic is in the top 2.5% or in the bottom 2.5% of the null distribution for the t-statistic. For a one-sided test with the ">" direction, a p-value less than 0.05 results if the t-statistic is in the top 5% of the null distribution. Similarly, for a one-sided test with the "<" direction, a p-value less than 0.05 results if the t-statistic is in the bottom 5% of the null distribution.