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?
Effect size logit regression with sqaure terms and interactionsDear STATA users, I am running a model with a logit regression (binary DV), in which I include my I…
Propensity matchingHello, I am new to stata and getting this error while running propensity matching. . quietly dr DI…
creating a variable from frequencies and percent from tab commandDear statalist Members, other than using contract, is there a way i can create a variable from the …
Estout - Showing Two Coefficients in PercentageHi Everyone, I am running following code: xtset id month eststo:xtreg rateofreturn_excess mkt_rf …
numbered listIs there a command to create a numbered list, e.g., from 1804 to 2018. …
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