On Thu, 23 Feb 2017, Alecos Papadopoulos wrote:
I am running simulations to examine empirical size distortions of
tests. So I use a loop construct. My statistic comes from NLS or MLE
estimation, so I cannot use the --progressive mode of the loop command. I
sidestep this by using a count-loop and by storing the obtained statistics
into a matrix.
I typically repeat the loop 1000 times.
But when I want to examine small sample sizes, say 100 observations, I end up
with a matrix that has 1000 rows saved in a session that has sample size 100.
In order to proceed with the work at hand, I need to transform the matrix
into series. But I cannot do that since the row-length of the matrix is
greater than the size of the sample in the session, and as far as I know, one
cannot increase the sample size in a session.
nulldata 1000 --preserve
will give you a dataset with 1000 observations without destroying
your matrices (or other variables, except for the existing series).