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, statalist.org 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 <john.antonakis@unil.ch>
To   statalist@hsphsun2.harvard.edu
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?

clear
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

end

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
Switzerland

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

Faculty page:
http://www.hec.unil.ch/people/jantonakis

Personal page:
http://www.hec.unil.ch/jantonakis
____________________________________________________

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


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