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 on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: using /// with parmby


From   Jamie Fagg <j.fagg@qmul.ac.uk>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: using /// with parmby
Date   Wed, 27 Oct 2010 14:44:43 +0100

Dear Roger,

Your solution works very well. Thank you for the help.

Jamie

On 27 October 2010 12:36, Roger Newson <r.newson@imperial.ac.uk> wrote:
> -parmby- (like earlier versions of -statsby-) takes a command line (in
> quotes) as part of its input. If you are in the default Stata
> carriage-return-delimited mode defined by
>
> #delim cr
>
> (see -help delimit-), then you cannot split long quoted strings between
> lines, as Jamie is trying to do.
>
> The solution I usually use is to do my programming in the non-standard
> semicolon-delimited mode defined by
>
> #delim ;
>
> which allows users to split quoted strings between lines, becuase commands
> are delimited by semicolons. As in:
>
> parmby "regress
>  mpg weight",
>  list(,);
>
> which works in my do-files (which start with -#delim ;-).
>
> Jamie might like to use semicolon-delimited mode only with -parmby- and
> other special applications, which use very long quoted strings, and use
> carriage-return-delimited mode elsewhere. As in:
>
> #delim ;
> parmby "regress
>  mpg weight",
>  list(,);
> #delim cr
>
> An alternative possibility is to build the command in a local macro. As in:
>
> local cmd `"regress"'
> local cmd `"`cmd' mpg weight"'
> parmby `"`cmd'"', list(,)
>
> I hope this helps.
>
> Best wishes
>
> Roger
>
>
> Roger B Newson BSc MSc DPhil
> Lecturer in Medical Statistics
> Respiratory Epidemiology and Public Health Group
> National Heart and Lung Institute
> Imperial College London
> Royal Brompton Campus
> Room 33, Emmanuel Kaye Building
> 1B Manresa Road
> London SW3 6LR
> UNITED KINGDOM
> Tel: +44 (0)20 7352 8121 ext 3381
> Fax: +44 (0)20 7351 8322
> Email: r.newson@imperial.ac.uk
> Web page: http://www.imperial.ac.uk/nhli/r.newson/
> Departmental Web page:
> http://www1.imperial.ac.uk/medicine/about/divisions/nhli/respiration/popgenetics/reph/
>
> Opinions expressed are those of the author, not of the institution.
>
> On 27/10/2010 12:06, Jamie Fagg wrote:
>>
>> Dear Statalisters,
>>
>> I'm using Stata/SE 10.1 for Windows. Born 10 Jun 2010. All files are up to
>> date.
>>
>> My query is about -parmby-
>> (http://ideas.repec.org/c/boc/bocode/s352601.html).
>>
>> The following command works fine.
>>
>> parmby "xi: mlogit walkcat i.tertsoccoh i.sex*age  i.schrpV1  i.urbrur
>> if tousewalkcat0407V1,rrr vce(cluster pseudo) base(0)", by(qinc)
>> saving(Graph4/GSSocCapWalk04IncIntSoc, replace) eform for(estimate
>> min95 max95 %8.2e)
>>
>> However, it's rather long. I'd like to break it over one or maybe two
>> lines. I tried this:
>>
>> . ***Stratification models for graph of interaction in
>> "GSSocCapWalk04IncIntSum"
>> .
>> . parmby "xi: mlogit walkcat i.tertsoccoh i.sex*age  i.schrpV1  i.urbrur
>> ///
>> You must specify at least one of the four options:
>> list(), saving(), norestore, and fast.
>> If you specify list(), then the output variables specified are listed.
>> If you specify saving(), then the new data set is output to a disk file.
>> If you specify norestore and/or fast, then the new data set is created in
>> the me
>>>
>>> mory,
>>
>> and any existing data set in the memory is destroyed.
>> For more details, see on-line help for parmby and parmest.
>> r(498);
>>
>> I checked the on-line help, and the archives to see if this has come
>> up before but I couldn't find any references to it. Is -parmby-
>> different to other commands when it comes to breaking across multiple
>> lines?
>>
>> Thanks for your consideration,
>>
>> Jamie
>> --
>> Room 2.09, City Centre
>> School of Geography, Queen Mary, University of London
>> Mile End Rd
>> E1 4NS
>> Tel: 020 7882 2748
>>
>> *
>> *   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/
>



-- 
Room 2.09, City Centre
School of Geography, Queen Mary, University of London
Mile End Rd
E1 4NS
Tel: 020 7882 2748

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