An important exception to the rule of scalars acting like scalars within DATAVEC: commands occurs when we include a random-number generator within the equation E. This is because the two random number generators urand and nrand supply different random numbers on each call, so that different values will be generated for the different cases. Consider, for example, the definition in this line of code:
BD>datavec : X(1,100)=urand +1
This contructs a data vector X with observations which will consist of a sequence of uniformly distributed (0,1) random numbers, plus 1. In contrast, consider the following fragment of code, which takes one random number and duplicates it over a range of cases:
BD>datavec: X(1,100)=%temp