This seems to be a rather simple problem, but I just can't think of a
way for it to work.
How can I make observations in a variable take on the value of a
specific observation within this variable? For example, I have employees
by industry in each county in each state for several years. I want to
create a variable that is equal to employees in industry = x for each
county and state by year for all observations. If I type gen test=
employees if industry ==x, I only get one observation each year, by
county and state, but I want the rest of the (now missing) obesrvations
in variable 'test' (which in the original variable 'employees' take on
the values by different industries) to take on the value of industry x.
So in the end all observations for the variable 'test' would take on
the value of industry x.by county state and year.
If this turns out to be really simple my only defense is that it is late.