Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Assert question.


From   adiallo5@worldbank.org
To   statalist@hsphsun2.harvard.edu
Subject   st: Assert question.
Date   Fri, 18 Mar 2005 16:17:23 -0500

Hi,
I have a question.

I have identifiers ranking from 1 to 9882 on 4940 observations.

I have issued a command:

assert hid[_n-1]~=hid[_n]

and got a error message:

(6 contradictions in 4940 observations).

when I list:

list if hid[_n-1]==hid[_n]

I have:

                   hid
.3902       3902
.4185       4186
.4231       4231
.4838       4837
.4884       4882
.4931       4929

I do not have a perfect merge so I guess the problem comes from
there.

But I wonder why stata get confused. The values of hid are not identical.

Or am I too tired...

Thanks in advanced.

Amadou Bassirou DIALLO
Ph.D Candidate
Poverty Specialist, PREM, The World Bank.
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index