Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Extended missing values for fixed (dictionary) files

From   Sergiy Radyakin <>
To   "" <>
Subject   st: Extended missing values for fixed (dictionary) files
Date   Fri, 10 May 2013 12:15:06 -0400

Dear All,

I am using standard Stata's -infix- command to import a file in fixed
format to Stata. The file contains numeric data, with missing values
marked with non-numeric symbols. For example:

variable X in 3 first columns and variable Y in the 4 column


If I infix the file both AAA and ZZZ values will be converted to
system-missing dot-value and will not be distinguishable afterwards.
My current workaround is to import the variable as string, then do
replaces of values AAA and ZZZ to extended missings and destring the

Note that with the real file I can't use Stata's -filefilter- to
replace AAA to .a before infixing since there is no guarantee the
value AAA will not occur in further columns of the data (data contains
string values as well, not shown in the above example).

QUESTION: Is there any way to specify how the non-numeric values are
to be treated during the infix? Is there any better strategy to do
recodes on the fly? I wish the syntax of dictionary could be extended
to something like:

1: int x 1-3; "AAA"=.a, "ZZZ"=.z

Thank you, Sergiy
*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index