Hi, I'm a long time python programmer, and I'm taking a course in econometrics and getting my first exposure to Stata.

I do see the amazing power of Stata, but also a lot of strange stuff that should be simpler.

python:

Xbar = mean(sum(Y))


Stata:

quietly sum X, meanonly
return list
local Xbar = `r(mean)'


Perhaps I'm not searching or reading the documentation properly? Or does this have an internal logic that will soon make sense?

Thanks!