Previous Page | Next Page

Language Reference

FARMASIM Call

CALL FARMASIM( series, d <*>, phi <*>, theta <*>, mu <*>, sigma <*>, n <*>, p <*>, q <*>, initial <*>, seed ) ;

The FARMASIM subroutine generates an ARFIMA() process. The input arguments to the FARMASIM subroutine are as follows:

d

specifies a fractional differencing order. This argument is required; the value of should be in the open interval excluding zero.

phi

specifies an -dimensional vector that contains the autoregressive coefficients, where is the number of the elements in the subset of the AR order. The default is zero.

theta

specifies an -dimensional vector that contains the moving average coefficients, where is the number of the elements in the subset of the MA order. The default is zero.

mu

specifies a mean value. The default is zero.

sigma

specifies a variance of the innovation series. The default is one.

n

specifies the length of the series. The value of should be greater than or equal to the AR order. The default is is used.

p

specifies the subset of the AR order. See the FARMACOV subroutine for additional details.

q

specifies the subset of the MA order. See the FARMACOV subroutine for additional details.

initial

specifies the initial values of random variables. The initial value is used for the nonstationary process. If initial, then take the same value . If the initial option is not specified, the initial values are set to zero.

seed

is a scalar that contains the random number seed. At the first execution of the subroutine, the seed variable is used as follows:

If seed > 0, the input seed is used for generating the series.

If seed = 0, the system clock is used to generate the seed.

If seed < 0, the value ()(seed) is used for generating the series.

If the seed is not supplied, the system clock is used to generate the seed.

On subsequent calls of the subroutine in the DO-loop-like environment, the seed variable is used as follows: If seed > 0, the seed remains unchanged. In other cases, after each execution of the subroutine, the current seed is updated internally.

The FARMASIM subroutine returns the following value:

series

is an vector that contains the generated ARFIMA() process.

As an example, consider the following ARFIMA() process:

     

In this process, . The following statements generate this process:

d = 0.3;
phi = 0.5;
theta = -0.1;
mu    = 10;
sigma = 1.2;
call farmasim(yt, d, phi, theta, mu, sigma, 10);
print yt;

Figure 23.105 Data Simulated from a ARFIMA Process
yt
10.039935
9.058614
8.1847306
7.3327512
8.1277157
6.9954996
7.8818498
6.4959747
7.4549514
9.1906972

The FARMASIM subroutine generates a time series of length from an ARFIMA() model. If the process is stationary and invertible, the initial values are produced by using covariance matrices obtained from FARMACOV. If the process is nonstationary, the time series is recursively generated by using the user-defined initial value or the zero initial value.

To generate an ARFIMA() process with , is first generated for , where and then is generated by .

To generate an ARFIMA() process with , a two-step approximation based on a truncation of the expansion is used; the first step is to generate an ARFIMA() process , with truncated moving average weights; the second step is to generate .

Previous Page | Next Page | Top of Page