SHAZAM Confidence Intervals

## Confidence Intervals

The `CONFID` command computes confidence intervals using the estimated coefficients and standard errors from the previous estimation. With OLS estimation, the general format of commands is:

 ```OLS depvar indeps CONFID indeps / options ```

where `indeps` is a list of the explanatory variables and `options` is a list of desired options. On the `CONFID` command, the variable names actually represent the coefficients for which interval estimates are required. The variable names listed on the `CONFID` command must be entered as explanatory variables on the estimation command. The variable name `CONSTANT` can also be specified to obtain an interval estimate for the intercept coefficient. A useful option is:

 ` TCRIT= ` Specifies the t-distribution critical values for calculating confidence intervals. If this option is not specified then SHAZAM computes 90% and 95% confidence intervals.

Suppose the regression equation has N observations and K coefficients. For a parameter estimate b with estimated standard error se(b) the 100(1`-`)% confidence interval estimate is:

[b `-` t se(b) , b + t se(b)]

where t is the `/`2 critical value from a t-distribution with N`-`K degrees of freedom.

SHAZAM computes 90% and 95% confidence intervals using the critical values of the t-distribution that are tabulated in econometrics textbooks. Alternatively, the user can specify critical values with the `TCRIT=` option on the `CONFID` command.

#### Example

This example uses the Theil textile data set. The textile demand equation is specified in log-log form. The commands (filename: `CONFID.SHA`) below obtain 90% and 95% interval estimates for the coefficients.

```SAMPLE 1 17
READ (THEIL.txt) YEAR CONSUME INCOME PRICE
* Transform the data to logarithms
GENR LC=LOG(CONSUME)
GENR LY=LOG(INCOME)
GENR LP=LOG(PRICE)
* Estimate the log-log model
OLS LC LY LP / LOGLOG
CONFID LY LP CONSTANT
STOP
```

The `CONFID` command specifies the variable name `CONSTANT`. SHAZAM will then compute an interval estimate for the intercept coefficient as well as for the slope coefficients.

The SHAZAM output can be viewed. The estimated coefficient on the variable `LP` has an interpretation as a price elasticity. The estimation results show that the point estimate for the price elasticity is: `-.83`. (For presentation purposes the numerical results are rounded to 2 decimal places). The 90% interval estimate is:

```         [-.89, -.77]
```

The 95% interval estimate for the price elasticity is:

```         [-.91, -.75]
```

The next example computes 99% interval estimates. The `DISTRIB` command is used to obtain an appropriate critical value for the interval estimates. The general command format for obtaining critical values of the t-distribution is:

 `DISTRIB prob / INVERSE TYPE=T DF=df CRITICAL=crit `

where `prob` is a variable that contains tail area probabilities and `df` is the degrees of freedom. The `CRITICAL=` option can be used to save the critical values in the variable specified. This is shown in the commands (filename: `CONFID1.SHA`) below.

```SAMPLE 1 17
READ (THEIL.txt) YEAR CONSUME INCOME PRICE
* Transform the data to logarithms
GENR LC=LOG(CONSUME)
GENR LY=LOG(INCOME)
GENR LP=LOG(PRICE)
* Get the critical value to use for interval estimates
SAMPLE 1 1
GEN1 ALPHA=.01
GEN1 A2=ALPHA/2
DISTRIB A2 / INVERSE TYPE=T DF=14 CRITICAL=Z
* Compute point estimates and interval estimates
SAMPLE 1 17
OLS LC LY LP / LOGLOG
CONFID LY LP CONSTANT / TCRIT=Z
STOP
```

The SHAZAM output can be viewed. The `DISTRIB` command uses a numerical algorithm to compute critical values. The critical value is computed as `2.9774`. When rounded to 3 decimal places, this is identical to the value given in statistical tables in textbooks.

The 99% interval estimate for the price elasticity is:

```         [-.94, -.72]
```

[SHAZAM Guide home]

#### SHAZAM output - 90% and 95% interval estimates

``` |_SAMPLE 1 17
|_READ (THEIL.txt) YEAR CONSUME INCOME PRICE

UNIT 88 IS NOW ASSIGNED TO: THEIL.txt
4 VARIABLES AND       17 OBSERVATIONS STARTING AT OBS       1

|_* Transform the data to logarithms
|_GENR LC=LOG(CONSUME)
|_GENR LY=LOG(INCOME)
|_GENR LP=LOG(PRICE)

|_* Estimate the log-log model
|_OLS LC LY LP / LOGLOG

OLS ESTIMATION
17 OBSERVATIONS     DEPENDENT VARIABLE = LC
...NOTE..SAMPLE RANGE SET TO:    1,   17

R-SQUARE =    .9744     R-SQUARE ADJUSTED =    .9707
VARIANCE OF THE ESTIMATE-SIGMA**2 =   .97236E-03
STANDARD ERROR OF THE ESTIMATE-SIGMA =   .31183E-01
SUM OF SQUARED ERRORS-SSE=   .13613E-01
MEAN OF DEPENDENT VARIABLE =   4.8864
LOG OF THE LIKELIHOOD FUNCTION(IF DEPVAR LOG) = -46.5862

VARIABLE   ESTIMATED  STANDARD   T-RATIO        PARTIAL STANDARDIZED ELASTICITY
NAME    COEFFICIENT   ERROR      14 DF   P-VALUE CORR. COEFFICIENT  AT MEANS
LY         1.1432      .1560       7.328      .000  .891      .3216     1.1432
LP        -.82884      .3611E-01  -22.95      .000 -.987    -1.0074     -.8288
CONSTANT   3.1636      .7048       4.489      .001  .768      .0000     3.1636

|_CONFID LY LP CONSTANT
USING 95% AND 90% CONFIDENCE INTERVALS

CONFIDENCE INTERVALS BASED ON T-DISTRIBUTION WITH  14 D.F.
- T CRITICAL VALUES =   2.145 AND   1.761
NAME   LOWER 2.5%   LOWER 5%   COEFFICIENT   UPPER 5%   UPPER 2.5%   STD. ERROR
LY         .8085       .8684       1.1432       1.418       1.478        .156
LP        -.9063      -.8924      -.82884      -.7652      -.7514        .036
CONSTANT   1.652       1.922       3.1636       4.405       4.675        .705
|_STOP
```

#### SHAZAM output - 99% interval estimates for regression coefficients

``` |_SAMPLE 1 17
|_READ (THEIL.txt) YEAR CONSUME INCOME PRICE

UNIT 88 IS NOW ASSIGNED TO: THEIL.txt
4 VARIABLES AND       17 OBSERVATIONS STARTING AT OBS       1

|_* Transform the data to logarithms
|_GENR LC=LOG(CONSUME)
|_GENR LY=LOG(INCOME)
|_GENR LP=LOG(PRICE)

|_* Get the critical value to use for interval estimates
|_SAMPLE 1 1
|_GEN1 ALPHA=.01
|_GEN1 A2=ALPHA/2
|_DISTRIB A2 / INVERSE TYPE=T DF=14 CRITICAL=Z
T DISTRIBUTION DF=   14.000
VARIANCE=   1.1667       H=   1.0000

PROBABILITY CRITICAL VALUE   PDF
A2
ROW     1     .50000E-02  2.9774      .98931E-02

|_* Compute point estimates and interval estimates
|_SAMPLE 1 17
|_OLS LC LY LP / LOGLOG

OLS ESTIMATION
17 OBSERVATIONS     DEPENDENT VARIABLE = LC
...NOTE..SAMPLE RANGE SET TO:    1,   17

R-SQUARE =    .9744     R-SQUARE ADJUSTED =    .9707
VARIANCE OF THE ESTIMATE-SIGMA**2 =   .97236E-03
STANDARD ERROR OF THE ESTIMATE-SIGMA =   .31183E-01
SUM OF SQUARED ERRORS-SSE=   .13613E-01
MEAN OF DEPENDENT VARIABLE =   4.8864
LOG OF THE LIKELIHOOD FUNCTION(IF DEPVAR LOG) = -46.5862

VARIABLE   ESTIMATED  STANDARD   T-RATIO        PARTIAL STANDARDIZED ELASTICITY
NAME    COEFFICIENT   ERROR      14 DF   P-VALUE CORR. COEFFICIENT  AT MEANS
LY         1.1432      .1560       7.328      .000  .891      .3216     1.1432
LP        -.82884      .3611E-01  -22.95      .000 -.987    -1.0074     -.8288
CONSTANT   3.1636      .7048       4.489      .001  .768      .0000     3.1636

|_CONFID LY LP CONSTANT / TCRIT=Z

CONFIDENCE INTERVALS BASED ON T-DISTRIBUTION WITH  14 D.F.
- T CRITICAL VALUE =   2.977
NAME        LOWER     COEFFICIENT     UPPER       STD. ERROR
LY         .67868       1.1432       1.6076       .15600
LP        -.93636      -.82884      -.72132       .36111E-01
CONSTANT   1.0651       3.1636       5.2620       .70480
|_STOP
```