Stata 11 help for nlcom

help nlcom dialog: nlcom -------------------------------------------------------------------------------

Title

[R] nlcom -- Nonlinear combinations of estimators

Syntax

Nonlinear combination of estimators -- one expression

nlcom [name:]exp [, options]

Nonlinear combinations of estimators -- more than one expression

nlcom ([name:]exp) [([name:]exp) ...] [, options]

The second syntax means that if more than one expression is specified, each must be surrounded by parentheses. exp is any function of the parameter estimates that is valid syntax for testnl. However, exp may not contain an equal sign or a comma. The optional name is any valid Stata name and labels the transformation.

options description ------------------------------------------------------------------------- level(#) set confidence level; default is level(95) iterate(#) maximum number of iterations post post estimation results + noheader suppress output header ------------------------------------------------------------------------- + noheader does not appear in the dialog box.

Menu

Statistics > Postestimation > Nonlinear combinations of estimates

Description

nlcom computes point estimates, standard errors, test statistics, significance levels, and confidence intervals for (possibly) nonlinear combinations of parameter estimates after any Stata estimation command. Results are displayed in the usual table format used for displaying estimation results. Calculations are based on the "delta method", an approximation appropriate in large samples.

nlcom can be used with svy estimation results; see [SVY] svy postestimation.

Options

level(#) specifies the confidence level, as a percentage, for confidence intervals. The default is level(95) or as set by set level.

iterate(#) specifies the maximum number of iterations used to find the optimal step size in calculating numerical derivatives of the transformations with respect to the original parameters. By default, the maximum number of iterations is 100, but convergence is usually achieved after only a few iterations. You should rarely have to use this option.

post causes nlcom to behave like a Stata estimation (eclass) command. When post is specified, nlcom will post the vector of transformed estimators and its estimated variance-covariance matrix to e(). This option, in essence, makes the transformation permanent. Thus you could, after posting, treat the transformed estimation results in the same way as you would treat results from other Stata estimation commands. For example, after posting, you could redisplay the results by typing nlcom without any arguments, or use test to perform simultaneous tests of hypotheses on linear combinations of the transformed estimators.

Specifying post clears out the previous estimation results, which can be recovered only by refitting the original model or by storing the estimation results before running nlcom and then restoring them; see [R] estimates store.

The following option is available with nlcom but is not shown in the dialog box:

noheader suppresses the output header.

Comparison with lincom

nlcom is a generalization of lincom that allows the estimation of nonlinear transformations of model parameters. In cases where you are estimating one transformation and that transformation is linear, use lincom; it is faster. However, when estimating more than one linear transformation or combinations of linear and nonlinear transformations, using nlcom has the added benefit that you can obtain the variance-covariance matrix (which is saved in r(V)) of the joint transformation. lincom does not allow the simultaneous estimation of multiple linear combinations.

Remark on the manipulability of nonlinear Wald tests

In contrast to likelihood-ratio tests, different -- mathematically equivalent -- formulations of a hypothesis may lead to different results for a nonlinear Wald test (lack of "invariance"). For instance, the two hypotheses

H0: coefficient = 0

H0: exp(coefficient) - 1 = 0

are mathematically equivalent expressions but do not yield the same test statistic and p-value. In extreme cases, under one formulation, one would reject H0, whereas under an equivalent formulation one would not reject H0.

Examples

--------------------------------------------------------------------------- Setup . webuse regress

Fit linear regression model . regress y x1 x2 x3

Estimate the product of the coefficients on x2 and x3 . nlcom _b[x2]*_b[x3]

Estimate the ratios of the coefficients on x1 and x2 and on x2 and x3 jointly . nlcom (ratio1: _b[x1]/_b[x2]) (ratio2: _b[x2]/_b[x3]), post

Test whether the two ratios from above are equal . test _b[ratio1] = _b[ratio2]

--------------------------------------------------------------------------- Setup . webuse sysdsn3

Fit maximum-likelihood multinomial logit model . mlogit insure age male nonwhite site2 site3

Estimate the ratio of the coefficients on the male dummy in the Prepaid and Uninsure equations . nlcom [Prepaid]_b[male] / [Uninsure]_b[male] ---------------------------------------------------------------------------

Saved results

nlcom saves the following in r():

Scalars r(N) number of observations r(df_r) residual degrees of freedom

Matrices r(b) vector of transformed coefficients r(V) estimated variance-covariance matrix of the transformed coefficients

If post is specified, nlcom also saves the following in e():

Scalars e(N) number of observations e(df_r) residual degrees of freedom e(N_strata) number of strata L, if used after svy e(N_psu) number of sampled PSUs n, if used after svy e(rank) rank of e(V)

Macros e(cmd) nlcom e(predict) program used to implement predict e(properties) b V

Matrices e(b) vector of transformed coefficients e(V) estimated variance-covariance matrix of the transformed coefficients e(V_srs) simple-random-sampling-without-replacement (co)variance hat V_srswor, if svy e(V_srswr) simple-random-sampling-with-replacement (co)variance hat V_srswr, if svy and fpc() e(V_msp) misspecification (co)variance hat V_msp, if svy and available

Functions e(sample) marks estimation sample

Also see

Manual: [R] nlcom

Help: [R] lincom, [R] predictnl, [R] test, [R] testnl


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