Statalist


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

Re: st: re: Weighted mean of prices with quantities as weight


From   "Beatrice Crozza" <[email protected]>
To   [email protected]
Subject   Re: st: re: Weighted mean of prices with quantities as weight
Date   Thu, 23 Oct 2008 12:06:45 +0100

Dear Kit,

thank you very much for your reply.

now everything is OK!

Best,
Bea

2008/10/23 Kit Baum <[email protected]>:
> < >
> Bea said
>
> I wrote:
>
> egen newvar = wtmean(price), weight(quantity) if contract=="S", by(date)
>
> but doesn't work.
>
>
> You have the syntax wrong. If you -ssc desc _gwtmean- you will see that
> weight() is an option, so it must come after the comma.
>
> . egen junk = wtmean(price) if foreign, weight(displacement) by(rep78)
> (52 missing values generated)
>
>
> Kit Baum, Boston College Economics and DIW Berlin
> http://ideas.repec.org/e/pba1.html
> An Introduction to Modern Econometrics Using Stata:
> http://www.stata-press.com/books/imeus.html
>
>
> *
> *   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/
>
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index