Hi,
I have a mysterious error occurring which has to do with magically
appearing missing values in the course of constructing lists. I'm
putting together a series (no missings) and an existing list (no
missings), but the resulting list suddenly has 95 obs (out of 140) with
missings! How is that possible?
Here's the exact debug code to show the problem (ripped out of a bigger
script, so it's not self-contained, sorry):
<excerpt>
loop foreach i endolist
# debug
list debuglist = endolist.$i laglist
series anymiss_i = missing(endolist.$i)
series anymiss_l = missing(laglist)
series anymiss = missing(debuglist)
numofmiss_i = sum(anymiss_i)
numofmiss_l = sum(anymiss_l)
numofmiss = sum(anymiss)
printf "Num of missings here lhs: %d\n", numofmiss_i
printf "Num of missings here laglist: %d\n", numofmiss_i
printf "Num of missings here: %d\n", numofmiss
# end debug
</excerpt>
Output:
Num of missings here lhs: 0
Num of missings here laglist: 0
Num of missings here: 95
I should add that this happens inside a function, and while 'endolist'
is not a function argument itself, it contains series and lists that
were passed as arguments. I tried both the 'endolist.$i' variant and the
plain '$i', with the same result.
My feeling is that this is a bug, but as always, I may be missing (pun
not intended) something...
thanks,
sven