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]

st: aweights for overall data when analyzing subsets of data


From   Laura Grant <[email protected]>
To   [email protected]
Subject   st: aweights for overall data when analyzing subsets of data
Date   Fri, 25 Mar 2011 12:55:00 -0700

I am scatter-plotting data for two subsets where I also care about a
third dimension, such a population. I want to represent population
using relative sizing of the symbols, by -aweight-

However, running

twoway (scatter y x [w= population] if  use<50, msymbol(Oh)) (scatter
y x [w= population] if  use>=50, msymbol(Oh) )

produces two subsets of the data in the same graph, but it splits up
the weighting calculation so that the two sets' symbol sizes are NOT
comparable. I would like to have the weights be over the entire data
set. How? I think I should be able to -gen- the aweights as a variable
then maybe tell Stata these are iweights?

Thanks, Laura
--
http://www2.bren.ucsb.edu/~lgrant/
*
*   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