Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Prefix commands and returned matrix results


From   "Newson, Roger B" <[email protected]>
To   <[email protected]>
Subject   st: Prefix commands and returned matrix results
Date   Tue, 27 May 2008 11:26:27 +0100

Fellow statalisters (especially StataCorp):

I have a query about Stata prefix commands (such as bootstrap:, statsby:
and svy brr:) and returned matrix results. Based on the online help
accessible by typing

whelp exp_list

there does not seem to be any way in which an expression list used by a
prefix command can access elements of returned matrix results from the
command that has been prefixed, except for the estimates stored in e(b)
and the standard errors extracted from the diagonal of e(V). Is this
indeed the case? And, if you want the numeric results from a command to
be available to bootstrap:, statsby: and similar prefixes, do you have
to return them in scalars? I ask because I have 2 commands cendif and
censlope, which are part of the SSC package somersd, and they return
confidence intervals for percentile slopes, differences or ratios in a
matrix returned result r(cimat), in which the first column contains
percents, the second column contains the estimates, and the third and
fourth columns contain the lower and upper confidence limits,
respectively. If I want users to be able to bootstrap: or statsby: these
commands, accessing entries of those matrices, then must I also store
these entries in scalars, similar to the r(c_#) results returned by the
centile command in official Stata?

Another query concerns the svy brr prefix. This seems to be able to
access only e() results, and not r() results. Is this indeed the case?
And is it by accident or by design? And, if it is by accident, then are
there plans to fix it?

I would like to thank Bob Fitzgerald of MPR Associates Inc. for alerting
me to these issues with Stata prefix commands.

Best wishes (and thanks in advance)

Roger


Roger B Newson
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: [email protected] 
Web page: www.imperial.ac.uk/nhli/r.newson/
Departmental Web page:
http://www1.imperial.ac.uk/medicine/about/divisions/nhli/respiration/pop
genetics/reph/

Opinions expressed are those of the author, not of the institution.

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index