Statalist The Stata Listserver


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

Re: st: Time series question


From   Clive Nicholas <[email protected]>
To   [email protected]
Subject   Re: st: Time series question
Date   Mon, 5 Mar 2007 02:26:50 +0000 (GMT)

Mark Elliot wrote:

Sorry, this is probably an obvious question, but I'm new at this.

I have a dataset that contains years, a dependent variable, and an
independent variable.

I would like to allow for possible time-delays in the relationship, and I
would like to test correlation.

What is the best function to accomplish this?

---------------------------------------------------------------------------------------------------

I guess you're looking to -generate- a lagged (in)dependent variable
in your dataset, which you don't show. Start with

bysort idvar (year): g lagvar=L.var

after which you can then, for instance,

pwcorr var lagvar

or run a much stronger test.

If this doesn't do what you want, you'll need to be clearer.

Clive Nicholas





		
___________________________________________________________ 
The all-new Yahoo! Mail goes wherever you go - free your email address from your Internet provider. http://uk.docs.yahoo.com/nowyoucan.html

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