I am doing a bit of work on multivariate time series and I need to calculate the partial autocorrelation function of a matrix. I will provide some details bellow and show an example of how I simulate my data:

**Data simulation** First I create an autoregressive process that I need for my work. Mathematica’s `ARProcess`

does not seem to work on multivariate data directly, however, I managed to find a workaround for that:

`aCoef = {{{0, 0, 0, 0}, {0, 0, 0, 0.8}, {0, 0, 0, 0}, {0, 0, 0.8, 0}}, {{0, 0, 0, 0}, {0.8, 0, 0, 0},{0, 0, 0, 0}, {0.8, 0, 0, 0}}};`

These coefficients allow me to simulate data that have 4 paths in the time series that influence each other in different time lags. Now that my coefficients are defined, I am simulating the data like this:

`data = RandomFunction[ARProcess[aCoef, IdentityMatrix[4]], {0, 10000}];`

Now what this process does, is to create a TemporalData object, which can be used for my further analysis. I would like to see what the partial autocorrelation is between the different channels. This will allow me to see if the simulated data are as I expect. I would expect to be able to use a function that would output something like this:

This is the output of the pacf function in R, that I have implemented using `REvaluate`

in Mathematica. It shows that there are values different from zero, where expected, i.e. the fourth element of the matrix on row 1, column 2, the third element of the matrix on row 1 column 4, the first element of the matrix on row 2 column 2 and finally the first element of matrix on row 2 column 4. The matrix rows represent time lags and the columns represent each path of the time series. I have tried using `PartialCorrelationFunction`

:

According to the Wolfram Documentation, either data or tproc can used as 1st argument in that function, I have tried both with no success. Although this is not an error in the language, it does not provide the information I am looking for. I could use the R function, but ideally I would like to use the functions in Wolfram. Does anyone have any idea on how to fix this? Thanks!