Closed VivianSihanZHENG closed 3 years ago
Also, you may want to review line 981 chunk:
for (c=1; c<=length(varinfo[6,.]); c++){ if (varinfo[6,c] == "1" && varinfo[3,c] == "float"){ if (validfilters == "") validfilters = varinfo[1,c] else validfilters = validfilters + ", " + varinfo[1,c] } }
Does changing to double not capture something important here? I can't remember, so may need to test.
The original if-statement indicates "if the variable is a filter and an integer". But since no float variable is set as a filter in the metadata, if we change the if-statement toif (varinfo[6,c] == "1" && varinfo[3,c] == "double")
(double
includes both integer and float variables now), I think the results won't be affected.
Variable
ncessch_num
was defined asfloat
in STATA; but sincefloat
only has 7 digits of accuracy, andncessch_num
usually has 11 or 12 digits, we convert it todouble
, which has 16 digits of accuracy.