Title
semipar
Syntax
Robinson's (1988) semiparametric regression estimator
semipar varlist [if] [in] [weight], nonpar(varname) [options]
options Description ------------------------------------------------------------------------- Model nonpar(varname) Specifies the variable that enters the model nonlinearly generate(varname) Generate the nonparametric fit of the dependent variable partial(varname) Generate the dependent variable partialled out from the parametric fit degree(#) Specifies the degree of the local weighted polynomial fit used in the kernel; default is 1 (see lpoly) trim(#) Specifies the level of trimming for the pdf of the variable entering the model nonlinearly; default is 0 (no trimming) kernel(kernel) Specifies kernel function; default is kernel(gaussian) ------------------------------------------------------------------------- Kernels gaussian Gaussian kernel function, the default epanechnikov Epanechnikov kernel function epan2 Alternative epanechnikov kernel function biweight Biweight kernel function cosine Cosine trace kernel function parzen Parzen kernel function rectangle Rectangle kernel function triangle Triangle kernel function ------------------------------------------------------------------------- Graphics nograph Prevents from showing the graph of the nonparametric fit ci Shows the confidence interval around the nonparametric fit title() Specifies the title of the graph for the nonparametric fit ytitle() Specifies the label of y-axis in the graph of the nonparametric fit xtitle() Specifies the label of x-axis in the graph of the nonparametric fit ------------------------------------------------------------------------- Standard errors robust Uses the sandwich variance formula to compute standard errors of the estimated parameters cluster(varname) Computes clustered-corrected standard errors of the estimated parameters ------------------------------------------------------------------------- Specification test test(#) Computes Hardle and Mammen's (1993) specification test to assess if the nonparametric fit can be approximated by a parametric adjustment of order (#). With the cluster option specified, bootstrap sample of clusters are drawn
nsim(#) Specifies the number of bootstrap replicates to be done to do inference on the test; default is 100
weight_test() Allows to weight the distance between the nonparametric and parametric fits for the test; default is 1/n.
level(#) Specifies the level of confidence for inference; default is level(95) ------------------------------------------------------------------------- fweights and aweights are allowed; see weight
Description
semipar estimates the Robinson's (1988) double residual estimator and estimates the nonlinear relation between the variable set in nonpar and the dependent variable. The nonparametric estimator used is a gaussian kernel weighted local polynomial fit.
Besides, the test option allows the user to assess whether a polynomial adjustment could be used to approximate the nonparametric fit.
Examples
. use http://fmwww.bc.edu/ec-p/data/wooldridge/HPRICE3 . gen lprice =log(price) . semipar lprice ldist larea lland rooms bath age, nonpar(linst) xtitle(linst) ci
Same as above, but testing for the appropriateness of a polynomial adjustment o > f order 2 for linst
. semipar lprice ldist larea lland rooms bath age, nonpar(linst) xtitle(linst) ci test(2)
References
Hardle W., E. Mammen (1993), Comparing nonparametric versus parametric regressi > on fits, Annals of Statistics, 21, 1926-1947.
Robinson P.M. (1988), Root-N consistent semiparametric regression, Econometrica > , 56, 931-954.