Hello there,
I am currently working with a panel dataset, and am having trouble with an issue I hope some of you will have an asnwer to.
First of all, my id variable is called pidp and my time variable is wave. I have data for 27 years (The wave variable goes from wave = 1 to wave = 27).
I am working with a further variable, fimnlabgrs_dv, which expresses each individual's labour income.
Also, I have another variable, called yrbracket, which expresses many age brackets. It basically tells us if the individual is of age under 16, between 16 and 24, between 25 and 34, between 35 and 49, between 50 and 64 or if the person is 65 or older.
I am interested in the yearly average labour income for every yrbracket category; that is, I want to work with the yearly average labour income for people between 16 and 24 years of age; the yearly average labour income for people between 25 and 44 years of age and so on.
What I'm looking to do is to have a variable which expresses the average labour income for every category, for every year. That is, I want a variable with 27 observations, where every observation expresses the yearly average labour income for a specific category and a specific year (the observations need to be 27 as I have data for 27 years). Of course, this means that there will be as many new variables as there are yrbracket categories, which therefore means 6 variables.In this way, I will then be able to plot these new variables and compared them overtime.
Please do let me know if something was not clear in the description of my problem.
Thank you in advance
Related Posts with Panel data: generate yearly average variable
inquire data problems: gen weekI have a large data set which contains from Oct 2002 to Feb 2007. The procedure is: From Oct 19, 200…
Replacing column values with values of another variable by household idHi everyone, I have 5 variables in my dataset namely, household id, wealth rank, and household ids …
Herfindahl-Hirschman IndexHello all, I am working on a panel data of 200 firms from 1995-2019. Data is for a single industry. …
Exporter_Time_FE, Importer_Time_FE and Pair_FEDear, Prof.Joao, Prof. Tom, Dr. Sergio Correia & Others Stata Users, I am an economics graduate…
Align rows based on common groupDear Statalist I have a starting dataset that looks like the following Code: * Example generated b…
Subscribe to:
Post Comments (Atom)
0 Response to Panel data: generate yearly average variable
Post a Comment