Hello community,

I'm trying to create a new variable "ER" (employment rate) from another variable LFACT (labor force activities) which has indicator values from 1 to 14. Values of 1 and 2 indicate "employed" and 3-14 indicate "unemployment" for various reasons.

The way I calculate the ER is: total frequencies of 1 and 2 appearing in LFACT divided by the total frequencies of 1 to 14 appearing in LFACT.

So, how to create a new variable that would list the total frequencies of only values 1 and 2 in LFACT? as well as a second new variable that lists the total frequencies of all values from 1 to 14... ?

Many thanks,
William