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
Impulse response functions when the system has equations with lag and contemporeneous relationsHi I have a system as following: A(t)= A(t-1) + B(t-1) + C(t-1) + error(t) B(t)= A(t-1) + B(t-1) + …
Use for loop to generate growth rate and extrapolate dataI have a dataset of the following sort: Code: * Example generated by -dataex-. To install: ssc in…
Help with spmap legend optionHi, Im currently working on a map of Colombia with Stata 14 and spmap (Maurizio Pisati) based on th…
Survival analysis with lagged variableHi all, I am here to ask for your suggestions on how to run survival analysis with lagged variable.…
Creating a graph using xtline without connecting the data points. Shading some areas of the graphHello, I am trying to create a graph using the command xtline. The graph contains a line for the va…
Subscribe to:
Post Comments (Atom)
0 Response to Panel Data Manipulation: Divide All By Group of Data
Post a Comment