REGTOTEX Procedure |
@REGTOTEX takes the most recent regression and generates a TeX equation to display it in the standard form with coefficients x variables in the first line with standard errors in parentheses under the coefficients.
@RegToTeX( options ) (no parameters)
Options
PICTURE=picture format for numbers ["*.##"]
DVLABEL=TeX code label for dependent variable [series label_t]
RHSLABELS=VEC[STRING] of TeX code labels for the right hand side variables [series label_t or series label_{t +/- lag) for lags/leads]
Example
This does a simple example, using just the default labels, and an alternative which overrides both the dependent variable and the explanatory variables.
*
* Wooldridge, Introductory Econometrics, 4th edition
* Example 6.2 from pp 194-6
*
open data hprice2.raw
data(format=free,org=columns) 1 506 price crime nox rooms dist radial $
proptax stratio lowstat lprice lnox lproptax
*
set ldist = log(dist)
set roomsq = rooms^2
*
linreg lprice
# constant lnox ldist rooms roomsq stratio
@regtotex(picture="*.###")
@regtotex(picture="*.###",dvlabel="\widehat{\log (price)}",$
rhslabels=||"","log(nox)","log(dist)","rooms","rooms^2","stratio"||)
Copyright © 2026 Thomas A. Doan