Re: st: Time series question

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/