*! version 2.0.0 July 2019 Fernando Rios Avila

Title

vc_test -- Command used to implement J-Statistic Wild Bootstrap specification test.

Syntax

vc_test
[varlist]
[if] [in]
[, vcoeff(varname) options]

Main
vcoeff(varname) Indicates the variable to be used for the estimation of smooth varying coefficients. The default option is to use the stored variable in global $vcoeff_ after using vc_bw or vc_bwalt

bw(#) Used to provide a Bandwidth for the estimation of the varying coefficient model. The default option is to use the stored value in global $opbw_ after using vc_bw or vc_bwalt

kernel(kernel) Indicates which kernel function to be used in the varying coefficient model. The default option is to use the stored value in global $kernel_ after using vc_bw or vc_bwalt

knots(#) This option request the estimation of #k bins that will be used for the estimation og the predicted values, and specification tests. The default is to use all distinct values in vcoeff.
Using this option provides gains in speed at a cost of lower precision. When knots(0) is specified, the number of knots is given by 2*min(sqrt(N), 10*ln(N)/ln(10).

km(#) This option is ment to be used in combination with knots(0). When used, it requests to use knots=km* min(sqrt(N), 10*ln(N)/ln(10). Default its km(2)

degree(#) Specifies the alternative parametric model will be used as null hypothesis agains the SVCM. Model 0 to 3 follow the same specification as vc_predict approximate F-test

wbsrep(#) Specifies the number of Wildbootstrap samples to used. Default is 50 repetitions.

All kernel functions are allowed.

kernel

gaussian Gaussian kernel function; The default

epan Epanechnikov kernel function

epan2 alternative Epanechnikov kernel function

biweight biweight kernel function

cosine cosine trace kernel function

parzen Parzen kernel function

rectan rectangle kernel function

trian triangle kernel function

Description

vc_test implements the specification test proposed by Cai, Fan, and Yao (2000), based on a wild bootstrapped approach, as described in Henderson and Parmeter (2015).
The test statistic is constructed in a similar way as an F-statistic, but without adjusting for degrees of freedom.

The wildbootstrap procedure is implemented under the null that the parametric model is correctly specified, and the empirical distribution of J is used to find critical values
to evaluate the null hypothesis.

The parametric model is defined using degree(#), where each model is defined as follows:

Model 0 y=xb0+gz+e

Model 1 y=xb0+gz+(z*x)b1+e

Model 2 y=xb0+gz+(z*x)b2+(z^2*x)b2+e

Model 3 y=xb0+gz+(z*x)b2+(z^2*x)b2+(z^3*x)b3+e

See Rios-Avila (2019) for details.

Examples

* Specification test example
webuse motorcycle, clear
vc_bw accel, vcoeff(time)
vc_test accel, vcoeff(time) degree(0)
vc_test accel, vcoeff(time) degree(1)
vc_test accel, vcoeff(time) degree(2)
vc_test accel, vcoeff(time) degree(3)

webuse dui, clear
vc_bw citations taxes i.csize college , vcoeff(fines)

vc_test citations taxes i.csize college , vcoeff(fines ) degree(0)
vc_test citations taxes i.csize college , vcoeff(fines ) degree(0) wbsrep(100)

vc_test citations taxes i.csize college , vcoeff(fines ) degree(1)
vc_test citations taxes i.csize college , vcoeff(fines ) degree(1) wbsrep(100)

vc_test citations taxes i.csize college , vcoeff(fines ) degree(2)
vc_test citations taxes i.csize college , vcoeff(fines ) degree(2) wbsrep(100)

Author

Fernando Rios-Avila

Levy Economics Institute of Bard College

Blithewood-Bard College

Annandale-on-Hudson, NY

friosavi@levy.org

References

Cai, Zongwu, Jianqing Fan, and Qiwei Yao. 2000. "Functional-Coefficient Regression Models for Nonlinear Time Series." Journal of the American Statistical Association 95 (451):941-956.
Hastie, Trevor, and Robert Tibshirani. 1990. Generalized Additive Models. New York: Chapman and Hall.
Hastie, Trevor, and Robert Tibshirani. 1993. "Varying-Coefficient Models." Journal of the Royal Statistical Society. Series B (Methodological) 55 (4):757-796.
Henderson, Daniel J., and Christopher F. Parmeter. 2015. Applied Nonparametric Econometrics. Cambridge, United Kingdom: Cambridge University Press.
Li, Qi, and Jeffrey Scott Racine. 2007. Nonparametric Eonometrics: Theory and Practice. New Jersey: Princeton University Press.
Li, Qi, and Jeffrey Scott Racine. 2010. "Smooth Varying-Coefficient Estimation and Inference for Qualitative and Quantitative Data." Econometric Theory 26 (6):1607-1637.
Rios-Avila, Fernando (2019) Smooth varying coefficient models in Stata. Working paper. vc_pack paper