Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

st: Simulate stepwise: Report coefficients from each replication

From   John Antonakis <>
Subject   st: Simulate stepwise: Report coefficients from each replication
Date   Mon, 29 Mar 2010 16:56:19 +0200

I want to highlight the evils of stepwise analysis. However, I am having problems in getting Stata to report the coefficients from each replication --it seems that it only reports the coefficients that are common across replications. Anyone have any ideas?

set seed 51

drop _all

set obs 272
gen x1=rnormal()
gen x2=rnormal() +.2*x1
gen x3=rnormal() +.3*x1 + .3*x2
gen x4=rnormal() +.2*x1
gen x5=rnormal()
gen x6=rnormal() + .2*x5
gen x7=rnormal() + .5*x5
gen x8=rnormal() + .1*x7
gen x9=rnormal() + .1*x7

generate double e  = 5*rnormal()
generate double u  = sqrt(exp(-2+0.6*x1))*e

gen y = 5+ x1+x2+x3+x4+x5+x6+x7+x8+x9 + 2*u

stepwise, pr(.2): reg y x1-x9


simulate _b _se, reps(20) seed (123) : sim,


Prof. John Antonakis, Associate Dean Faculty of Business and Economics
Department of Organizational Behavior
University of Lausanne
Internef #618
CH-1015 Lausanne-Dorigny

Tel ++41 (0)21 692-3438
Fax ++41 (0)21 692-3305

Faculty page:

Personal page:

*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index