Does anyone knows a command in STATA that uses the t-stat test for
testing
individual or joint coefficients in regressions, i.e., B1=.5 or
B1=B2, etc.
I know that the F test that is used in the test command is the
general case
for the hypothesis testing, but we normally see the t-stat and
asscoiated
p-value in published papers (at least in my area), that we would like to
stick with the convention (eventhough is the same thing)...
The test command, when applied to a single hypothesis, produces an F-
statistic with one numerator d.f. The t-statistic of which you speak
is the square root of that F-statistic. Its p-value is identical to
that of the F-statistic. E.g.
webuse auto
regress price mpg weight
test mpg
You will find that the F-statistic is the square of the t, and it has
the same p-value. Follow the test command with
scalar tstat = sqrt(r(F))
and you will get the |tstat| that you seek. If you want to get fancy
and preserve the sign,
mat b = e(b)
scalar tstat = sqrt(r(F))*sign(_b[mpg])
display tstat will then give you the tstat with sign.