RATS 11.1
RATS 11.1

FIXED   datatype  array(dimensions)

< text card > list of values for array

 

FIXED is used to define and set the values of an array inside a PROCEDURE or FUNCTION. The array values will be "fixed", meaning they cannot be changed later in the procedure or function.

Parameters

datatype

Data type for the array. This can be any array (or array of arrays) of integer, real, complex, label, or string values

array(dims)

The name of the array you want to create, followed by the dimensions of the array in parentheses. Only a single array can be initialized on a FIXED instruction. If you have more than one array to create, use multiple FIXED instructions.

Text Cards

Supply the numeric, label, or string values for the array, separated by blanks, tabs or commas. The values can be spread over multiple lines. The array will be filled row by row from the list of values. These must be literal values; expressions are not allowed.
 

For arrays of arrays, the first array will be filled completely, followed by the second array, and so on. For instance in
 

fixed vect[rect] cval(5)(3,3)

      

CVAL(1) will be filled first, followed by CVAL(2), etc.

Description

FIXED can only be used inside a PROCEDURE or FUNCTION. It is used to set the values for an array whose size and values are fixed; for instance, a lookup table for critical values. The arrays declared using FIXED are considered to be local to the procedure.

 

Note that no expressions can be used either in the dimensions or the values. If you need something more general, use the combination of LOCAL, DIMENSION and ENTER or COMPUTE.

Examples

fixed vect[int] dfssize(6)

 25 50 100 250 500 9999

fixed vect dfsigval(8)

 .01 .025 .05 .10 .90 .95 .975 .99

fixed vect[rect] dftcval(3)(6,8)

 -2.66 -2.26 -1.95 -1.60 0.92 1.33 1.70 2.16

 -2.62 -2.25 -1.95 -1.61 0.91 1.31 1.66 2.08

 -2.60 -2.24 -1.95 -1.61 0.90 1.29 1.64 2.03

 -2.58 -2.23 -1.95 -1.62 0.89 1.29 1.63 2.01

 -2.58 -2.23 -1.95 -1.62 0.89 1.28 1.62 2.00

 -2.58 -2.23 -1.95 -1.62 0.89 1.28 1.62 2.00

 

(plus two more 6x8 tables)

 

This provides critical values for the Dickey-Fuller t-test. There are three cases, each having a separate 6x8 table. Each row is for a different sample size, the values of which are given by the DFSSIZE array, while the columns represent the desired significance level, shown in the DFSIGVAL. One way to use this would be as follows: suppose DFCASE is a variable choosing which of the three cases applies, and suppose also that the row to be used has been chosen and is in ISIZE. The following brackets the significance level of the test statistic. (Anything smaller than the .01 level will show as between 0 and .01).


 

 

compute lower=0.0,upper=1.0

do i=1,8

   if teststat<dftcval(dfcase)(isize,i) {

      compute upper=dfsigval(i)

      break

   }

   else

      compute lower=dfsigval(i)

end do i

disp "Dickey-Fuller Test Statistic" teststat

disp "Marginal Significance Level is between" lower "and" upper

 


Copyright © 2026 Thomas A. Doan