# AR(2) simulation

I am trying to simulate 10 paths of an AR(2) system with 75 time steps in each path. It is only a system in a loose sense: the variables are connected by nothing more than the correlation in their disturbance terms.

The system has ten variables, but three should show how I am trying to run it.

intercepts={0.038871, 0.062392, 0.10672}
initialValues={0.0213326, 0.00916164, 0.149474}
firstLag={{0.87523, 0., 0.}, {0., -0.26885, 0.}, {0., 0., 0.087234}}
secondLag= {{-0.31856, 0., 0.}, {0., -0.12441, 0.}, {0., 0., 0.020767}}
covariance={{0.0000499966, 0.000121522, -0.0002496}, {0.000121522,


0.00264912, -0.00128539}, {-0.0002496, -0.00128539, 0.00416527}}

The following code returns no simulated values and no error message. Can anyone tell me what I am doing wrong?

RandomFunction[
ARProcess[intercepts,{firstLag,secondLag},covariance,initialValues],{0,75},10]

• You need to use {initialValues} - 1 inital point consisting of 3 values. – b.gates.you.know.what May 19 '17 at 11:45
• Thanks for taking a look at it. Solution didn't work though... – Luke May 19 '17 at 21:39
• Do you get an error message ? – b.gates.you.know.what May 20 '17 at 6:44
• italic bold Nope' – Luke May 21 '17 at 0:54
• I voted to close, but I am not sure should this question be closed as something that can be found in the documentation. From the function page of ARProcess it is not immediately clear that the initial values for an $n$-dimensional process should be given in a matrix. – Anton Antonov May 23 '17 at 16:07

Too long for a comment:

intercepts = {0.038871, 0.062392, 0.10672};
initialValues = {0.0213326, 0.00916164, 0.149474};
firstLag = {{0.87523, 0., 0.}, {0., -0.26885, 0.}, {0., 0., 0.087234}};
secondLag = {{-0.31856, 0., 0.}, {0., -0.12441, 0.}, {0., 0.,
0.020767}};
covariance = {{0.0000499966, 0.000121522, -0.0002496}, {0.000121522,
0.00264912, -0.00128539}, {-0.0002496, -0.00128539, 0.00416527}};
paths = RandomFunction[
ARProcess[intercepts, {firstLag, secondLag},
covariance, {initialValues}], {0, 75}, 10]

ListLinePlot@
`