Re: [R] Calculation of lags

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Mon 03 Jul 2006 - 21:52:23 EST

Represent your series as a ts object and see ?lag Also lag.plot may or may not be of use to you.

On 7/2/06, Ronaldo Reis-Jr. <chrysopa@gmail.com> wrote:
> Hi,
>
> If I have the follow situation:
>
> A dependent variable (i.e. number of insects) that is affected by an
> independent variable (i.e. rain). The problem is that the measure of rain
> affect the population in other moment. So there exit a lag between the rain
> and the number of insects. Exist in R any tool to find what is this lag?
>
> Explain better.
>
> Suppose that I have a linear relationship between rain and insects. More rain
> make more insects. If I try to model the rain and insects in the same moment
> I cant see this relationship because the rain today affect the number of
> insects in the future. Thus, I need to model the present rain with the number
> of insect in the future. But when is this future? 1 day after, 2 days after,
> etc.
>
> How the best way to calculate this lag?
>
> Thanks
> Ronaldo
> --
> Todos chegamos um dia como a agua e nos vamos como o vento
> -- Graham Greene
> --
> > Prof. Ronaldo Reis Júnior
> | .''`. UNIMONTES/Depto. Biologia Geral/Lab. Ecologia Evolutiva
> | : :' : Campus Universitário Prof. Darcy Ribeiro, Vila Mauricéia
> | `. `'` CP: 126, CEP: 39401-089, Montes Claros - MG - Brasil
> | `- Fone: (38) 3229-8190 | chrysopa@gmail.com
> | ICQ#: 5692561 | LinuxUser#: 205366
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Mon Jul 03 21:57:39 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 03 Jul 2006 - 22:16:15 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.