Statalist The Stata Listserver


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

Re: st: Model Uncertainty


From   SR Millis <[email protected]>
To   [email protected]
Subject   Re: st: Model Uncertainty
Date   Wed, 24 Jan 2007 10:30:28 -0800 (PST)

When may want to consider using Bayesian model
averaging.  It is easily implemented in the free R
package BMA: it carries out BMA for linear regression,
generalized linear models, and survival analysis. 
Available at the CRAN website:

http://cran.r-project.org/

SR Millis



--- "[email protected]" <[email protected]> wrote:

> I have a regression with n different variables.
> I would like to try all possible regression
> combinations.
> For example (n=2):
> regress yy1
> regress yy1 xx1
> regress yy1 xx2
> regress yy1 xx1 xx2
> 
> I would like to try all possible regression
> combinations in a
> convenient way, such that I can
> enter the dependent variable and the independent
> variables.
> Then, the program should
> (1) find all possible 2^n model combinations,
> (2) run each regression, and
> (3) store statistics (such as _b, _se, R2).
> 
> A convenient way to find all model combinations
> might be to iterate
> from 0 to 2^n-1 and convert the index variable to a
> binary number.
> e.g. n=2:
> model=0: 0 0  ==> regress yy1
> model=1: 0 1 ==> regress yy1 xx1
> model=2: 1 0  ==> regress yy1 xx2
> model=3: 1 1 ==> regress yy1 xx1 xx2
> 
> Thank you.
> 
> Best regards,
> Michael
> *
> *   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/
> 


Scott R Millis, PhD, MEd, ABPP (CN & RP)
Professor & Director of Research
Department of Physical Medicine & Rehabilitation
Wayne State University School of Medicine
261 Mack Blvd
Detroit, MI 48201
Email: [email protected]
Tel: 313-993-8085
~~~~~
This message, including any attachments, is intended for the person(s) or organization(s) named above. It is confidential and may be legally privileged or protected by law. Unauthorized use, copying, or disclosure of any part is strictly prohibited. If you are not the intended recipient, please contact the sender immediately and delete it from your system.

DISCLAIMER OF KNOWLEDGE OF VIRUS
Although this email and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by Scott R Millis for any loss or damage arising in any way from its receipt or use.
*
*   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