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/