[Stata] Collapse command for aggregating data per variable …
https://nariyoo.com/stata-collapse-command-for-aggregating-data-per-variable-mean-median-sd-and-count/
WEBThe collapse command in Stata is used to aggregate a dataset by collapsing it based on some summary statistics of a variable like mean, sum, median, percentile, standard error, etc. The collapse command has the following syntax: Stata. collapse (stat) newvar=oldvar (stat) newvar=oldvar ... , by(varlist) options.
DA: 81 PA: 41 MOZ Rank: 54