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

st: re:

From   Kit Baum <>
Subject   st: re:
Date   Thu, 23 Oct 2008 06:45:27 -0400

< >
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
An Introduction to Modern Econometrics Using Stata:

*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index