Stata 15 help for ml_score

Title

ml score -- Generating scores after maximum likelihood estimation

Syntax

Syntax for the scores from a specified equation:

ml score newvar [if] [in] [, equation(eqname) missing ]

Syntax for the scores from all equations:

ml score newvarlist [if] [in] [, missing]

ml score [type] stub* [if] [in] [, missing]

Description

ml score creates new variables containing the equation-level scores. The variables generated by ml score are equivalent to those generated by specifying the score() to ml maximize (and ml model ... , ... maximize).

Options

equation(eqname) identifies from which equation the observation scores are to come. This option may be used only when generating one variable.

missing specifies that observations containing variables with missing values not be eliminated from the estimation sample.

Remarks

ml score is always allowed when used after estimation commands that use method lf likelihood evaluators.

It is an error to call ml score after estimation commands that do not use method lf, d1, or d2 likelihood evaluators.

Examples

Single-equation model:

. poisson accidents . ml score score

Two-equation model (generates variables sc_1 and sc_2):

. nbreg deaths coh2 coh3, exposure(obstime) . ml score sc_*

or

. nbreg deaths coh2 coh3, exposure(obstime) . ml score sc_1, equation(#1) . ml score sc_2, equation(#2)


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index