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: RE: Variable name length limit


From   James Bernard <[email protected]>
To   [email protected]
Subject   Re: st: RE: Variable name length limit
Date   Wed, 19 Jun 2013 18:32:45 +0800

Thanks Nick! Very Helpful

On Wed, Jun 19, 2013 at 3:47 PM, Nick Cox <[email protected]> wrote:
> Let's revise this description to fill in gaps and correct misstatements.
>
> 1. James is using -diff-, a user-written program from SSC. (Please
> remember to explain where user-written programs you refer to come
> from. Other posts show that failing to explain this just wastes other
> people's time, not a good thing to do when you want their help.)
>
> 2. From the code it appears that -diff- at various points may attempt
> to create scalars (not variables) with temporary names longer than
> Stata's limit, which Stata can't allow.
>
> There is no sense in which Stata can break its own limits.
>
> James alludes to discussions in September 2010 -- search
> http://www.stata.com/statalist/archive/2010-09/maillist.html -- but
> the nub of the matter is that the limit on scalar and variable names
> can't be disabled.
>
> This is arguably a  bug, or limitation, in -diff-, but short of
> rewriting the program before the author does  the only work-around for
> James is to use shorter variable names, say by
>
> clonevar copy1 = no_dynamic_boxes_fixedat_94
>
> and feeding -copy1- and anything else problematic to -diff-..
>
> Nick
> [email protected]
>
>
> On 19 June 2013 08:02, James Bernard <[email protected]> wrote:
>
>> I have a variable named "no_dynamic_boxes_fixedat_94". After running a
>> t-test in -diff command (for Difference-in-Difference estimation)
>> Stata creates a variable named "_no_dynamic_boxes_fixedat_94_ttest_mc"
>> which has more than 32 characters....
>>
>> it then returns error
>
> On Wed, Jun 19, 2013 at 2:46 PM, Timothy Mak <[email protected]> wrote:
>
>>> Can you give an example?
>
> James Bernard
>
>>> I have been struggling with the limits that Stata has imposed on the
>>> length of variable names. The fact is that Stata often takes a
>>> variable name and while running some tests creates ancillary variables
>>> that are named by combing my current variable names and new suffixes
>>> by Stata. This makes the variable name exceed the 32-character limit.
>>> Therefore, Stata stops and gives error.
>>>
>>> I did a search and found a thread on this titled "disable 32 character
>>> limit". However, what is written there hardly addresses what the title
>>> indicates. Is there really any way to disable this bugging limit?
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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