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
Related Posts with How to create a new variable that contains the total frequencies of only specific values of another variable?
Tag observations occuring within a time frameHi, I'm working with diagnostic labdata and I'd like to count how many times a person has been test…
Update to heatplot available from SSCA bugfix for heatplot is now available from the SSC Archive. Binning of x and y was erroneous at the…
Is there a way to get overall effects for a KHB decomposition when I have a categorical key variable?Dear all, I am currently running a KHB mediation analysis with a continuous DV (cognitive developmen…
Heterogenous Treatment EffectsHello, I have a question regarding heterogenous treatment effects. First I have estimated the propen…
Creating a study site map in stataHello Statalisters, I would like to find out if it is possible to generate a country map showing a …
Subscribe to:
Post Comments (Atom)
0 Response to How to create a new variable that contains the total frequencies of only specific values of another variable?
Post a Comment