In my opinion, the opportunity cost of RA (pecuniary) is the salary difference between your RA pay and your pay 5-6 years later as a PhD from a top 20 department. It will be roughly 100k, not that much if you discount it to present value.
But there are some definite benefits of RA at a Fed. First, your result cannot and should not get worse, given you do not screw up your last semester. In two years' time, the application is unlikely to get more competitive than this year and schools should be more well-endowed. But of course it is still unpredictable. Second, you get to work closely with economists (even well-known ones, if you are lucky) and your recommendation will be glowing in two years. That is the biggest factor in application as we all agree. Third, most Feds reimburse you for tuition for you to take grad level econ or undergrad level math classes to make up for course deficiency. That is the second biggest factor in application. Fourth, some capital accumulation is probably useful and you can even apply in two years' time without asking for first year funding. That again might improve your result. Fifth, you will become much more familiar with academic research as well as the tools and methods, which will help in grad school. Sixth, there is always the non-zero chance that you figure out you just hate research during the job. The exit strategy after Fed is pretty good and you won't get stuck doing something you don't like for the rest of your life. Seventh, you are asking this question because you want a better offer, which means you will be motivated and goal-oriented during the job. It is not very difficult for someone like you to co-author with your economist at the Fed and publish before you apply again.
Sorry for the rant. As you can see I am all for the RA experience (with profs at big schools is the best, but Fed comes very close too). In fact I was going to turn down a top 10 offer for a Fed RA opportunity (For me, the research at the Fed matches my interests exactly too).