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 at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: Unpublicized changes to Saved Results for -reshape-


From   Alan Riley <ariley@stata.com>
From   ariley@stata.com (Alan Riley)
To   statalist@hsphsun2.harvard.edu
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Unpublicized changes to Saved Results for -reshape-
Date   Mon, 26 Apr 2010 14:53:48 -0500

Roger Newson (r.newson@imperial.ac.uk) asked about saved results
after -reshape-:

> I have noticed some recent unpublicized changes to the Saved Results for 
> the -reshape- command (see -help reshape-). In my Stata 11.0 (which I 
> updated today to the sub-version dated 20 April 2010), the -reshape- 
> command produces a selection of returned dataset characteristics that is 
> different from the selection advertized in -help reshape-. In 
> particular, if I use -reshape wide-, then the advertized result 
> -_dta[ReS_jv]- (containing the values of the variable specified by the 
> -j()- option) is no longer stored. On the other hand, if the variable 
> specified by the -j()- option had a value label, then -reshape- saves 
> the unpublicized results -_dta[__JValLabName]-, containing the name of 
> the value label, and -_dta[__JValLab]-, containing the values of the 
> -j()- variable alternating with the corresponding value labels.
> 
> The changes have the appearance of being work in progress, and, when 
> complete, will probably extend the capabilities of -reshape- in ways 
> which will be useful to users like me, who frequently use -reshape- to 
> produce tables with multiple columns of confidence intervals (see 
> Section 4.4 of Newson, 2003). However, the selection of results seems 
> currently to be unstable, implying that it is currently not a good idea 
> for users to use these saved results in their own programs. Are these 
> results likely to stabilize soon? If not, then it is probably a good 
> idea for users to avoid using these results for the time being, and to 
> make their own solutions. (I currently often use Ben Jann's very useful 
> -labelsof- package, downloadable from SSC, when I want to store values 
> and labels of -j()- variables when using -reshape wide-.)

The saved results from -reshape- are not a work in progress and
should be stable.  We are unable to reproduce the behavior Roger
reported of the characteristic _dta[ReS_jv] not being stored after
-reshape wide-.

Roger may have noticed this because _dta[ReS_jv] is only stored if the
optional 'values' portion of the -j()- option is filled in.  If -j()- is
used with simply a variable name, with no values specified, then
_dta[ReS_jv] will not be stored.  This behavior has not changed and is
documented, if tersely, in both -help reshape- and [R] reshape.

Roger also notes that -reshape- "produces a selection of returned dataset
characteristics that is different from the selection advertized in -help
reshape-".  I believe Roger is referring to some returned results that are not
documented.  These are intentional and are needed for -reshape-'s own tracking
purposes to be able to successfully convert between wide and long forms of the
data.  These characteristics are intentionally not documented, however, as
they were not intended to be consumed by end users.


--Alan
(ariley@stata.com)

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index