also see tryem
ssc des tryem
This will run most estimation commands for a given subset size (as
opposed to all subsets), but also allows for user-defined criteria to
select the "best" subset.
Al Feiveson
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Martin Weiss
Sent: Wednesday, September 24, 2008 9:25 AM
To: [email protected]
Subject: st: RE: Find all subsets of variables
Also note -stepwise- and -nestreg- as similar commands. A related
question would be how one could capture model selection criteria
(adjusted R square) for the regressions run on the covariate
combinations thrown up by
-selectvars-:
**********
cap ssc inst selectvars
sysuse auto, clear
selectvars headroom trunk length
foreach v in `r(varlist)'{
regress mpg `v'
}
**********
The -postfile- suite of commands is an obvious solution, but I imagine
there are more convenient ways to do it...
HTH
Martin
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of junin
Sent: Wednesday, September 24, 2008 4:01 PM
To: [email protected]
Subject: st: Find all subsets of variables
Dear all,
i want to find out all subsets of a given set of variables for model
testing. As an example:
A set of variables var1 var2 var3 var4 should give me:
var1 var2 var3 var4
var1 var2 var3
var1 var2 var4
var1 var3 var4
var1 var4
var1
var2 var3 var4
and so forth.
I would like to test all possible model configurations. Is there a
command in Stata, which could be convenient to use?
Thank you for any help,
dirk
*
* 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/
*
* 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/