[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: -infix- problem?
"Hau Chyi" <firstname.lastname@example.org>
st: -infix- problem?
Tue, 13 May 2008 03:46:54 -0500
Dear Stata users:
I've downloaded several variables from the SIPP (Study of Income and
Program Participation), and realized there seems to be a problem with
the -infix- command, which I hope can be illustrated by the following
Here is only one observation with one variable, which looks like below
in the asc file.
This is the SSUID, the survey unit id of each individual.
If you save this into a asc file as, say "d:\documents\test\test.asc"
, and run the following lines:
infix SSUID 1-16 using "d:\documents\test\test.asc";
format SSUID %16.0f;
The variable Stata reads is:
| SSUID |
1. | 1234567948140544 |
It's completely wrong! I realize this after discovering some families
I generated from SSUID (and other family identifyers) have more than
The problem disappears when I do
-infix double SSUID 1-16 using ... -
In other words, the precision -infix- chooses automatically is wrong.
Is this a bug of infix or some memory allocation error of my computer?
No matter what, I recommend if you are infixing variables with more
than 10 digits, you'd better check the ascii file to see if it's truly
Thanks for calrifying. I'd also like to add that reading all the
questions and answers posted on the list has improved my own knowledge
to Stata tremendously.
> test.asc is a file of 10 individuals; and the .do file is machine generated file by the SIPP to infix them into Stata.
> The last variable of each individual is SSUID (at position 12654 - 12666) , the survey unit id.
> Tthe raw file indicates SSUID for the first six individuals to be:
> But after using the do file provided by SIPP website to -infix- them, the first 6 observations of the SSUID variable becomes:
> I've noticed that if I do -infix double SSUID- rather than -infix SSUID-, the problem will be fixed. Is this a bug of Stata or my computer? I've checked this problem on Stata 9 and Stata 10MP on PC.
> Thanks for calrifying. I'd also like to add that reading all the questions has improved my own knowledge to Stata tremendously!
Assistant Professor of Economics
The Wang Yanan Institute for Studies in Economics (WISE)
* For searches and help try: