Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: xtset -- data with multiple vars for uniquely identifyingindividuals


From   n j cox <[email protected]>
To   [email protected]
Subject   Re: st: xtset -- data with multiple vars for uniquely identifyingindividuals
Date   Sun, 16 Sep 2007 16:22:40 +0100

The identifier must be a single variable, as far as I know.
Use -egen id = group(country pid), label-.

Whether your data structure has implications for error structure
I cannot say. I do not know what ECHP means.

Nick
[email protected]

Karen Robson (modulo HTML)

I have longitudinal panel data where there are two variables that uniquely
identify an individual (pid and country). There are also 8 waves of the
data. I want to xtset the data but my individual identifier is a combination
of pid and country. Is this possible? I can only see in the documentation
where panelvar is designated with a single variable.

I realize that I can make a new variable that combines pid and country, but would like to know if there are alternatives.

I should also note that the pids are not unique to each country - that is, there are times when a pid is used in more than one country. So it is imperative that the pid and country vars are used together to uniquely identify cases.

(the data in question are the ECHP in case you are interested!)

*
* 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