I understand this is a simple question. I am trying to calculate average age on the basis of Country and gender. When i run this command it creates another variable in the variable list with name avg_age
egen avg_age = mean(Age), by(Country gender)
Can someone guide how can I get it in a table form
Country Gender Avg_age
Kor Male 70
Kor Female 80
etc
egen avg_age = mean(Age), by(Country gender)
Can someone guide how can I get it in a table form
Country Gender Avg_age
Kor Male 70
Kor Female 80
etc
Comment