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
Publishing Regression Coefficients and Elasticity in the same reportHi Statalisters! Beginner here. I ran several regular (OLS) regressions and calculated the elastici…
not append nor merge worked, please help mehello , I have two data set and just one variable which is the code of the country is the same. when…
Item Exploratory Factor Analysis - results changing when code is rerunI have a sample of N = 401 individuals who completed a self-report measure on mobile-use dependency.…
Difference - regex vs strpos?I am trying to do a mortality search for a specific disease (X), in a national database. what is the…
How to create a new variable that identifies all possible combination of valid choicesI have a dataset with data on exam results for students. There are 20+ subjects, of which a student …
Subscribe to:
Post Comments (Atom)
0 Response to assigning values group-wise
Post a Comment