Changes

Jump to navigation Jump to search
Code for most recent regression:
set more off insheet using "Estimation.txt" log using "Estimation.log", replace
gen rmse=0 gen ressd=0 gen alpha=0 gen beta=0
tabstat acqkey, stats(min max) save matrix acqnos=r(StatTotal) local min=acqnos[1,1] local max=acqnos[2,1]
forvalues acqnumber = `min'(1)`max' { capture reg ret vret if acqkey==`acqnumber' capture matrix betas=e(b) capture local beta=betas[1,1] capture local alpha=betas[1,2] capture local rmse=e(rmse) capture predict res,r capture tabstat res, stats(sd) save capture matrix resmat=r(StatTotal) capture local ressd=resmat[1,1] capture replace rmse=`rmse' if acqkey==`acqnumber' capture replace ressd=`ressd' if acqkey==`acqnumber' capture replace alpha=`alpha' if acqkey==`acqnumber' capture replace beta=`beta' if acqkey==`acqnumber' capture drop res display `acqnumber' }
/* reg ret vret if acqkey==2 matrix betas=e(b) local beta=betas[1,1] local alpha=betas[1,2] local rmse=e(rmse) predict res,r tabstat res, stats(sd) save matrix resmat=r(StatTotal) local ressd=resmat[1,1] replace rmse=`rmse' if acqkey==2 replace ressd=`ressd' if acqkey==2 replace alpha=`alpha' if acqkey==2 replace beta=`beta' if acqkey==2 drop res */
drop if reldayno !=-30
outsheet using "Estimation-processed.txt", replace
==Previous Papers==
668

edits

Navigation menu