.- help on ^linest^ (STB-47: sg100) .- Two-stage estimation with linear constraints -------------------------------------------- ^linest^ [^, c^onstraints^(^clist^)^ ^e^form^(^str^)^ ^l^evel^(^#^)^ ^k^eep ^m^odify] where clist is of the form #[^-^#][^,^ #[^-^#] ...] ^linest^ shares the features of all estimation commands. Description ----------- ^linest^ performs linear constrained estimation after unconstrained estimation (e.g., ^regress^, ^qreq^, ^logit^, ^stcox^, ^heckman^, ^mvreg^, ...) was performed. ^linest^ displays the table with the two-stage constrained estimates and their confidence intervals, and a Wald test for the hypothesis that the parameters satisfy the constraints. ^linest^ can be used as a variant of ^test^ and ^testparm^ that requires the specification of the hypotheses by means of Stata's ^constraints^. The standard errors of the unconstrained estimators may be of the standard or 'robust' sandwich type and the standard errors may be adjusted for clustering. The two-stage constrained estimator is asymptotically equivalent to the one-stage constrained estimator (Gourieroux and Montfort 1995: Ch 10). This result, however, on additional linearization. Thus, if a one-stage constrained estimator is available (^cnsreg^, ^mlogit^, ^reg3^), I expect this estimator to be better behaved in small samples. Options ------- ^constraints(^clist^)^ specifies the constraint numbers of the constraints to be applied. Constraints are defined using the ^constraint^ command; see @help constraint@. ^level(^#^)^ specifies the confidence level in percent for confidence intervals of the coefficients. ^eform(^str^)^ specifies that the parameter estimates should be exponentiated. In accordance with Stata's regular behavior, the standard errors are left unchanged, and the CI-interval is exponentiated as well. The string argument of eform specifies the name of the column with transformed coefficients. ^keep^ specifies that the results for the constrained estimates are saved for replay, and for post-estimation commands (e.g., ^predict^, ^test^). ^modify^ specifies that the results for the unconstrained estimates are modified into the associated results for the constrained estimates. Thus, replaying the original estimation command with display the results for the constrained estimates. ^modify^ is not permitted for 'internal' estimation commands (e.g., ^logit/logistic^, ^ologit^, ^cox/stcox^). Examples -------- . ^logit y x1 x2 x3 x4^ . ^constr def 1 x1+x2+x3+x4=0^ . ^linest, c(1)^ (estimate model s.t. constraint 1) . ^const def 2 x1=x2^ . ^linest, c(1,2)^ (estimate model s.t. constraints 1 and 2) Remarks ------- Currently, Stata supports constrained estimation in a limited number of models, namely linear regression (^cnsreg^), multinomial logistic regression (^mlogit^) and simultaneous equations (^reg3^). I expect that all of Stata's official commands support linear constraints, one day. This is the desired situation indeed. But for now, and for user-written command for which the trouble to add code to deal with constraints may be excessive, we supply a solution. This is based on the theory of equality-constrained estimation that states that that the constrained estimation program (1) max l(b,x) subject to G b = a is first-order equivalent to the 2-stage program (2.1) max l(b,x) without constraints let bu be the unconstrained l-extremum estimator of b with asymptotic variance matrix Vu (2.2) minimize (bu-b)' Inv(Vu) (bu-b) subject to G b = a For the linear regression with linear constraints case, the equivalence is even exact. (The estimated coefficients from ^cnsreg^ and ^regres/linest^ are (should be) identical, but the estimated standard errors will differ somewhat as a consequence of the asymptotic (large sample) nature of the equivalence of constrained and two-stage estimation.) For other models the equivalence is asymptotic. In fact, the asymptotic equivalence applies even to smooth nonlinear constraints. At this moment Stata does not contain an efficient tool for non-linear GLS-estimation, and I don't want to make this large investment now. I plan to provide a number of commands for imposing for specific non-linear constraints: rank restrictions (e.g., factor-analytic models for interaction effects, Goodman's rc models, ..), Sobel's diagonal reference constraints. Acknowledgements ---------------- This research is support by grant PGS 50-370 from the Netherlands Organization for Scientific Research. I thank Vince Wiggens (StataCorp) for helpful suggestions on linking linest-results to the rest of Stata. References ---------- Gourieroux, C. and A. Monfort (1995/1998) Statistics and Econometric Models. 2 Volumes. Cambridge University Press. Silvey, S.D. (1970) Statistical Inference. London: Chapman and Hall. Author ------ Jeroen Weesie Utrecht University, Netherlands J.Weesie@@fss.uu.nl Also See -------- STB: STB-47 sg100 On-line: ^help^ for @constraint@, @test@, @testparm@, @testnl@.