help xtsemipar                          (François Libois and Vincenzo Verardi)
-------------------------------------------------------------------------------

Title

xtsemipar --- Semi-parametric estimator in panel

Syntax

xtsemipar depvar [indepvars] [if] [in] [weight] , nonpar(varname) [options]

options Description ------------------------------------------------------------------------- Main nonpar(varname) Specifies the variable that enters the model nonlinearly generate([newvar_x] newvar_s) Store fitted values in newvar_x and residuals of the parametric estimation in newvar_s degree(#) Specifies the degree of the local weighted polynomial fit used in the epanechnikov kernel if spline is not specified (see lpoly). If spline is specified, degree specifies the power (or degree) of the splines. If absent, 4 is assumed. (see bspline) knots1(numlist) Specifies a list of at least 2 ascending knots used for the spline interpolation that allows to remove fixed-effects. nograph Suppresses graph

Spline options spline Uses B-splines to perform the non-parametric fit, instead of kernel-weighted local polynomial smoothing, the default option.(see lpoly) knots2(numlist) Specifies a list of at least 2 ascending knots used for the last step spline interpolation which yields the graph.

polynomial smoothing options bwidth(#) Specifies kernel bandwidth

CI/SE robust Specifies that the type of standard error reported are corrected using the Huber/White/sandwich estimator cluster(varname) Specifies that the type of standard error reported are corrected using the clustered sandwich estimator ci Plots confidence bands level(#) Sets confidence level; default is level(95) ------------------------------------------------------------------------- fweights and aweights are allowed; see weight.

Description

xtsemipar estimates Baltagi and Li's (2002) series semi-parametric fixed effects regression estimator. The main options allow to use a classical nonparametric estimator based on an epanechnikov kernel weighted local polynomial fit or a spline interpolation. This last technique yields similar results to the polynomial interpolation but better approximates complex shapes and does not suffer from Runge's phenomenon.

Requirement xtsemipar can only be used if data are declare as panel data, through xtset or tsset command. Before using xtsemipar, Newson's (2000) bspline program has to be installed.

Options

+------+ ----+ Main +-------------------------------------------------------------

nonpar(varname) specify a (continuous) variable that nonlinearly enter the model.

generate([newvar_x] newvar_s) stores the (centered) non-parametric fit evaluated at the values of the nonpar variable. newvar_x stores the (centered) partialled-out residuals, i.e. the part of the dependant variable that is not explained by the parametric part of the estimation. These residuals are used to estimate the local polynomial smooth or the splines. This option is particularly handy if additional tests or estimations has to be done on the residuals of the semi-parametric fit.

degree(#) (a non-negative integer) specifies the degree of the polynomial to be used in the polynomial smoothing or the power of the series estimator in the spline smoothing. If absent 4 is assumed

knots1(numlist) specifies a list of at least two ascending knots on which the splines estimated to remove fixed-effects are based. This option is seldom in use. If knots1 is not specified, bspline will initialize the list to the minimum and maximum of nonpar. The number of knots will then be chosen optimally.

nograph suppresses drawing the graph of the estimated smooth.

+----------------+ ----+ Spline options +---------------------------------------------------

spline specifies that the non-parametric fit will be done by using b-splines (see Newson, 2001). The default option is a kernel-weighted local polynomial fit based on an epanechnikov kernel. Spline interpolation yields similar results to polynomial fit but is more flexible and does not suffer from some weaknesses that affect polynomial fit, such as Runge's phenomenon.

knots2(numlist) specifies a list of at least two ascending knots on which the spline interpolation appearing in the graph are based. This option is seldom in use. If knots2 is not specified, bspline will initialize the list to the minimum and maximum of nonpar. The number of knots will then be chosen optimally.

+------------------------------+ ----+ Polynomial smoothing options +-------------------------------------

bwidth(#) specifies the half-width of the kernel, the width of the smoothing window around each point. If bwidth() is not specified, a rule-of-thumb (ROT) bandwidth estimator is calculated and used.

+-------+ ----+ CI/SE +------------------------------------------------------------

robust uses the Huber/White/sandwich variance estimator to compute standard errors of the estimated parameters. All the inference and confidence intervals will be corrected.

cluster(varname) computes clustered-corrected standard errors of the estimated parameters and adjusts the inference as well as confidence intervals.

ci plots confidence intervals around the polynomial smoothing or the spline. The confidence level used is the one specified in level().

level(#) specifies the confidence level, as a percentage, for confidence intervals. The default is level(95) or as set by set level.

Examples

Setup webuse invest2 gen logi=log(invest) gen logm=log(market) gen logs=log(stock) xtset company time

Fixed-effect semi-parametric regression with default quartic local polynomial smooth for the non-parametric part xi: xtsemipar logi logm i.time, nonpar(logs)

same as above but with quartic spline smoothing, confidence intervals and standard errors clustered at company level xi: xtsemipar logi logm i.time, nonpar(logs) spline ci cluster(company)

Same as above but with smoothed values (a) and partialled-out residuals (b) as variables instead of graphing xi: xtsemipar logi logm i.time, nonpar(logs) generate(a b) nograph

Saved results

xtsemipar saves the following in e():

Scalars e(N) Number of observations e(df_r) Residual degrees of freedom e(df_m) Model degrees of freedom e(F) F statistic e(r2) Within R-squared e(r2_a) Adjusted R-squared e(rmse) Root mean squared error e(mss) Model sum of square e(rss) Residual sum of square e(ll) Log likelihood under additional assumption of i.i.d. normal errors

Macros e(cmd) xtsemipar e(title) "Panel fixed-effects partial linear regression" e(model) "Baltagi fixed-effect series Semiparametric estimation" e(depvar) Name of dependant variable e(properties) b V

Matrices e(b) coefficient vector e(V) variance-covariance matrix of the estimators

Functions e(sample) marks estimation sample

Also see

Help: [R] lpoly [R] bspline (if installed)

References Baltagi B.H., D. Li (2002), Series estimation of partially linear panel data models with fixed effect, Annals of economics and finance, 3, 103-116.

Newson R., (2001) "B-splines and splines parameterized by their values at their reference points on the x-axis",