I have used SPSS in the past, and new to STATA . No statistical background per se, but a social researcher.
Need some help on how to create a new variable that calculates automatically the sum of several variables put together.
i have asked interviewees which month of the year they worked in the field - so, in Stata; for each month ( january to December), i have a variable - and 0 for not worked , 1 for worked.
I want now to calculate how many months in the year they worked, which logically should be the sum of all months put together. so sum ( var1+var2+...)
However , when computing this command, i obtain results that dont look like what i expected.
Any advice on how to do this ( in lay language please)?
Thanks
Need some help on how to create a new variable that calculates automatically the sum of several variables put together.
i have asked interviewees which month of the year they worked in the field - so, in Stata; for each month ( january to December), i have a variable - and 0 for not worked , 1 for worked.
I want now to calculate how many months in the year they worked, which logically should be the sum of all months put together. so sum ( var1+var2+...)
However , when computing this command, i obtain results that dont look like what i expected.
Any advice on how to do this ( in lay language please)?
Thanks
Comment