*! version 1.1.1 16mar2021

*! Sebastian Kripfganz, www.kripfganz.de

*! Jan F. Kiviet, sites.google.com/site/homepagejfk/

Title

kinkyreg postestimation -- Postestimation tools for kinkyreg

Postestimation commands

The following postestimation commands are of special interest after kinkyreg:

Command Description

estat test perform test of linear hypotheses

estat exclusion perform test of exclusion restrictions

estat reset perform the Ramsey regression specification error test

estat hettest perform test for heteroskedasticity

estat durbinalt perform Durbin's alternative test for serial correlation

estat rcr compute sensitivity parameters for RCR estimation

The following standard postestimation commands are available after kinkyreg with option correlation(#):

Command Description

estat VCE and estimation sample summary

predict predictions, residuals, influence statistics, and other diagnostic measures

Syntax for predict

predict [type] newvar [if] [in] [, statistic]

statistic

Main
xb calculate linear prediction; the default

residuals calculate the residuals

stdp calculate standard error of the prediction

Description for predict

predict creates a new variable containing predictions such as fitted values, residuals, and standard errors based on the postulated endogeneity correlation specified in option correlation(#) of kinkyreg.

Options for predict

Main

xb calculates the linear prediction from the fitted model; see [R] predict. This is the default.

residuals calculates the residuals from the fitted model.

stdp calculates the standard error of the linear prediction; see [R] predict.

Syntax for estat

Test of linear hypotheses

estat test (test_spec) [(test_spec) ...]
[, test_options graph_options]

Test of exclusion restrictions

estat exclusion [varlist] [, excl_options graph_options]

Ramsey regression equation specification error test

estat reset [, reset_options graph_options]

Tests for heteroskedasticity

estat hettest [(varlist) (varlist) ...] [, hett_options graph_options]

Durbin's alternative test for serial correlation

estat durbinalt [, dur_options graph_options]

Sensitivity parameters for relative correlation restriction estimation

estat rcr [, rcr_options graph_options]

test_options

Model
test_options standard options of the test command

Reporting
correlation(#) postulated endogeneity for test output

excl_options

Model
nojoint do not compute joint exclusion test

noindividual do not compute individual exclusion tests

ekurtosis(#) specify kurtosis of error term

xkurtosis(#) specify kurtosis of right-hand side variables

Reporting
correlation(#) postulated endogeneity for test output

level(#) set confidence level; default is level(95)

notable suppress results table

reset_options

Model
xb use fitted values; the default

rhs use right-hand side variables

order(numlist) specify polynomial orders

ekurtosis(#) specify kurtosis of error term

xkurtosis(#) specify kurtosis of right-hand side variables

Reporting
correlation(#) postulated endogeneity for test output

hett_options

Model
xb use fitted values

rhs add right-hand side variables

Reporting
minp show minimum p-value for individual variables

correlation(#) postulated endogeneity for test output

dur_options

Model
order(numlist) specify serial correlation lag orders

ekurtosis(#) specify kurtosis of error term

xkurtosis(#) specify kurtosis of right-hand side variables

Reporting
correlation(#) postulated endogeneity for test output

rcr_options

Model
lambda compute sensitivity parameter of Krauth (2016)

delta compute sensitivity parameter of Oster (2019)

Reporting
correlation(#) postulated endogeneity for parameter output

graph_options

Reporting
twoway(twoway_spec) specify options for twoway graphs

pvalplot(pvalplot_spec) specify options for p-value or parameter plots

nograph suppress creation of graph

test_spec is one of

coeflist

exp = exp [= exp]

twoway_spec is

[, twoway_options yrange(#_1 #_2) addplot(plot)]

pvalplot_spec is

[name|#] [, line_options recast(newplottype)]

Description for estat

estat test computes linear hypotheses tests; see [R] test.

estat exclusion computes Wald tests for the valid exclusion of the variables in varlist from the KLS regression, as described by Kiviet (2020).
These are Wald tests for individual and joint insignificance after a KLS estimation of the regression model augmented with the respective variables.
The p-values of the tests are graphically shown over the range of postulated endogeneity correlations used to compute the KLS estimates with kinkyreg.
The null hypothesis is that the exclusion restrictions are valid. By default, varlist are the instrumental variables specified with kinkyreg.

estat reset computes the Ramsey (1969) regression equation specification error test.
These are Wald tests for joint insignificance after a KLS estimation of the regression model augmented with powers of the fitted values or the right-hand side variables.
The p-values of the tests are graphically shown over the range of postulated endogeneity correlations used to compute the KLS estimates with kinkyreg. The null hypothesis is that the regression model is correctly specified.

estat hettest computes the Breusch and Pagan (1979) tests for heteroskedasticity of the KLS error term. These are Wald tests in an auxiliary regression of the squared residuals separately on each specified varlist.
The p-values of the tests are graphically shown over the range of postulated endogeneity correlations used to compute the KLS estimates with kinkyreg. The null hypothesis is that the errors are homoskedastic.

estat durbinalt computes the alternative test of Durbin (1970) for serial correlation of the KLS error term. These are Wald tests for joint insignificance after a KLS estimation of the regression model augmented with lagged residuals.
The p-values of the tests are graphically shown over the range of postulated endogeneity correlations used to compute the KLS estimates with kinkyreg. The null hypothesis is that their is no serial correlation up to the specified order.
This test requires time series data.

estat rcr computes the sensitivity parameters lambda and delta for the relative correlation restriction (RCR) estimators of Krauth (2016) and Oster (2019), respectively.
For a given value of the endogeneity correlation, the KLS estimates can be replicated with the RCR estimators by using the corresponding values for these sensitivity parameters.

Options for estat

Model

nojoint requests not to compute the joint exclusion test of all variables.

noindividual requests not to compute the individual exclusion tests for each variable.

xb requests to use the fitted values. Only the exogenous variation of the endogenous right-hand side variable is used to compute the fitted values.

With estat reset, powers of the fitted values are used. This is the default.

With estat hettest, a test with fitted values only is computed, in addition to tests with other specified varlists, if any. This option is the default if no varlists are specified.

rhs requests to use the right-hand side variables of the fitted regression model. Only the exogenous variation of the endogenous variable is used.

With estat reset, powers of the individual right-hand side variables are used instead of the fitted values.

With estat hettest, the right-hand side variables are added to each varlist. This option allows varlist to be empty but parentheses are still required if multiple varlists are specified.

order(numlist) specifies the orders to be used for the test. A separate test is computed for each value in numlist.

With estat reset, these are the polynomial orders of the fitted values or right-hand side variables. The default is order(2 3 4).

With estat durbinalt, these are the maximum lag orders of the residuals. The default is order(1).

ekurtosis(#) specifies a value for the kurtosis of the error term to be used in the variance calculation. By default, the kurtosis is estimated based on the KLS estimates.

xkurtosis(#) specifies a value for the kurtosis of the independent variables to be used in the variance calculation. By default, the maximum of the estimated kurtosis for all right-hand side variables is used.

lambda and delta request to either compute Krauth's lambda or Oster's delta for the replication of the KLS estimates with the respective RCR estimator. By default, both sensitivity parameters are computed.

Reporting

minp returns for each endogeneity correlation the minimum p-value of individual significance tests among all variables in the respective variable list.
By default, estat hettest computes joint significance tests of all variables in the auxiliary regression.

correlation(#) requests to display test results or parameter values for the specified endogeneity correlation. If # does not match a value on the estimation grid, the results for the closest grid point to # are displayed.

level(#); see [R] estimation options.

twoway([, twoway_options yrange(#_1 #_2) addplot(plot)]) specifies options for twoway graphs; see [G-2] graph twoway.

If the twoway option name(name) is not specified, name(namestub_test, replace) is assumed,
where test is either test, excl, reset, hett, dur, or rcr, according to the minimum abbreviation of the respective estat subcommand.
The prefix is set with the kinkyreg option namestub(namestub).

yrange(#_1 #_2) specifies that the p-value or parameter value plots be restricted to the interval [#_1, #_2] on the y axis.
A missing value for #_1 or #_2 refers to minus or plus infinity, respectively.

addplot(plot) allows to overlay the twoway graph with additional plots; see addplot_option.

pvalplot([name|#] [, line_options recast(newplottype)]) determines the look of the p-value or parameter value plots.
By default, these are options for twoway line plots; see [G-2] graph twoway line.

With estat test, neither name nor # must be specified.

With estat exclusion, name must be a variable name for the individual exclusion tests. For the joint exclusion test, name must not be specified.

With estat reset or estat durbinalt, # must be the integer value of an order specified with option order().

With estat hettest, # must be the integer value referring to the #-th specified varlist. If option xb was specified, the corresponding test is ordered last.

With estat rcr, name must be lambda for Krauth's lambda or delta for Oster's delta.

recast(newplottype) allows to treat the plot as newplottype instead of a line plot; see advanced_options.

nograph suppresses the creation of the graph for KLS inference.

notable suppresses display of the results table.

Example

Setup

. use http://www.stata-press.com/data/imeus/griliches

Graphical inference for KLS estimation

. kinkyreg lw s expr tenure rns smsa _I* (kww = iq), range(-0.7 0.7)

Graphical inference for linear hypothesis test

. estat test expr = tenure

Graphical inference for the exclusion restrictions tests

. estat exclusion

. estat exclusion age mrt

Graphical inference for the RESET test

. estat reset, order(2 3)

. estat reset, rhs order(2 3)

Graphical inference for the heteroskedasticity test

. estat hettest () (iq), xb rhs

. estat hettest () (iq), rhs minp

Authors

Sebastian Kripfganz, University of Exeter, http://www.kripfganz.de

Jan F. Kiviet, University of Amsterdam, https://sites.google.com/site/homepagejfk/

References

Breusch, T. S., and A. R. Pagan. 1979.
A simple test for heteroscedasticity and random coefficient variation.
Econometrica 47: 1287-1294.

Durbin, J. 1970.
Testing for serial correlation in least-squares regression when some of the regressors are lagged dependent variables.
Econometrica 38: 410-421.

Kiviet, J. F. 2020.
Testing the impossible: identifying exclusion restrictions.
Journal of Econometrics 218: 294-316.

Kiviet, J. F. 2020.
Instrument-free inference under confined regressor endogeneity and mild regularity.
Stellenbosch Economic Working Papers: WP09/2020.

Krauth, B. 2016.
Bounding a linear causal effect using relative correlation restrictions.
Journal of Econometric Methods 5: 117-141.

Oster, E. 2019.
Unobservable selection and coefficient stability: Theory and evidence.
Journal of Business & Economic Statistics 37: 187-204.

Ramsey, J. B. 1969.
Tests for specification errors in classical linear least-squares regression analysis.
Journal of the Royal Statistical Society, Series B 31: 350-371.