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
Using splitvallabels + catplot without over optionDear all, When creating graphs I often use splitvallabels to break up longer labels on the y axis. …
Filling in unobserved dates with past valuesI have data that looks something like this: Array It is market cap data for different companies, s…
If a Generated Regressor X is orthogonal to a non-generated regressor W, would the variance and tests on W be correct?Good morning, Professor Jeff Wooldridge or anybody else who knows the answer, or has encountered th…
How to make A new Id'sHello everyone, I need help with making a new Id that will solve my table so basically, I have data…
Can you propose a graph on which I can compare a couple of Uniform distributions?Good morning, Nick Cox or anybody else with interests in graphing: Can you please propose a graph w…
Subscribe to:
Post Comments (Atom)
0 Response to Joint Standard Errors of Regression
Post a Comment