Examples: after single-equation estimation except anova
. regress y age female educ region1 region2 region3 region4
. test region1 = region2 = region3
. test region4 = (region1+region2)/2
. test (region1 = region2) (region3 = region4)
. test educ=.1
. test region1 region2 region3 region4, mtest
. testparm region*
In the above example, you may substitute any single-equation estimation command (such as clogit,
logistic, logit, ologit, etc.) for regress.
Examples: after multiple-equation estimation commands
using mvreg as an example
. mvreg y1 y2 y3: x1 x3 x3 site1-site3
test y1 coefs = 0
. test [y1]
test y1 site coefs = 0
. test [y1]: site1 site2 site3
test all site coefficients are 0
. test site1 site2 site3
test y1 coefficients = y2 coefs
. test [y1=y2]
. test [y1=y2]: site1 site2 site3, mtest(bonf)
test y1 coefs = y2 coefs = y3 coefs
. test [y1=y2=y3]
. test [y1=y2=y3]: site1 site2 site3
Examples: after mlogit
. mlogit y x1 x2 x3 site1 site2 site3
test y=1 coefs = 0
. test [1]
test y=1 site coefs = 0
. test [1]: site1 site2 site3
test y=1 coefficients = y=2 coefs
. test [1=2]
. test [1=2]: site1 site2 site3
test all site coefficients are 0
. test site1 site2 site3
Examples: after reg3
. reg3 (y1 = x1 x2 x3) (y2 = x1 x3 x4) (y3 = x1 x2 x5)
test y1 coefs = 0
. test [y1]
test equality common coefficients in y1, y2, y3: only x1
. test [y1=y2=y3], common
test equality common coefficients in y1 and y2 (x1 x3 _cons) and in y1 and y3 (x1 x2 _cons)
. test ([y1=y2]) ([y1=y3]), common constant
Examples with testparm
. testparm inc*
. testparm inc*, equal equation(select)