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

st: RE: xtgee and weights


From   "Scott Merryman" <[email protected]>
To   <[email protected]>
Subject   st: RE: xtgee and weights
Date   Fri, 17 Dec 2004 08:42:47 -0600

Justina,

Are you sure the weights are equal?  It looks like -xtgee- performs
(xtgee.ChkWt) the following to check if the weights are equal:

    - cap by `ivar': assert `v'==`v'[_n-1] if _n>1
    - if _rc {
    - noi di in red "weight must be constant within `ivar'"
    - exit 199
      }

I am not sure why it would issue the error if they were equal.

Scott

________________________________________
From: [email protected]
[mailto:[email protected]] On Behalf Of
[email protected]
Sent: Wednesday, December 15, 2004 3:56 PM
To: [email protected]
Subject: st: xtgee and weights

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



*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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