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
WHEN to delete missing/negative values?Hello, I was wondering when it is best to clean the data (i.e. delete missing or negative values) w…
Dropping stocks below 5th percentileDear Statalists, I would like to drop the stocks whose market value (MV) is below 5th percentile of…
how to generate sequence integer starting from 0 (by group)Hi, I have a panel data set and try to generate sequence numbers by group but the numbers starting f…
How can i convert a *.dsv file into a *.dta file?Hi I would like to work with a dataset of the recent president's election in Argentina. But I could…
Using contrast post logistic to assess linear trend - response to a reviewerHello I am assessing the relationship between a binary outcome variable and a 4-category variable (…
Subscribe to:
Post Comments (Atom)
0 Response to assigning values group-wise
Post a Comment