Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: RE: [Stata8] Model building and stepwise


From   Buzz Burhans <[email protected]>
To   [email protected]
Subject   Re: st: RE: [Stata8] Model building and stepwise
Date   Thu, 28 Apr 2005 14:51:42 -0400

Ethan,

Others' points on "stepwise" are well taken, particularly for logisitic regression.

Alternative to automated elimination by stepwise procedures, you might want to check out -fitstat- ; it provides a lot of model fit information and allows comparison of nested models if you do backward elimination of predictors. You have to do the model reduction yourself, as it should be. Using -estimates- with -estimates table- may be useful as you look at the fitstat output. fitstat is user written, I assume -findit fitstat- will turn it up.

Buzz Burhans


At 05:22 PM 4/28/2005 +0100, you wrote:

One broad and two specific points:

1. Stata really has no love for the stepwise
approach. It wouldn't surprise at all to learn that
SAS is more supportive.

2. -allpossible- is a user-written program
on SSC that provides a framework to do a
few things. I can get it to list model
sums of squares (e.g.) but it is restricted
to picking up rclass and eclass results.
My guess is that the author has no
interest in pushing it further, but would
be happy for you to clone the code and
extend it.

3. -selectvars- on SSC is another tool that
may be helpful.

. sysuse auto, clear
(1978 Automobile Data)

. allpossible reg mpg  headroom trunk weight length displacement, eclass(mss)

--------------------------------------
    model |   predictors           mss
----------+---------------------------
        1 |       (none)         0.000
        2 |            1       418.401
        3 |            2       826.479
        4 |            3      1591.990
        5 |            4      1547.357
        6 |            5      1216.675
        7 |          1 2       830.083
        8 |          1 3      1593.762
        9 |          1 4      1547.386
       10 |          1 5      1236.347
       11 |          2 3      1598.770
       12 |          2 4      1547.416
       13 |          2 5      1306.472
       14 |          3 4      1616.081
       15 |          3 5      1595.410
       16 |          4 5      1560.970
       17 |        1 2 3      1598.770
       18 |        1 2 4      1547.420
       19 |        1 2 5      1307.025
       20 |        1 3 4      1616.182
       21 |        1 3 5      1597.775
       22 |        1 4 5      1560.999
       23 |        2 3 4      1616.735
       24 |        2 3 5      1602.400
       25 |        2 4 5      1561.021
       26 |        3 4 5      1618.229
       27 |      1 2 3 4      1616.743
       28 |      1 2 3 5      1602.436
       29 |      1 2 4 5      1561.124
       30 |      1 3 4 5      1618.487
       31 |      2 3 4 5      1619.024
       32 |    1 2 3 4 5      1619.032
--------------------------------------

  1      headroom
  2      trunk
  3      weight
  4      length
  5      displacement

Nick
[email protected]

Corona, Ethan

> As part of an epidemiology class project, I have to employ
> stepwise for
> model selection. I can do that with no problems. My problem
> lies with the
> lack of output that -stepwise- generates compared to the
> output that SAS
> provides. Short of performing stepwise by hand, are there any
> model building
> ADOs that give more detailed output of each intermediate model?
> Specifically, I'm looking for type I and type III sum of
> squares as well as
> regression output for each intermediate model.
>
> I looked at -allpossible-, and while it provides all of the
> intermediate
> models using the -details- information, it doesn't provide the sum of
> squares that I'm looking for.




*
*   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/
Buzz Burhans
[email protected]


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