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]

Re: st: a mum r(2000) error

From   Nick Cox <>
Subject   Re: st: a mum r(2000) error
Date   Thu, 24 May 2012 08:28:06 +0100

r(2000) is also often seen when you have some variable that should be
numeric presented as string.

You don't show us your program. but one standard way of processing data is

marksample touse


... if `touse'

If at least one variable in the variable list is string rather than
numeric, then in these circumstances all observations will be marked
out and the last command will fail because there are no observations
to work with.

The wording "no observations" I imagine goes back to Stata before
there were string vvariables. Now that there are string variables it
often has to be read as

"no observations with numeric values to work on"

So, look at your varlist. If there are problematic variables, it may
be as easy as -destring-.


On Thu, May 24, 2012 at 8:15 AM, László Sándor <> wrote:

> I was running my own command in Stata 11 MP for Windows (never
> updated, sadly), and ran into an r(2000) error, with nothing else
> specified. I suspected no observations, but now I checked I have
> nothing missing. I tried to trace a run, but curiously, I could not
> find where the error message can come from.
> Is this error documented somewhere? What are the possible causes? (I
> googled to no avail.)

*   For searches and help try:

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