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: Problem with paneldata


From   Thomas Gericks <ThomasGericks@web.de>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Problem with paneldata
Date   Wed, 16 Jun 2010 21:39:07 +0200 (CEST)

I changed the time series to quartal.

it says:

. xtset gvkey2 quartal
 panel variable:  gvkey2 (unbalanced)
 time variable:  quartal, 5 to 199, but with gaps
 delta:  1 unit

when i now try:

gen lag_saleq = L.saleq

it gives me the error: "Not sorted"

before i used datadate! 

there it gave me:


. xtset gvkey2 datadate
 panel variable:  gvkey2 (unbalanced)
 time variable:  datadate, 30 Apr 61 to 31 Dec 09, but with gaps
 delta:  1 day

The delta is wrong. it should have been. quarterly.

I have no idea how to solve this problem.

Thanks


-----Ursprüngliche Nachricht-----
Von: Scott Merryman <scott.merryman@gmail.com>
Gesendet: 16.06.2010 21:22:32
An: statalist@hsphsun2.harvard.edu
Betreff: Re: st: Problem with paneldata

What does -xtset- report? Does the time variable have gaps?   Is the
delta set appropriately?

Scott


On Wed, Jun 16, 2010 at 2:09 PM, Thomas Gericks  wrote:
> Hello,
>
> I am working with panel data.
>
> Therefore i declared it as paneldate, saying:
>
> xtset gvkey (company name) datadate(time)
>
> Now, when i try to work with lagged values, i.e.
>
> gen lag_saleq = L.saleq
>
> It doesnt show me any errors but the varlist lag_saleq is always empty, instead of having the value of the last time period.
>
> What do i do wrong? Can anyone help me?
>
> Thanks a lot,
>
> Thomas Gericks
*
*   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/
___________________________________________________________
WEB.DE DSL ab 19,99 Euro/Monat. Bis zu 150,- Euro Startguthaben und dazu
50,- Euro Geldprämie inklusive! <a href="https://freundschaftswerbung.web.de"; target="_blank">https://freundschaftswerbung.web.de</a>

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