*! Version 1.0 (STB-52 dm73) /* Direct comments to: John Hendrickx Nijmegen Business School University of Nijmegen P.O. Box 9108 6500 HK Nijmegen The Netherlands Desmat is available at http://baserv.uci.kun.nl/~johnh/desmat/stata/ Version 1.02, Oct. 7 1999 Added an option for displaying multiplicative parameters Version 1.01, Sept. 30 1999 Cosmetic changes to display a 'direct' variables name in an interaction but not in a main effect */ program define desrep version 6 * multiplicative parameters if first argument is "exp" local exp `1' display _newline "Effect" _col(58) %10s "Coeff" %12s "s.e." _newline tempname paras para ses se matrix `paras'=e(b) matrix `ses'=vecdiag(e(V)) local nms: colfullnames `paras' tokenize "`nms'" while "`1'" ~= "" { matrix `para'=`paras'[1,"`1'"] matrix `se'=`ses'[1,"`1'"] matrix `se'=sqrt(`se'[1,1]) local z=`para'[1,1]/`se'[1,1] local prob=2*(1-normprob(abs(`z'))) * option to report exponential parameters if "`exp'" == "exp" { matrix `para'[1,1]=exp(`para'[1,1]) matrix `se'=`para'*`se' } * determine significance level if `prob' < .01 { local sig="**" } else if `prob' < .05 { local sig="* " } else { local sig=" " } * delete equation name (if any) and colon local pnt=index("`1'",":") if `pnt' ~= 0 { local 1=substr("`1'",`pnt'+1,.) } * get variable names local varn="``1'[varn]'" local pzat="``1'[pzat]'" if "`varn'" ~= "`varn1'" & "`varn'" ~= "" { * main effect of a continuous var: go directly to col(58) * do not display value label if "`pzat'" == "direct" { display "`varn'" _col(58) _continue } else { display "`varn'" } } local varn1="`varn'" * get value labels local valn="``1'[valn]'" if "`valn'" ~= "" { local valn=substr("`valn'",-55,.) * don't display the value label for the main effect of a continuos var if "`pzat'" ~= "direct" { display " `valn'" _col(58) _continue } } else { capture local valn: variable label `1' if "`valn'" == "" { local valn `1' } local valn=substr("`valn'",-57,.) display "`valn'" _col(58) _continue } display %10.3f `para'[1,1] %2s "`sig'" %10.3f `se'[1,1] macro shift } end