st: RE: swaic for model selection with AIC

Listers -
Further investigation into -swaic- reveals that it makes version 6 assumptions about the variable names generated by -xi-. In
particular, it assumes that -xi- generates variables with a capital "I". But, as the Stata commands below show, in Version 7 and
later -xi- generates variables starting with "_I". (This is NOT documented under -help version-.)
.. version 8.2
.. xi i.expose
i.expose _Iexpose_1-3 (naturally coded; _Iexpose_1 omitted)
.. version 7
.. xi i.expose
i.expose _Iexpose_1-3 (naturally coded; _Iexpose_1 omitted)
.. version 6
.. xi i.expose
i.expose Iexpos_1-3 (naturally coded; Iexpos_1 omitted)
For this reason, caution needs to be used when mixing -xi- and -swaic-. For those interested, I now have a version of -swaic- that
works correctly with Version 7 and later -xi-.
Tom
Thomas J. Steichen
steicht@rjrt.com
---------------------------------------------------------------------------------------
"If your result needs a statistician then you should design a better experiment."
- Ernest Lord Rutherford: physicist, chemist & mathematician extraordinaire
---------------------------------------------------------------------------------------
-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Paul Silcocks
Sent: Thursday, September 23, 2004 12:10 PM
To: statalist@hsphsun2.harvard.edu
Subject: st: swaic for model selection with AIC
I'm desperately seeking some help from an experienced Stata programmer! I am using the Stata insert swaic for an automatic model
selection (findit swaic will direct you to the program and help file).
However for my purposes I need to extract the names of the variables chosen for the final best-fitting model (as a string, say).
Unfortunately the swaic procedure doesn't seem to save the results and the variables used in the final model seem to be buried in
various local macros and I've not been successful at modifying the ado-file, even though it looks as if a single line at the right
place would do the job. Ideally I'd extract the minimum AIC value as well, but I can live with running the "best" model one extra
time to calculate the AIC.
Can anybody help me please? I've tried contacting the author, Dr Zhiqiang Wang at Australia's Menzies University, but without
success (he may not even be there now) and I've run out of ideas.
Paul Silcocks BM BCh, MSc, FRCPath, FFPH, CStat
Clinical Senior Lecturer
Trent Institute for Health Services Research
Room B39
School of Community Health Sciences
University of Nottingham Medical School
Nottingham
NG7 2UH
tel +44 (0) 115 9709765
e-mail paul.silcocks@nottingham.ac.uk
This message has been scanned but we cannot guarantee that it and any attachments are free from viruses or other damaging content:
you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by
UK legislation.
*
* 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/
-----------------------------------------
CONFIDENTIALITY NOTE: This e-mail message, including any attachment(s),
contains information that may be confidential, protected by the attorney-
client or other legal privileges, and/or proprietary non-public
information. If you are not an intended recipient of this message or an
authorized assistant to an intended recipient, please notify the sender by
replying to this message and then delete it from your system. Use,
dissemination, distribution, or reproduction of this message and/or any of
its attachments (if any) by unintended recipients is not authorized and
may be unlawful.
*
* 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/