Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Stepwise saving ommited variable

From   daniel klein <>
Subject   Re: st: Stepwise saving ommited variable
Date   Tue, 1 May 2012 17:09:32 +0200


I will not comment on stepwise regression in general, but here is one
way to get the variables omitted by -stepwise-

. sysuse auto ,clear
. loc allvars mpg trunk weight turn foreign
. stepwise reg price `allvars'
. loc varsin : coln e(b)
. loc omitvars : list allvars - varsin
. di "`omitvars'"


Dear statalist,

I am running a series of regressions on time series, in which I
estimate the effect of certain national holidays (fathers day,
superbowl, etc.) on beer consumption of selected beer brands. Since
each beer brand has a different consumption pattern, brands differ in
statistically significance of holidays. This is why I decided to use
stepwise regression in order to include only the relevant holidays for
each beer brand.

Since I am running all my regressions in -forvalues- loop (I have
approx 30 beer brands), I would like to save from each regression the
holidays omitted by -stepwise- in order to be able to see, which
holiday in general was the most often omitted, which holiday was the
one influencing the most beer brands etc. How can I achieve this? I
havent found any postestimation possibility to save variables omitted
by stepwise.

Thank you for you help!
*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index