Statalist The Stata Listserver

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

Re: st: Time series question

From   Clive Nicholas <>
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.

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index