Dear community,
I have a data set enlisting all previous/current occupations of executives (with start and end dates) which further specifies whether this position was at a quoted company or governmental. If sorted by directorid, you have all his/her previous/current positions grouped together. I now want to check whether his governmental career preceeded his company-career. So far I have generated two variables: gen min_gov = min(start) if companytype=="government" and gen min_quoted = min(start) if companytype=="quoted") and would like to assign these value to the WHOLE group and not just to thie specific row. Is there a way to do this?
Thanks in advance!
Marie
Related Posts with assigning values group-wise
change in volume between the same months in different yearsI have a hospital dataset declared as a time series with panel data with monthly observations. Volum…
Replacing observations appearing multiple times on the same variable on the same participant. Longitudinal study.Hi again. I have a new problem, and I'll try to explain it the best can. First, som background info…
Wooldrige Test for serial correlation.Hello guys! I was running the Wooldrige Test for serial correlation of the error terms and the H0 is…
Graph with varying scales using by() optionI have data on emissions changes across states over time. The emissions are normalized as a percent …
Quickly merging chunks of variables within the same datasetHello, I have a dataset with different groups of variables that actually represent the same questio…
Subscribe to:
Post Comments (Atom)
0 Response to assigning values group-wise
Post a Comment