RATS 10.1
RATS 10.1

entries=number of supplementary card entries to process [all]


You can use the ENTRIES option on any instruction which has a supplementary card in regression format: LINREG, CMOMENT, STWISE, PREGRESS, AR1, EQUATION (applies to the supplementary card listing the MORE variables), LDV, DDV, PRB, LGT, MAKE, ENCODE, MCOV, EXCLUDE and SUMMARIZE. You can also use it for the supplementary card for TEST.


ENTRIES lets you put one of these instructions inside a loop and change the number of regressors on the supplementary card to use. ENTRIES is largely obsolete because you can use the ENTER instruction or one of the “reglist” functions to build supplementary cards in a VECTOR[INTEGER].
 

An entry is any of the objects on the supplementary card, except for the control characters # and $. You must count the { and } of a lag field. Thus M1{1 TO 10} counts as 6 entries (M1, {, 1, TO, 10, and }). RATS will use the number of entries specified by the ENTRIES option, starting from the first entry on the card.
 

The code below is part of a procedure which computes something similar to a vector autoregression, but with varying number of lags among the variables. NUMVAR is the number of variables in the system, VARS is a VECTOR[INTEGERS] with the list of variables, and LAGS is a VECTOR[INTEGERS] with the number of lags for each. This can handle anything up to a six variable system simply by changing NUMVAR.
 

do j=1,numvar

   linreg(entries=6*numvar+1) vars(j)

   # constant vars(1){0 to lags(1)}  vars(2){0 to lags(2)} $

      vars(3){0 to lags(3)}  vars(4){0 to lags(4)}  $

      vars(5){0 to lags(5)}  vars(6){0 to lags(6)}

end do j

 


Copyright © 2025 Thomas A. Doan