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]

st: margins using weights in calculation?


From   Brent Gibbons <brent.gibbons@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: margins using weights in calculation?
Date   Fri, 10 May 2013 15:12:19 -0400

When i run a weighted OLS regression (using either iweight or pweight) with about 13,000 cases, I get a reported number of observations of about 7,701 (which is what it should be given the values of the weights. But when I then run a margins command to compute dydx(*) on these data, with the same weight specified, I get the original unweighted number of cases (about 13,000) as the reported # of observations. Does this mean that when "margins" is averaging marginal effects across all cases, it is disregarding the weights and taking the simple unweighted average (i.e., giving each case a weight = 1)?





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


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