"One minor point if you only have one input set then _N_ will only be one once so there is no reaso to include that test in the DO J= loop." Not quite understand what you mean here. The input data test1 has 10 observations. And, _N_ will be used 5 times as there are 5 arrays being created. "It sounds like you have a varying number of econ variables and you are sometimes creating extra variables that you don't want." I do want to use those retained observations, but since they are all the same within same econ_*, it is redundent and it takes too much space. So I am thinking if I can write these 5 (&col.) econ_* as global variables, and retreat them when I need them.
... View more