Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: A more informative error mesage in -reshape-

From   Nick Cox <>
Subject   Re: st: A more informative error mesage in -reshape-
Date   Thu, 13 Oct 2011 23:58:42 +0100

Everyone who has got an uninformative error message will sympathise,
but in this case I think it's important to see why this one arises.

First, -reshape- is here processing stubnames -- not variable names as
Jorge loosely states.

Second, -reshape- is just processing token by token. It doesn't have a
sense of what comes next, or even that there's another stubname next
in line, as there need not be. That's a good design, indeed more or
less an inevitable design, for -reshape-'s multiple syntax.

So, I doubt that there is a short fix to meet Jorge's suggestion.
Naturally, this is StataCorp's decision to make.


2011/10/13 Jorge Eduardo Pérez Pérez <>:
> Dear Statalist
> Reshaping a lot of variables, I noticed that if by mistake, you repeat
> one of the variables you want to reshape, Stata issues a
> noninformative variable not found error message.
> . webuse reshape4
> . des incf
>              storage  display     value
> variable name   type   format      label      variable label
> ------------------------------------------------------------------------------------------
> incf            float  %9.0g                  f inc
> . reshape long inc inc, i(id) j(sex) string
> (note: j = f m)
> variable incf not found
> I think this should be changed to "inc already reshaped" or something
> similar. When you are reshaping many variables or using varlists, the
> mistake might be hard to notice.

*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index