Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

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


From   Nick Cox <[email protected]>
To   [email protected]
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.

Nick

2011/10/13 Jorge Eduardo Pérez Pérez <[email protected]>:
> 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:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


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