Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: repeated time values within panel
From
Nick Cox <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re: st: repeated time values within panel
Date
Fri, 6 Sep 2013 09:13:52 +0100
That is not really addressing the point.
-xtset- needs to be set specifying a time variable ahead only of
commands that require a time variable; which commands do you envisage
using with that requirement?
The fact is that your dataset is one in which ties on year exist and
are natural, so no -xt- method that requires unique (id, time)
observations will make sense any way.
Stata itself recognises this distinction by _not_ requiring a time
variable to be set; you may specify a panel identifier and that alone
in -xtset-.
Nick
[email protected]
On 6 September 2013 00:41, Momplaisir, Florence
<[email protected]> wrote:
> Thanks for your response Nick. My understanding is that adding the time variable tells stata that the order of observations within the panel matter i.e. that there is a time order (here baby year of birth) within the panel. This is important because moms with multiple babies can have controlled HIV disease on their first pregnancy but not on their second or third pregnancies.
> ________________________________________
> From: [email protected] [[email protected]] on behalf of Nick Cox [[email protected]]
> Sent: Thursday, September 05, 2013 10:50 AM
> To: [email protected]
> Subject: Re: st: repeated time values within panel
>
> Backing up here: What is your reason for setting a time variable here?
> Clearly your mothers define panels, but different mothers have
> children at quite different times. -xtset Stateno- may be as much as
> you really need. Nothing stops you using the year as a covariate for
> most other purposes. Which commands do you want to run that require a
> time variable to be set?
>
> Nick
> [email protected]
>
>
> On 5 September 2013 15:37, Momplaisir, Florence
> <[email protected]> wrote:
>> Hello,
>>
>> I'm working with a longitudinal dataset using surveillance data on HIV+ women during pregnancy and at delivery. In the dataset, women have multiple pregnancies and some have multiplets (twins, triplets etc). I'm using the xtset command to run a regression with the woman (Stateno variable) and the year as the time variable. Here is the error I found:
>>
>> xtset Stateno birthyr
>> repeated time values within panel
>> r(451);
>>
>> And this is because I have twins that have repeated time values, i.e. repeated time measures. How do I get ride of that duplicate without deleting from the dataset?
>
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/faqs/resources/statalist-faq/
> * http://www.ats.ucla.edu/stat/stata/
>
>
> ________________________________
>
> This electronic message is intended to be for the use of the named recipient, and may contain information that is confidential or privileged. This communication may contain protected health information (PHI) that is legally protected from inappropriate disclosure by the Privacy Standards of the Health Insurance Portability and Accountability Act (HIPAA) and relevant Pennsylvania Laws. You can direct questions concerning PHI or HIPAA to the Corporate Compliance and Privacy Officer at (215) 707-5605. If you are not the intended recipient, please note that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this message in error, you should notify the sender immediately by telephone or by return e-mail and delete and destroy all copies of this message.
>
>
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/faqs/resources/statalist-faq/
> * http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/