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

Title

xtsemipar--- Semi-parametric estimator in panel

Syntax

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

optionsDescription ------------------------------------------------------------------------- Mainnonpar(varname) Specifies the variable that enters the model nonlinearlygenerate([newvar_x]newvar_s) Store fitted values innewvar_xand residuals of the parametric estimation innewvar_sdegree(#)Specifies the degree of the local weighted polynomial fit used in the epanechnikov kernel if spline is not specified (seelpoly). If spline is specified, degree specifies the power (or degree) of the splines. If absent, 4 is assumed. (seebspline)knots1(numlist) Specifies a list of at least 2 ascending knots used for the spline interpolation that allows to remove fixed-effects.nographSuppresses graph

Spline options

splineUses B-splines to perform the non-parametric fit, instead of kernel-weighted local polynomial smoothing, the default option.(seelpoly)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

robustSpecifies that the type of standard error reported are corrected using the Huber/White/sandwich estimatorcluster(varname) Specifies that the type of standard error reported are corrected using the clustered sandwich estimatorciPlots confidence bandslevel(#)Sets confidence level; default islevel(95)-------------------------------------------------------------------------fweights andaweights are allowed; see weight.

Description

xtsemiparestimates 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.

Requirementxtsemiparcan only be used if data are declare as panel data, through xtset or tsset command. Before usingxtsemipar, Newson's (2000)bsplineprogram 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 thenonparvariable.newvar_xstores 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,bsplinewill initialize the list to the minimum and maximum ofnonpar. The number of knots will then be chosen optimally.

nographsuppresses drawing the graph of the estimated smooth.

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

splinespecifies 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,bsplinewill initialize the list to the minimum and maximum ofnonpar. 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. Ifbwidth()is not specified, a rule-of-thumb (ROT) bandwidth estimator is calculated and used.

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

robustuses 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.

ciplots confidence intervals around the polynomial smoothing or the spline. The confidence level used is the one specified inlevel().

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

ExamplesSetup 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

xtsemiparsaves the following ine():Scalars

e(N)Number of observationse(df_r)Residual degrees of freedome(df_m)Model degrees of freedome(F)F statistice(r2)Within R-squarede(r2_a)Adjusted R-squarede(rmse)Root mean squared errore(mss)Model sum of squaree(rss)Residual sum of squaree(ll)Log likelihood under additional assumption of i.i.d. normal errors

Macros

e(cmd)xtsemipare(title)"Panel fixed-effects partial linear regression"e(model)"Baltagi fixed-effect series Semiparametric estimation"e(depvar)Name of dependant variablee(properties)b VMatrices

e(b)coefficient vectore(V)variance-covariance matrix of the estimatorsFunctions

e(sample)marks estimation sample

Also seeHelp:

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

Baltagi B.H., D. Li (2002), Series estimation of partially linear panel data models with fixed effect,ReferencesAnnals ofeconomics and finance, 3, 103-116.Newson R., (2001) "B-splines and splines parameterized by their values at their reference points on the x-axis",