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]

RE: st: margins vs. lincom


From   "Visintainer, Paul" <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   RE: st: margins vs. lincom
Date   Thu, 16 Dec 2010 08:29:48 -0500

Thanks, Michael.  That was my hunch since the discrepancy grew smaller as the sample size increased.

-p

________________________________________________
Paul F. Visintainer, PhD
Baystate Medical Center
Springfield, MA 01199


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Michael N. Mitchell
Sent: Thursday, December 16, 2010 1:54 AM
To: [email protected]
Subject: Re: st: margins vs. lincom

Dear Paul

   The difference appears to be that -lincom- is using a t-distribution and -margins- is 
using a z distribution. See the output below my signature based on your example. In 
looking at the "Methods and Formulas" section of the -margins- documentation, it refers to 
the use of maximum likelihood estimation. My hunch is that is the reason that the z 
distribution is used, but someone might have something better than a hunch.

I hope that helps,

Michael N. Mitchell
Data Management Using Stata      - http://www.stata.com/bookstore/dmus.html
A Visual Guide to Stata Graphics - http://www.stata.com/bookstore/vgsg.html
Stata tidbit of the week         - http://www.MichaelNormanMitchell.com

-----------------------
Output
-----------------------

. clear

. webuse margex
. set seed 1
. sample 1     // draw a 1% sample of the data
. regress y i.sex
(output omitted)
. margins sex

Adjusted predictions                              Number of obs   =         30
Model VCE    : OLS

Expression   : Linear prediction, predict()

------------------------------------------------------------------------------
              |            Delta-method
              |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
          sex |
           0  |   62.77647   4.230417    14.84   0.000     54.48501    71.06794
           1  |   72.60769   4.837667    15.01   0.000     63.12604    82.08935
------------------------------------------------------------------------------

. lincom 1.sex+_cons
  ( 1)  1.sex + _cons = 0

------------------------------------------------------------------------------
            y |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
          (1) |   72.60769   4.837667    15.01   0.000     62.69818     82.5172
------------------------------------------------------------------------------








On 2010-12-15 1.38 PM, Visintainer, Paul wrote:
> clear
> webuse margex
> sample 1     // draw a 1% sample of the data
> regress y i.sex
> margins sex
> lincom 1.sex+_cons
*
*   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/

----------------------------------------------------------------------
Please view our annual report at http://baystatehealth.org/annualreport
 

CONFIDENTIALITY NOTICE: This e-mail communication and any attachments may contain confidential and privileged information for the use of the designated recipients named above. If you are not the intended recipient, you are hereby notified that you have received this communication in error and that any review, disclosure, dissemination, distribution or copying of it or its contents is prohibited. If you have received this communication in error, please reply to the sender immediately or by telephone at 413-794-0000 and destroy all copies of this communication and any attachments. For further information regarding Baystate Health's privacy policy, please visit our Internet site at http://baystatehealth.org.

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index