To launch screen, just run
screen
Then run all of your commands like stata -b do filename
. When you want to "minimize" the terminal, just press Ctrl+A followed by the D key.
You can then safely log out of ssh without killing the precess that you ran.