3SLS Analysis


In this section, you will learn to perform 3SLS analysis in STATA. We will explain in detail about them in the following steps:


Step 1: Upload the MS-Excel datasheet in STATA


Let us assume, the name of the MS-Excel datasheet is "Panel-Data-Representation.xlsx" and it is located in the path "D:\data\". Then the data upload command in STATA is given by:

import excel "D:\data\Panel-Data-Representation.xlsx", sheet("DATA") firstrow

Now click ENTER. Your data is uploaded in STATA.



Step 2: Define the data as panel data in STATA

Once the data is uploaded in STATA, we need to define the data to be panel data. For that purpose, we need to declare the cross-section and time-series ids in the data. Then the data declaration command in STATA is given by:

xtset CODE YEAR

Once you click ENTER, you will get the following:

panel variable: CODE (strongly balanced)
time variable: YEAR, 2001 to 2013
delta: 1 unit


Now your data is declared in STATA.



Step 3: Run the 3SLS estimation in STATA


Once the data is declared in STATA, you can run the 3SLS estimation. The basic command for running a 3SLS estimation in STATA is reg3. In the dataset, there are five variables (POP, EC, PT, Y, and N).

Now, let us assume, we will estimate the following three equations simultaneously:

Y = a0 + a1 EC + a2 PT + e1
EC = a3 + a4 Y + a5 POP + e2
N = a6 + a7 PT + a8 Y + e3

Now, in this set of three equations, Y, EC and N are endogenous variables, and PT and POP are exogenous variables. For estimating this particular system of equations, the command in STATA is given by:

reg3 (Y EC PT) (EC Y POP) (N PT Y)

Once you click ENTER, you will get the following:



Now, there are several things to observe in the results. First, please notice the first segment of the results. Three
equations are identified by the dependent variables. Please note the R-sq and the corresponding p-value for each equation. It is clear that all the three equations are significant at 1% level. Second, look at the individual equation in the next segment of the results. All the coefficients of the explanatory variables are statistically significant (look at the P>|z| value). Lastly, look at the last segment of the result. The exogenous and endogenous variables are shown, and they are exactly the same with our assumption.

Following these steps, you can easily run 3SLS estimation in STATA. For more information on this test, please give the following command in STATA:


help reg3

If the
reg3 command is not installed in STATA, then you will have to use the following command in STATA to find and install the code:

findit reg3


Go Backfast_rewind
add