This is a very helpful video to create a new variable by using "bysort" and "egen" command together in Stata. "bysort" command will sort your data, and "egen" command will create a new variable with your specified function, such as mean, median, sum, count, etc.
Please like the video, share it with your friends, and subscribe to our channel. Stay tuned!
28 мар 2021