Re: point me in the right direction for time series analysis?
- From: Richard Ulrich <Rich.Ulrich@xxxxxxxxxxx>
- Date: Thu, 24 Nov 2005 15:27:45 -0500
On 24 Nov 2005 09:47:01 -0800, "amorphia" <spam.ontoast@xxxxxxxxx>
wrote:
> Hi Art,
>
> Sorry, it's so easy to think you've been clear when you have overlooked
> the most basic thing!
>
> I want to analyse each infant separately. So forget for a moment that
> there will be more than one infant and just think about the analysis
> for one infant. The infant plays the game. The target goes round and
> round for several minutes, moving in and out of the capture zone.
> During that time, the infant can be squeezing the sensor, at various
> strengths or not at all. For each baby two time series are generated:
> squeezing, and distance from catching zone.
>
> Given that, I think this paragraph from the original post should now
> make more sense:
>
> I want to demonstrate that the babies squeeze more often the closer the
> object is to the the catching area. In other words, I want to test for
> a correlation between two time series variables which are both strongly
> autocorrelated: distance of target from catching zone, and strength of
> squeeze.
>
> >From what I have managed to glean from the web, although I haven't yet
> managed to get hold of a decent book on time series analysis, cross
> correlation is what I need. I think I had better get a decent book on
> time series analysis!
I have never dealt with data entirely like these, but here
is what comes to mind for me. I know I have seen analyses
that were done this way --
Cross-correlation is a start, and lagged cross-correlations
might be enough to let you illustrate your point. "Testing"
is always a difficulty for time series, so start first with the
illustration.
- You have a series that runs (say) 1-1000 for each variable.
Correlate those, A1-A1000 with B1-B1000.
Now, look at a whole bunch of *lagged* correlations, and
see whether the original correlation is higher than any
of the others, and lies at a peak of correlations.
To use the full N, you can offset-and-wrap: For series B,
renumber 1-990 to 11-1000, and re-use 991-1000 as 1-10.
Correlate the revised set of pairs.
You get 100 correlations if you shift B (or A) by 10 at a time
for a series of 1000. - You could do more, but you probably
don't need more than that.
The tricky part might be: How to set up the file.
Does SPSS give autocorrelations with very large lags?
Does it allow wrapping to complete the variables?
I expect it might do the first, but not the second. So --
I think I would create a file with variables called (say)
A1, B001, B011, B021, ..., B981, B991.
Here, the Bnnn indicates which 'nnn' the lagged series
starts at; each line has one value of A and 100 values of B
with the different lags. The file I want to analyze will
have 1000 such lines (one for each value of A).
I know that in Fortran, I could read in both whole series;
I would duplicate the values of B, so that I had a longer
vector, B(1) to B(2000), to make the wrap-around easy to do;
The first records should have
A(1), B(1), B(11), B(21), ... B(991)
A(2), B(2), B(12), B(22), ...
I would then write out, in a loop for k=1,1000
m_end= k+990
A(k), (B(m), m=k, m_end,10)
- The final "10" tells Fortran to use every 10th value
when looping from k to m_end, which is gives the values
in my example.
I don't know if SPSS allows that syntax on XSAVE
within a loop, but I would try that first. Otherwise,
that vector could be created (new variable) by an
explicit loop before the XSAVE.
Hope this helps.
--
Rich Ulrich, wpilib@xxxxxxxx
http://www.pitt.edu/~wpilib/index.html
.
- Follow-Ups:
- References:
- point me in the right direction for time series analysis?
- From: amorphia
- Re: point me in the right direction for time series analysis?
- From: Art Kendall
- Re: point me in the right direction for time series analysis?
- From: amorphia
- Re: point me in the right direction for time series analysis?
- From: Art Kendall
- Re: point me in the right direction for time series analysis?
- From: amorphia
- point me in the right direction for time series analysis?
- Prev by Date: Re: point me in the right direction for time series analysis?
- Next by Date: Re: Effect Size in SPSS
- Previous by thread: Re: point me in the right direction for time series analysis?
- Next by thread: Re: point me in the right direction for time series analysis?
- Index(es):
Relevant Pages
|
Loading