Stata Bysort. Let s illustrate use of the process using the high school and beyond dataset. If there are 2 variables var1 and var2 after sort stata will sort the observations according to var1 first.
Gender male regression with robust standard errors number of obs 559 f 1 557. N denotes the total number of rows. To illustrate let s use stocks dta.
Reg depvar indvar example.
Gender male regression with robust standard errors number of obs 559 f 1 557. This portfolio contains 32 observations. N denotes the total number of rows. By requires that the data is sorted by the variable in question and cannot be abbreviated bysort sorts the data for you and may be abbreviated bys.