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

st: Re: Assert question.


From   "Michael Blasnik" <[email protected]>
To   <[email protected]>
Subject   st: Re: Assert question.
Date   Fri, 18 Mar 2005 17:28:41 -0500

You are only asking Stata to list observations where hid equals the prior hid, so you would only see one observation (the second) from each duplicate pair.

Michael Blasnik
[email protected]

----- Original Message ----- From: <[email protected]>
To: <[email protected]>
Sent: Friday, March 18, 2005 4:17 PM
Subject: st: Assert question.



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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index