Helo family!
I am looking for a code to specify arh(1) covariance structure in the PROC IML simulation procedure. I saw the IML code for specifying the R-side ar(1) covariance structure by Gibbs & Kiernan (2020), but I am struggling to figure out how to capture arh(1) instead and generate my simulation samples. Here is the code below by Gibbs & Kiernan (2020), when the R-side covariance structure is ar(1):
proc iml worksize=100;
resid=2;
rho=0.8;
m=5; /* m = number of time points */
cov=j(m,m,1);
do i=1 to m;
do j=1 to m;
cov=[i, j]=resid*rho**abs(i-j);
end; end;
mean={0 0 0};
n=200;
call randseed(61345);
z=RandNormal(n, mean, cov);
create AR1Errors from z;
append from z;
quit;
Kindly assist with the parameters (code) required for arh(1) structure in a similar code as given above. Alternative approaches (codes) are most welcome.
Thank you for your assistance.
... View more