Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: missing dummy variable


From   Kit Baum <[email protected]>
To   [email protected]
Subject   st: Re: missing dummy variable
Date   Thu, 11 Oct 2007 06:54:23 -0400

John said

Thanks Kit, but the coefficient is the easy part! It's the confidence
intervals I'm scratching my head over. Is this something that can be
dug out of the e(V) matrix or the like?


But he seems to miss my prior mention of -lincom- in a couple of postings. If you can get -lincom- to do it, it will give you point and interval estimates. Of course you can calculate it from e(V): the variance of a sum is the sum of the variances plus twice the covariances of all (i,j), i<j. Again, for two dozen coefficients, that involves 24(25)/2 = 300 distinct covariances. Luckily -lincom- will do it with a bit of setup cost:


/*
sysuse auto
rename make desc
gen make = word( desc,1)
tab make
*/
xi i.make
ds _I*
foreach v of varlist `r(varlist)' {
local lc "`lc' -`v'"
}
xi3: reg mpg e.make
lincom `lc'
// This coefficient and its standard error, added to the grand mean
// estimated as the constant term in xi3, should match the constant term in
xi: reg mpg i.make


Kit Baum, Boston College Economics and DIW Berlin
http://ideas.repec.org/e/pba1.html
An Introduction to Modern Econometrics Using Stata:
http://www.stata-press.com/books/imeus.html


On Oct 11, 2007, at 2:33 AM, statalist-digest wrote:


Thanks Kit, but the coefficient is the easy part!  It's the confidence
intervals I'm scratching my head over.  Is this something that can be
dug out of the e(V) matrix or the like?
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index