Please see the screenshot attached for the equation that I want to code and for the existing one that I would like to alter.

I tried the following:

Code: Select all

```
ga(t)=((1-psi)*(ga0)+ psi*ga(t-1))*(exp(-dela*5*((t.val-1)))));
al("1") = a0; loop(t, al(t+1)=al(t)/((1-ga(t))););
```

Code: Select all

`(exp(-dela*5*((t.val-1))))`

Code: Select all

` al("1") = a0; loop(t, al(t+1)=al(t)/((1-ga(t))););`

My questions are:

- would the above coding give me the preferred equation ? (if I define the parameters earlier onward in the code)

- How should I include epsilon in the formula that I want to code?

Epsilon is an i.i.d. residual from an AR(1) (auto-regressive process of order 1) based on almost 200 years of empirical data. i.e. it is not a parameter that I define myself.

If it is of any relevance: these equations relate to the DICE model of William Nordhaus

Many thanks!