Point Estimation in Stata

Updated: Mar 16, 2020

After fitting a model and obtaining estimates for the coefficients, you may want to view the predicted average of the dependent variable with specific values of covariates. Today, we want to show you how to do this in three different ways.

I will use automobile dataset as an example. The linear regression I fit is shown below, with mpg being the dependent variable and weight being the independent variable. Stata also gives us the estimated value of the coefficient:

Method 1: Using lincom command

lincom stands for linear combinations of estimators. lincom can display estimates for any linear combination of coefficients. However, lincom will not work on non-linear combinations of coefficients. In the example below, I will show you how to use lincom to obtain the predicted average of mpg given the value of weight equals 3000. To do this, I would type:

The result is:

Note: When you type weight, lincom knows that you mean the coefficient of weight. The formal syntax for referencing this coefficient is _b[weight], or alternatively, _coef[weight]. Thus, more formally, I would have typed:

Method 2: Using display command

The use of display command is similar to using lincom command, however, you will need to use the formal syntax to reference the coefficient. Thus, instead of typing weight, I would type _b[weight]:

Method 3: Using margins command

The margins command estimates margins of responses for specified values of covariates and presents the results as a table. To use margins command, you will need to specify a value of the covariate using the at option if it is a continuous variable. The at option specifies values for covariates to be treated as fixed. For example, to obtain the margins of mpg for weight values equals 3,000, I would type:

The result in Stata is:

439 views0 comments