I am facing problems to write a formula for an autorgeressive equation where the coefficients are not the default ones, but they are defined by me in a specific coef object named phi1. (I cannot use the standard syntax "equation standard.ls x x(-1 to -!pmax)" because then the coefficients will be the default ones)
Basically what I would like to get is to generate an equation of the type x=phi1(1)+phi1(2)*x(-1)+phi1(3)*x(-2)+....+phi1(p)*x(-p)
I wrote the following code:
Code: Select all
%auto= "("
for !j=1 to !pmax
%auto= %auto +phi1(!j)+"phi1(!j)*x(-"@str(-!j)")"
next
'%auto = %auto ")"
equation try.ls x {%auto}
