## Aggregate Data by Group using Collapse command in Stata

The 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. To understand how a variable can be aggregated, let’s start by loading Stata’s built-in NLSW (1988) dataset. sysuse nlsw88, clear We will also drop some …

Aggregate Data by Group using Collapse command in Stata Read More »