Dear all

I am wanting to create an employment rate variable (ie. Number employed/ (Labour Force) * 100) from an employment rate binary variable (=1 if employed and 0 otherwise).
What i have done so far:

egen CountT = count(EMPL) if EMPL == 1
* CountT is total employed (strict)
egen countT = count(EMPL) if EMPL == 0
gen LabourForce = CountT + countT

gen EmplRate = 100 * (CountT / LabourForce)

However, stata does not like me adding the CountT and countT together like that - tabbing it doesn't present anything.

Furthermore, how do you create a cumulative variable for number of employed people. I want to create a cumulative variable from the EMPL binary variable when it = 1. This is so that i can use it as my dependent variable for an lpoly graph.
How do you do that?

Regards