Dear forum members!
Me and my fellow student have just recently ventured into our first encounter with Stata. We are medicine students and currently writing our theseis. We are planning to use Stata as tool to analyze a dataset registered by our university hospital. We've never used stata before, nor has our uni. given any introduction - so please exuse us if our question is trivial or found easily elsewhere.
We need to create a variabel with "sex". To our understanding, the only way for us to do this is to use the personal id-numbers in our datatset, (as the last digit, even vs. odd indicates whether the subject is male or female). Is there a way for Stata to calculate this into a new variable??
Thanks in advance for any help that can help us solve this issue!
Regards
Mikael and Henrik
Me and my fellow student have just recently ventured into our first encounter with Stata. We are medicine students and currently writing our theseis. We are planning to use Stata as tool to analyze a dataset registered by our university hospital. We've never used stata before, nor has our uni. given any introduction - so please exuse us if our question is trivial or found easily elsewhere.
We need to create a variabel with "sex". To our understanding, the only way for us to do this is to use the personal id-numbers in our datatset, (as the last digit, even vs. odd indicates whether the subject is male or female). Is there a way for Stata to calculate this into a new variable??
Thanks in advance for any help that can help us solve this issue!
Regards
Mikael and Henrik
Comment