I presume you've discussed this elsewhere. Whilst all the universities mentioned are excellent, they're very different types of institutions. Edinburgh and ucl are extremely large urban universities with student numbers well in excess of 40k. St Andrews on the other hand is much smaller (around 10k students of which over 2k are postgraduates). And unlike the other 2, it doesn't cater for professional courses such as law, accounting , engineering, architecture etc. As far as I know in general it also offers smaller group teaching in terms of tutorials and seminars.
For econs, the quality of students are extremely high with entry tariffs (A levels, IB, highers etc) exceeding virtually all other universities, and it doesn't do badly in the UK rankings either! You may have heard the use of the term "target" or "semi target". This can be misleading bec all the leading investment banks/financial institutions recruit from St andrews. While it might not have in absolute numbers as many going into those industries, it does as well as any university in proportional terms. That's because there are considerably fewer graduates in economics from St Andrews compared to those universities. Hop this helps