Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: further on the weighted average

From   Yanjun Bao <>
Subject   st: further on the weighted average
Date   Fri, 1 Aug 2003 13:24:02 -0500 (CDT)

I wrote the following command lines accoridng to the help file.

use ki00_wgt;
egen group=group(site_id);
compress group;

gen wtmean=.;
qui forvalues i = 1/196 {;
      su po4c [w=rsp_wgt] if group == 'i';
      replace wtmean = r(p196) if group p == 'i';

Now I got the error message that i is an invalid name.  What should I make
of that?


*   For searches and help try:

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