Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

st: How to calculate weighted mean

From   Xixi Lin <>
To   statalist <>
Subject   st: How to calculate weighted mean
Date   Thu, 5 Dec 2013 13:07:02 -0500


I am trying to calculate weighted average return by country and by
period. Here is my code:
egen capweight_return = wtmean(Return_lead1), weight(Market_Cap),
by(Country, Period)

But the stata says "unknown egen function wtmean()", does anyone knows
how to fix that?


Xixi Lin
*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index