Array
Good morning Stata Family,
Please I want to create a new variable for the average wage earned by each worker for B and C shifts alone (as seen in the image above).
The code that I know: egen avgwage = mean(wage), by workerid gives me the average wage using all the shifts. I just want to find the average for just the B & C shifts, which I intend to use as a control for my analysis.
Any guidance you can provide will be most appreciated.
Thank you!
Related Posts with Need help with Mean for Grouped Data
Dynamic panel approach for large THello everybody, I have data for a small number of countries (12) and a large number of observation…
how to compare the trend of risk ratios across age groups, between cases and controlsHi, I used binomial regression to calculate the risk ratio of outcomes (e.g. diabetes, renal failur…
Panel data - first differences modelI am using panel data (world bank's world development indicators). Need to create a first difference…
Internal choiceDear all, Please help me with this issue. My data is as follows. Respondents were asked 5 times. I a…
Can't import 2011 India district shapefileWe need a 2011 India district shapefile (N=640 districts). I found a handful around the web (e.g., S…
Subscribe to:
Post Comments (Atom)
0 Response to Need help with Mean for Grouped Data
Post a Comment