## JRP Function

Specific discussion regarding applications.

### JRP Function

It seems JRP function in your manual is wrong. You said "CRP" in there.
Anyways, I tried to use multi time series for JRQA but I think it doesn't work. I tried to use 6 channels of time series but it doesn't work. Could you give me an example? .. or your toolbox is bugged ?

Thanks !!

sultornsanee
Senior

Posts: 29
Joined: Tue Oct 12, 2010 21:05
Location: Network/Nano Science and Engineering Laboratory, Northeastern University, Boston, USA

### Re: JRP Function

Thanks for pointing to the typo (it should state "jrp" of course). I have corrected it.

For calculating JRP from multiple time series just calculate the RPs of them separately and then multiply them. The CRP toolbox includes only a very simple JRP function for illustration purposes. There was not need to have a more general JRP function, because it is so simple to calculate it with Matlab.

Code: Select all
`RP1 = crp(x1,m,tau,.1,'rr','silent');RP2 = crp(x2,m,tau,.1,'rr','silent');RP3 = crp(x3,m,tau,.1,'rr','silent');RP4 = crp(x4,m,tau,.1,'rr','silent');JRP = RP1 .* RP2 .* RP3 .* RP4;`

with m and tau the embedding parameters, and 'rr' together with 0.1 ensures to have RPs consisting of 10% recurrence points each.

Best
Norbert

Norbert
Expert

Posts: 173
Joined: Wed Jan 4, 2006 11:03
Location: Potsdam Institute for Climate Impact Research, Germany

### Re: JRP Function

Thanks a lot !!
Is it possible to make CRP for multiple time series?
Last edited by sultornsanee on Mon Mar 21, 2011 14:33, edited 1 time in total.

sultornsanee
Senior

Posts: 29
Joined: Tue Oct 12, 2010 21:05
Location: Network/Nano Science and Engineering Laboratory, Northeastern University, Boston, USA

### Re: JRP Function

No, at least not in a common sense. What you could do if you like to compare two different systems with many measurements (i.e. channels) is to use these measurements as state space vectors. In the CRP toolbox you have to use the crqa2 function, not the standard crqa.

Norbert
Expert

Posts: 173
Joined: Wed Jan 4, 2006 11:03
Location: Potsdam Institute for Climate Impact Research, Germany

### Re: JRP Function

Ok .. I got it !! .. Thanks

I have another questions for JRP and CRP. I have multiple signals which are collected from difference sampling frequency. How could we use JRP or CRP to compare these signals? ... Should I normalize these signals first? ... If yes, what techniques should I try ?

sultornsanee
Senior

Posts: 29
Joined: Tue Oct 12, 2010 21:05
Location: Network/Nano Science and Engineering Laboratory, Northeastern University, Boston, USA

### Re: JRP Function

Norbert wrote:In the CRP toolbox you have to use the crqa2 function, not the standard crqa.

Anyways, do you mean crp2? .. I have never seen crqa2 function in your manual.

sultornsanee
Senior

Posts: 29
Joined: Tue Oct 12, 2010 21:05
Location: Network/Nano Science and Engineering Laboratory, Northeastern University, Boston, USA

### Re: JRP Function

Yes, sorry I meant crp2.

Norbert
Expert

Posts: 173
Joined: Wed Jan 4, 2006 11:03
Location: Potsdam Institute for Climate Impact Research, Germany

### Re: JRP Function

Hi,

i just asked before about the embedding parameters, but I found my mistake.
Now I have a question about the computation of recurrence plots for multiple time series. I try to analyse the positional data (X,Y) of each soccer player for each second in a soccer game. Thus I have 44 time series with over 5000 datapoints and i want to analyse the recurrence of the players positions over the whole game.

Up to now I calculated crps for each time series (size: (1: 5492)) in the gui, got recurrence plots there. But I wanted to compare the X and Y positions together and also all players and not only one.

Thats why I computed a RP for each time series ( for X and Y of all players) and multiplied them.
for example:
first player:
RPx1 = crp(x1,1,25,.1,'rr');
RPy1 = crp(y1,1,7,.1,'rr');
second player:
RPx2 = crp(x2,1,20,.1,'rr');
RPy2 = crp(y2,1,25,.1,'rr');
...

--> JRP = RPx1.*RPy1.*RPx2.*RPy2....;

My question is how can I build a recurrence plot of this matrix (JRP) after that?

Best regards,
Denise
denise
Junior

Posts: 7
Joined: Sun Jun 1, 2014 13:41

### Re: JRP Function

Hi Denise,

interesting data, indeed!

What you did is the construction of the joint recurrence plot. This is one possible solution. I am not sure why you have multiplied also the 2nd player with the 1st player. But when you simply multiply the RPs of the x- and y-component of the 1st player, this corresponds to the RP of the trajectory based on the x- and y-component (at least for max norm).

What I would do is to use the crp2 function of the CRP toolbox and use the x- and y component directly as the two-dimensional phase space trajectory:
Code: Select all
`R1 = crp2([x1(:) y1(:)], 1, 1, 0.1, 'rr');`
This is the RP of the player position 1. Depending on your research question you can then apply further analysis. For example, you can (as you did already) construct the joint RP with another player: JR = R1 .* R2 or apply a windowed RQA in order to study nonstationary behaviour or typical patterns over time.

Several years ago I had some questions from sport researchers from Bavaria which also worked with such data. Unfortunately, I haven't heard from them for long time. I would be curious to see the results of recurrence analysis of soccer games.

Best
Norbert

Norbert
Expert

Posts: 173
Joined: Wed Jan 4, 2006 11:03
Location: Potsdam Institute for Climate Impact Research, Germany

### Re: JRP Function

Hi Norbert,

thank you for your advices! I will try the CRP2 function, but how can I plot R1 or JR after that?

Best regards
Denise
denise
Junior

Posts: 7
Joined: Sun Jun 1, 2014 13:41

### Re: JRP Function

you can plot with
Code: Select all
`imagesc(R1)axis xy squarecolormap([1 1 1;0 0 0])`

or you can simply use the interactive mode of the function:
Code: Select all
`crp2(x,…)`

(simply drop the left-hand output argument)

Norbert
Expert

Posts: 173
Joined: Wed Jan 4, 2006 11:03
Location: Potsdam Institute for Climate Impact Research, Germany

### Re: JRP Function

Dear Norbert,

if i use the crp2 function and use the x- and y component directly as the two-dimensional phase space trajectory, i have different delays for x and y. for example 26 and 8. Is there a rule to determine the delay in this case?

Regards,
Denise
denise
Junior

Posts: 7
Joined: Sun Jun 1, 2014 13:41

### Re: JRP Function

If you use x and y as the state components then the assumption is that both form the phase space, i.e., embedding is usually not necessary. If you chose embedding anyway, then the embedding need to be the same for both. Theoretically, one should consider to use the highest embedding dimension, but practically a much lower dimension would be better (as long as the time series is short).

Norbert
Expert

Posts: 173
Joined: Wed Jan 4, 2006 11:03
Location: Potsdam Institute for Climate Impact Research, Germany