Hi, folks,
The manager asked me to compute mean values across groups using a longitudinal dataset. For illustrative purposes, I used a real dataset available online, as shown below:
use https://www.stata-press.com/data/r18/nlswork.dta, clear
The solution provided by the manager was table collgrad, stat(mean hours).
I believe this approach is neither correct nor appropriate because the hours variable is time-varying.
What would be the correct Stata code for this task?
Thank you!
The manager asked me to compute mean values across groups using a longitudinal dataset. For illustrative purposes, I used a real dataset available online, as shown below:
use https://www.stata-press.com/data/r18/nlswork.dta, clear
The solution provided by the manager was table collgrad, stat(mean hours).
I believe this approach is neither correct nor appropriate because the hours variable is time-varying.
What would be the correct Stata code for this task?
Thank you!
Comment