Dear all,
I have two quick problems:
1) I have a database which have monthly data. I want to compact the data
restricting the original database.
In doing so, I have made the following loop:
loop i=2002..2012 --progressive
loop j=1..12 --progressive
smpl Destino=1 && Familia=2 && Anio=i && Mes=j --restrict
M[132+(i-2002)*12+j,2]=nobs(Anio)
smpl full
endloop
endloop
which store each sample in a matrix.
The problem is that sometimes the result from the restriction is null. In
that case, the loop breaks and stop running. I know that I have to use the
if command, but I do not how.
What I want to do is that if the result of the restriction is null, then to
store a N/A, and continue the loop.
2) The second point I want to know is if there is a chance to put "labels",
strings should be the right word, in the first row of the matrix.
Thanks,
Leandro