Bookmark and Share

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: how to us prais in a situation with comparison group


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: how to us prais in a situation with comparison group
Date   Wed, 2 May 2012 20:32:56 +0100

I don't know what autoreg in SAS does, so can't comment much, except for this.

If you can explain how autoreg calculates serial correlation of
residuals for your model, then somebody well qualified may be able to
comment. You could try betting that someone on this list knows what
autoreg in SAS does, but you're less likely to get a good answer.

You can't easily have it both ways. If your data are time series, it
is hard to bootstrap them meaningfully, at least in Stata.

Nick


On Wed, May 2, 2012 at 8:14 PM, Li, Rui (CDC/ONDIEH/NCCDPHP)
<eok8@cdc.gov> wrote:
> I actually did the autoreg in SAS and found 1st order autocorrelation. Since it is hard to use bootstrap in SAS to get confidence intervals for my estimates, I switched to stata to do the analysis. Unfortunately the command may not work in this case in stata.
>
> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Nick Cox
> Sent: Wednesday, May 02, 2012 3:04 PM
> To: statalist@hsphsun2.harvard.edu
> Subject: Re: st: how to us prais in a situation with comparison group
>
> From what you say, you can't. But it can't be much of a loss not to be able to use a command that apparently doesn't apply to your model.
> There may be scope for calculating residuals and looking at their time behaviour.
>
> Nick
>
> On Wed, May 2, 2012 at 7:51 PM, Li, Rui (CDC/ONDIEH/NCCDPHP) <eok8@cdc.gov> wrote:
>> Nick,
>>
>> Thanks!
>>
>> Since I have both intervention and comparison group, I have two groups of time series data in the same dataset. Based on your response, I cannot use tsset. But when I use prais with corc option, I got error message " time variable not set, use -tsset varname ...-". How can I use prais in this situation?
>>
>> Many thanks!
>>
>> Rui
>>
>>
>> -----Original Message-----
>> From: owner-statalist@hsphsun2.harvard.edu
>> [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Nick Cox
>> Sent: Wednesday, May 02, 2012 11:53 AM
>> To: statalist@hsphsun2.harvard.edu
>> Subject: Re: st: how to us prais in a situation with comparison group
>>
>> No; "repeated time values in sample" refers only to the variable you
>> offer to -tsset-. If it occurs with ties, then it cannot be used to
>> -tsset- your dataset.
>>
>> Nick
>>
>> On Wed, May 2, 2012 at 4:44 PM, Li, Rui (CDC/ONDIEH/NCCDPHP) <eok8@cdc.gov> wrote:
>>> I am doing a segmented linear regression, the model is
>>>
>>> Yt=β0 + β1*group + β2timet + β3*policy1t + β4 *policy2t + β5*time
>>> after policy2t + β6*group* timet + β7*group* policy1t  + β8*group*
>>> policy2t  + β9*group* time after policy2t  +  et
>>>
>>> I want to use prais to take into account of the autocorrelation, however, when I use tsset time, the program gave me error message "repeated time values in sample". It is because I have a comparison group and it has the same time variable as the treatment group. What should I do in this case? Also, if I use tsset time, should time still be a variable in the model or should it be left out of the model?
>>>
>>
>> *
>> *   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/
>>
>> *
>> *   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/
>
> *
> *   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/
>
> *
> *   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/

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index