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

st: xtgee and weights


From   [email protected]
To   [email protected]
Subject   st: xtgee and weights
Date   Wed, 15 Dec 2004 22:55:38 +0100

Dear Statalisters,

I am trying to use the xtgee command for an international panel and weight my observations according to the population in a country. The weights should correct for heteroscedasticity.

Having read in the manual that weights should be constant within panel, I have chosen the reverse square root of the population of the year 1992 as a weight for the whole time range and created an according variable which takes the same value for each year (only differing between countries).

However, trying to run:

xtgee y x1 x2 x3 .... yeardummies [iw = weight], robust corr(ar3) family(gauss) link(ident)

resulted in the message

weight must be constant within country_id
r(199);

The problem is: my weights are constant with a country ! (The problem is independent of the use of pweight instead)

Does anybody have a glimpse of where the mistake could be ?


Thanks a lot in advance,

Justina





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