Thanks to Kit Baum, a new package called lmtest is available on SSC.
lmtest performs a Lagrange-multiplier (LM) test (Silvey, 1959), also referred to as score test, of the restrictions that were previously imposed on the most recently estimated model by specifying the option constraints(). lmtest complements test and lrtest that implement the Wald test and the likelihood-ratio test, respectively, which - together with the Lagrange-multiplier test - represent the three canonical approaches to testing hypotheses after maximum-likelihood (ML) estimation (cf. Greene, 2012, p. 564). lmtest requires that the preceding estimation command allows the option constraints() and the maximize_options iterate() and from(), and also requires that the constraints are saved in e(Cns) and the score vector is saved in e(gradient). Unlike test, the syntax of lmtest does not involve specifying the restrictions to be tested. The restrictions are rather specified by the option constraints() in the command syntax used for estimating the model. This corresponds to the logic of the Lagrange-multiplier test to estimate only the restricted version of a model. The LM-test statistic reads simply as score*inv(Info)*score', with the estimated score vector (score) and the estimated inverse information matrix (inv(Info)) being evaluated at the restricted maximum. lmtest calculates the estimated score vector and the coefficient variance-covariance matrix, which serves as estimator for inv(Info), at the restricted maximum by making use of the maximize_options iterate(0) and from(e(b)). For determining the number of degrees-of-freedom, lmtest considers all restrictions that are specified in e(Cns), except for base-level coefficients being restricted to the value of zero. indepvars that are automatically omitted due to collinearity may hence distort the result of the LM test. Specifying the option df(#) allows manually providing the appropriate number of degrees-of-freedom. Alternatively, one may specify the option noomitted to prevent lmtest from interpreting omitted variables as exclusion restrictions to be tested.
References:
Silvey, S. D. (1959). The Lagrangian Multiplier Test. Annals of Mathematical Statistics 30, 389-407.
Greene, W. H. (2012). Econometric Analysis, Pearson, 7th ed.
Best wishes,
Harald
________________________________________
Harald Tauchmann
Friedrich-Alexander-Universität Erlangen-Nürnberg
Professur für Gesundheitsökonomie
Findelgasse 7/9
90402 Nürnberg
Germany
lmtest performs a Lagrange-multiplier (LM) test (Silvey, 1959), also referred to as score test, of the restrictions that were previously imposed on the most recently estimated model by specifying the option constraints(). lmtest complements test and lrtest that implement the Wald test and the likelihood-ratio test, respectively, which - together with the Lagrange-multiplier test - represent the three canonical approaches to testing hypotheses after maximum-likelihood (ML) estimation (cf. Greene, 2012, p. 564). lmtest requires that the preceding estimation command allows the option constraints() and the maximize_options iterate() and from(), and also requires that the constraints are saved in e(Cns) and the score vector is saved in e(gradient). Unlike test, the syntax of lmtest does not involve specifying the restrictions to be tested. The restrictions are rather specified by the option constraints() in the command syntax used for estimating the model. This corresponds to the logic of the Lagrange-multiplier test to estimate only the restricted version of a model. The LM-test statistic reads simply as score*inv(Info)*score', with the estimated score vector (score) and the estimated inverse information matrix (inv(Info)) being evaluated at the restricted maximum. lmtest calculates the estimated score vector and the coefficient variance-covariance matrix, which serves as estimator for inv(Info), at the restricted maximum by making use of the maximize_options iterate(0) and from(e(b)). For determining the number of degrees-of-freedom, lmtest considers all restrictions that are specified in e(Cns), except for base-level coefficients being restricted to the value of zero. indepvars that are automatically omitted due to collinearity may hence distort the result of the LM test. Specifying the option df(#) allows manually providing the appropriate number of degrees-of-freedom. Alternatively, one may specify the option noomitted to prevent lmtest from interpreting omitted variables as exclusion restrictions to be tested.
References:
Silvey, S. D. (1959). The Lagrangian Multiplier Test. Annals of Mathematical Statistics 30, 389-407.
Greene, W. H. (2012). Econometric Analysis, Pearson, 7th ed.
Best wishes,
Harald
________________________________________
Harald Tauchmann
Friedrich-Alexander-Universität Erlangen-Nürnberg
Professur für Gesundheitsökonomie
Findelgasse 7/9
90402 Nürnberg
Germany
Comment