hi, I am new to use STATA and I am seeing this forum a lot to learn the things so I am thankful to all the users here.
and that's how and why I came to ask a question here.
I am using panal data, and the time variable is 'year' from 1995-2014.
and there is a variable, 'when you started this job' it is year/month (like 2008m3). and when I take a look at it, the variable type is 'int'
and I wanna keep this variable just with years, so that I can count the 'lenghs of service'
(for example, if one panel started to work at '1992m5', I wanna make a new variable 'lenghs of service' that is 4-24.
so I tried like 'generate LS = year-when you started this job+1, but it isn't working.
so, I think I should keep that 'year/month' variable as just the number of years.
I would be so thankful so get some helps or advices, thanks in advance.
and that's how and why I came to ask a question here.
I am using panal data, and the time variable is 'year' from 1995-2014.
and there is a variable, 'when you started this job' it is year/month (like 2008m3). and when I take a look at it, the variable type is 'int'
and I wanna keep this variable just with years, so that I can count the 'lenghs of service'
(for example, if one panel started to work at '1992m5', I wanna make a new variable 'lenghs of service' that is 4-24.
so I tried like 'generate LS = year-when you started this job+1, but it isn't working.
so, I think I should keep that 'year/month' variable as just the number of years.
I would be so thankful so get some helps or advices, thanks in advance.
Comment