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: aweights for overall data when analyzing subsets of data


From   Nick Cox <[email protected]>
To   [email protected]
Subject   Re: st: aweights for overall data when analyzing subsets of data
Date   Sat, 26 Mar 2011 00:33:22 +0000

What makes you say that? I did this experiment:

sysuse auto, clear

separate mpg, by(foreign) veryshortlabel

scatter mpg weight [w=price] , ms(Oh) mcolor(red) || scatter mpg?
weight [w=price] , ms(Oh ..) mcolor(blue ..)

Blue occludes red with no overlap or underlap on my graph.

(Note that -scatter- does not allow -iweights-.)

Nick

On Fri, Mar 25, 2011 at 7:55 PM, Laura Grant <[email protected]> wrote:
> 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?
>

*
*   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