Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Reporting statistics for manipulated coefficients in a 2SLS design


From   Eilya Torshizian <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: Reporting statistics for manipulated coefficients in a 2SLS design
Date   Thu, 16 Jan 2014 22:32:27 +0000

Dear Statalist members,
 
I need to serve a semi two stage least squares (TSLS) in which the coefficients of the second stage are manipulated.
 
Here I am going to present a very short and simplified version of the estimations. I am going to estimate the effect of government expenditure (G) on GDP. The components of GDP are consumption (C), Investment (I) and government expenditure (G), so GDP = f(C, I, G). In my estimations, C and I are instrumented by G and another variable (let's call it Variable1). Thus, first stage regressions are as follows,
 
1.1:
 
C = bc1*VAR1 + bc2*G
 
C: Consumption
 
VAR1: variable 1
 
G: Government expenditure
 
bc1, bc2: coefficients
 
1.2:
 
I = bi1*VAR1 + bi2*G
 
VAR1: variable 1
 
G: Government expenditure
 
bi1, bi2: coefficients
 
In the second stage I need to put the total of the first stages' coefficients in the equation. Then I only need to report p_values and other statistics based on the total coefficients derived from the first stage, i.e. I am not going to estimate anything in the second stage. The second stage's equation is as follows,
 
2:
 
GDP = (bc1 + bi1)*VAR1 + (1 + bc2 + bi2) * G
 
The code that I have attached below worries me from two aspects. First, I doubt if the replacement of coefficients in the second stage is done correctly? Second, I am not sure if the standard errors are biased or not?
 
The code is as follows:
 
*VARIABLES and MULTIPLIERS are written in capital letters
 
*Loading the dataset 
 
use "StataSheet.dta", clear
 
*Declare time-series settings
tsset YEAR
 
*First Stage Consumption regression (1.1)
 
regress C VAR1 G
 
gen BC1 = _b[VAR1]
 
gen BC2 = _b[G]
 
*First Stage Investment regression (1.2)
 
regress I VAR1 G
 
gen BI1 = _b[VAR1]
 
gen BI2 = _b[G]
 
*Summing up the coefficients derived from the first stages
 
gen BT1 = BC1 + BI1
 
gen BT2 = BC2 + BI2
 
*Second Stage regression
 
regress Y VAR1 G
 
*Here I am trying to get rid of the biased Standard errors. However, I am not sure if I need to do this!
 
predict double RES, residual
 
replace RES = RES^2  
 
quietly summ RES
 
scalar RMSE = r(mean)*r(N)/e(df_r) 
 
matrix VM = e(V)
 
matrix VM = e(V) * RMSE / e(rmse)^2
 
*I replace the coefficients by the total coefficients derived from the first stage
 
matrix M = e(b)
 
matrix M[1,1] = BT1
 
matrix M[1,2] = 1 + BT2
 
*I doubt if I am right here. I need to replace the coefficient matrix with the manipulated coefficient matrix (M).
 
ereturn post M VM, noclear
 
*Saving the results for the second stage (2),
 
estimates store EST1
 
*Run a Wald test of the equality of the replaced coefficients
 
test VAR1 G
 
*END
 
Please let me know if my question needs further clarifications.

Thanks,
Eilya.
 

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index