Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

RE: st: margins vs. lincom


From   "Weichle, Thomas" <Thomas.Weichle@va.gov>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: margins vs. lincom
Date   Thu, 16 Dec 2010 09:32:27 -0600

Dear Michael and Paul,
Using Michael's example, I was able to reproduce the exact confidence
interval that lincom command produces because it uses the t-distribution
as Michael suggested.  And margins command uses the z-distribution.  For
the 95% C.I. using the z-distribution, the multiplier is 1.96 as we are
all familiar.  But using the t-distribution, the multiplier is 2.0484071
as produced by Stata's invttail(n, p) function where n is the degrees of
freedom and p is the probability.  Using n = 28 df from a sample of N=30
and p=.025:

. display invttail(28, .025)
2.0484071

lincom 95% C.I. = 72.60769+-2.0484071*4.837667 = (62.69818, 82.5172)

Tom Weichle
Math Statistician
Center for Management of Complex Chronic Care (CMC3)
Hines VA Hospital, Bldg 1, C202
708-202-8387 ext. 24261
Thomas.Weichle@va.gov 


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


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index