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]

From |
Maarten Buis <maartenlbuis@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

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:43:07 +0200 |

The trick is not evaluate the contents of e(cmd), so store the command in a local macro like this local cmd `e(cmd)' and _not_ like this: local cmd = `e(cmd)' After that you can use the extended macro functions to manipulate it. These are documented in -help extended_fcn- (I usually forget, even though I use it a lot. I typically type -help macro- and click on the link to extended macro functions). If you use the string functions instead of extended macro functions you will evaluate the string, and the 244 character limit will bite again. In order to get the variables used in the model I tend to prefer to use column names of the vector of coefficients. Hope this helps, Maarten On Thu, Aug 2, 2012 at 5:18 PM, Schmidt Alexander <alexander.schmidt@wiso.uni-koeln.de> wrote: > 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/ * * 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/

**References**:**st: How to deal with commands that are too long for e(cmdline) when writting postestimation commands?***From:*"Schmidt Alexander" <alexander.schmidt@wiso.uni-koeln.de>

- Prev by Date:
**st: How to deal with commands that are too long for e(cmdline) when writting postestimation commands?** - Next by Date:
**Re: st: How to deal with commands that are too long for e(cmdline) when writting postestimation commands?** - Previous by thread:
**st: How to deal with commands that are too long for e(cmdline) when writting postestimation commands?** - Next by thread:
**Re: st: How to deal with commands that are too long for e(cmdline) when writting postestimation commands?** - Index(es):