Usage: |
{hplugin,hB,hC,xs,resid} = plotloclin(xdata,xresid,xdataln,xdatadif,xdatastand,volat,lags,h,xsconst,gridnum,gridmax,gridmin)
|
Input: |
| |
|
| ATTENTION: | this quantlet requires to open locling.dll, density.dll (NT)
or locling.so, denc.so (UNIX). This can be done with the quantlet cafpeload or
directly with
garb = dlopen ("\locling.dll") on NT,
garb = dlopen ("\density.dll") on NT,
garb = dlopen ("/locling.so") on UNIX,
garb = dlopen ("/denc.so") on UNIX.
|
| xdata | n x 1 matrix of the observed time series
|
| xresid | n' x 1 vector of residuals from fitting conditional mean function
|
| xdataln | character variable: "yes": take natural logs, "no": don't
|
| xdatadif | character variable: "yes": take first differences of data, "no": don't
|
| xdatastand | character variable: "yes": standardize data, "no": don't
|
| volat | character variable: "no" plots conditional mean function;
"resid" plots conditional volatility function,
the residuals of fitting a conditional mean
function have to be contained in xresid
|
| lags | m x 1 vector of lags
|
| h | scalar bandwidth for which if set to zero a scalar plug-in bandwidth using
hoptest is computed or a (d x 1) vector bandwidth
|
| xsconst | m x 1 vector (only needed if m>2)
indicates which lags vary and which are kept
fixed
for those keeping fixed, the entry in the
correponding row contains the value at which it
is fixed
for those to be varied, the entry in the
corresponding row is 1e-100
|
| gridnum | scalar, number of grid points in one direction
|
| gridmax | scalar, maximum for grid
|
| gridmin | scalar, minimum for grid
|
Output: |
| hplugin | scalar, plug-in bandwidth or chosen scalar or vector bandwidth
|
| hB | scalar, rule-of-thumb bandwidth for nonparametrically
estimating the constant B in CAFPE and for computing the
plug-in bandwidth
|
| hC | scalar, rule-of-thumb bandwidth for nonparametrically
estimating the constant C for computing the plug-in
bandwidth
|
| xs | m x n' matrix with lagged values of time series which are
used to compute plug-in bandwidth and residuals for
potential diagnostics
|
| resid | vector with residuals after fitting a local linear
regression at xs
|