Hi,
I am trying to recreate the table below:
Array
I have created the mean education for period by sex using the command:
"bysort period1 region : egen bam = mean f_yschool"
where period1 is the periods I am using in my study. What I essentially want to run is "bysort year region: gen relative_mschool= (mean_regionalmaleschooling)/(mean_regionalmaleschooling if r_code=2"
as r_code==2 is the region with the highest years of schooling. How do I divide the mean year of schooling per region per period by another value (region mean) from the same period in the variable?
It's a similar problem to this: https://www.stata.com/statalist/arch.../msg00492.html
Many thanks in advance.
Related Posts with Panel Data Manipulation: Divide All By Group of Data
combining multiple excel file with multiples excel sheetsHi, I'm now trying to combine multiples excel sheets from multiple excel files. I want to get one ex…
Organising 4 Groups of Count Data into 2 CategoriesI was hoping to have a bit of assistance in the formatting of a bar chart. I’ve created the followi…
Using local in CDHi, i want to use a local in a CD, is it possible? I would like something like this : Code: local …
tableHi, I want to make a table. I have a dataset containing sum of sales on different locations in diffe…
Loop function to order multiple variables togetherHello I urgently need help with the loop function in STATA to order multiple variables together. I…
Subscribe to:
Post Comments (Atom)
0 Response to Panel Data Manipulation: Divide All By Group of Data
Post a Comment