# stata

## 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 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 …

## Using the Encode Command In Stata to Convert String Variable

Often times, we have to work with categorical variables when doing statistical analysis. Categorical variables are those variables that have two or more categories or groups. For example, a variable representing sectors in a stock market could have categories like tech, automobiles, pharmaceuticals, cement, banks etc. These categories of string type may also be needed …

## Combine multiple graphs in Stata

In Stata, you can make graphs and edit them as per the requirements of data. Apart from creating graphs, you can also combine multiple graphs using the different techniques. To visualize this, import a data set using the following command: use “combine graphs.dta”,clear For combining multiple graphs, the imported data can be used for the …