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?
Difference in differences and the bi-directional modelDear researchers, I have two questions, please. I have unbalanced panel data for a set of firms. I…
How to select the best functional form for a gravity model using panel data with non-stationary observationsI am trying to measure the impact of Geographical Indications in international trade with a gravity …
Predicting residuals by industry and yearHi, I am running the following model bys industry year: reg y x predict e, residuals Here, if I …
Heat Plot Code: * Example generated by -dataex-. To install: ssc install dataex clear input str10 CODICE byte…
issues with nested logitDear forum, I'm an economics PhD student playing around with the new Discrete Choice features in St…
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