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.

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:

.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

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:

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