Hello everyone,
I am trying to model the line of the intersect between the equation Y = a + b1.X1 + b2.X2 and the plane Y = X1 as well the corresponding confidence interval. I adopted a naïve approach to compute the confidence interval (see below) but I guess that there are some joint effects that I would need to take into account in order to compute the CI properly.
Any help would be much appreciated
Many thanks,
Bill
*Regression
***********
reg Y X1 X2
Source | SS df MS Number of obs = 945,022
-------------+---------------------------------- F(2, 945019) > 99999.00
Model | 90481.2975 2 45240.6488 Prob > F = 0.0000
Residual | 347431.487 945,019 .367644976 R-squared = 0.2066
-------------+---------------------------------- Adj R-squared = 0.2066
Total | 437912.785 945,021 .463389475 Root MSE = .60634
------------------------------------------------------------------------------
Y | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
X1 | .3874265 .0007882 491.52 0.000 .3858816 .3889714
X2 | -.009871 .0004478 -22.04 0.000 -.0107488 -.0089933
_cons | 5.631819 .0083529 674.24 0.000 5.615447 5.64819
------------------------------------------------------------------------------
*Standard Errors
****************
local a_err = invttail(e(df_r),0.025)*_se[_cons]
local b1_err = invttail(e(df_r),0.025)*_se[X1]
local b2_err = invttail(e(df_r),0.025)*_se[X2]
*Gen intersect and CI
*********************
gen intersect = (_b[_cons]+_b[X2]*X2)/(1-_b[X1])
gen intersect_lower = ((_b[_cons]-`a_err')+(_b[X2]-`b2_err'*X2)/(1-(_b[X1]-`b1_err'))
gen intersect_upper = ((_b[_cons]-`a_err')+(_b[X2]-`b2_err'*X2)/(1-(_b[X1]-`b1_err'))
Related Posts with Joint Standard Errors of Regression
Endogeneity treatment and Altonji (2005) methods? Hi everyone, The nature of my research question and data-severe mental health on marriage out…
Add polynomial control variable to modelHello, consider a simple regression model: Code: regress test_score i.gender age However, upon ins…
How to create a progress bar for loopsHi there, I have been looking online for ways to create a progress bar that shows the completion of…
coefplot only shows several variable names in horizontal axisHi, I am using coefplot to draw the graph for the parallel trend test. I have 30 days before the ev…
Display the entire variable's names in "tab"Dear Profs and colleagues, There is an eduction variable, and its names are pretty long, in tab I n…
Subscribe to:
Post Comments (Atom)
0 Response to Joint Standard Errors of Regression
Post a Comment