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: How to deal with commands that are too long for e(cmdline) when writting postestimation commands?


From   daniel klein <[email protected]>
To   [email protected]
Subject   Re: st: How to deal with commands that are too long for e(cmdline) when writting postestimation commands?
Date   Thu, 2 Aug 2012 17:55:04 +0200

Alex,

e(cmdline) is macro, and therefore the 244 character limit does not
exist here. You can store a command line as long as 165,000
characters  (given Stata IC).

You do not show any code, but my guess is that your are evaluating the
contents of e(cmdline). See Cox (2008) on this issue.

If  you are using string functions, use extended functions (help
extended_fcn) or low level parsing commands (help gettoken, help
tokens) instead. Another alternative is to use Mata, as there are no
limits for strings in Mata.

Best
Daniel


Cox, N., J. (2008). Stata tip 70: Beware the evaluating equal sign.
The Stata Journal, 8(4): pp. 586–587.
-- 
Dear Statalisters,

I am working on an ado that calculates influence statistics
for higher-level clusters after hierarchical mixed models.
However, my question is pretty much independent of my ado.
My postestimation command needs to extract a list of all
independent variables of the model and also some other
elements from the command (options, random effects specifications etc.).

Everything works fine and I don't have a problem with the syntax.
My problem is simply that I don't know how to deal with command
lines that exceed 244 characters. How do you deal with command lines
that cannot be stored in e(cmdline)? Is there a way to get all the
variables, options, etc. even if the command exceeds 244 characters?

Thanks,

Alex

*
*   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