# outreg2

## Rolling Beta and rolling mean, median in Stata

In this article, we will learn about calculating descriptive statistics (rolling mean, median, standard deviation etc. in Stata) and rolling beta using a command called rangestat. If you have not installed this command, you can install it by using the following command in Stata: Download Example File ssc install rangestat You can check all its …

## Use of Compare command in Stata to compare variables

Oftentimes, we need to compare variables with each other in Stata. Stata’s compare command in Stata allows simple comparisons between variables to be made, which will be discussed further in this article. Download Example File The general syntax for this command is: compare variable1 variable2 [if] [in] After writing the command, the two variables to …

## Use of System Variables, difference between _n and _N in Stata

While a data set is generated or imported, it contains many variables and have their specific name that are set by the creator of that data set and may vary depending on type of research which one is going to be performed, such variables are called research or data set variables. These variables are used …

## Regression Assumptions in Stata for Beginners

Whenever we run OLS regressions, there are a few basic assumptions that are made with regard to our data so that correct inferences and predictions can be made. To learn the basics of regression assumption, please refer to an introductory textbook on econometrics. The four regression assumptions that we will discuss in this article are …

## 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. Download Example File sysuse nlsw88, clear We will …