Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: logit fe with svy panel data.


From   jpitblado@stata.com (Jeff Pitblado, StataCorp LP)
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: logit fe with svy panel data.
Date   Tue, 20 Dec 2011 11:01:51 -0600

Sumedha Gupta <suguptastatlist@gmail.com> is trying to use -clogit- with the
-svy- prefix:

> I wish to use the HRS data to do an individual level panel fixed
> effects estimation for a binary outcome. xtlogit does not work since I
> only have pweights and also these are not constant across waves. svy
> command with clogit does not seem to work because if I run:
> 
> svy subpop(pop1): clogit rdepres  age  age2, group(hhidpn)
> 
> it gives me an error 'invalid vcetype
> r(198);
> 
> I believe this is because clogit defines clusters at group level as
> opposed to individual level (not sure about this though). Is there are
> alternative I can use? I found a similar question posted earlier:
> 
> http://www.stata.com/statalist/archive/2011-11/msg00325.html
> 
> However I couldn't see the answer.
> 
> Any help will be much appreciated.

It appears Sumedha forgot to put a comma between -svy- and the -subpop()-
option.  The correct syntax is

	. svy, subpop(pop1): clogit rdepres age age2, group(hhidpn)

In Sumedha's case, -clogit- requires that the levels of variable 'hhidpn' are
nested within the final stage sampling units.  Also -clogit- requires that the
sampling weights are constant within the levels of 'hhidpn' variable.

--Jeff
jpitblado@stata.com
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index