Usage: |
{ crmin,crpro,crstore,crstoreadd,hstore,hstoretest } = cafpefull(y,truedat,xresid,trueres,xdataln,xdatadif,xdatastand,lagmax,volat,searchmethod,dmax,selcrit,robden,perA,perB,startval,noutputf,outpath)
|
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.
|
| y | (n x 1) vector of univariate time series
|
| truedat | character variable that contains path and name
of ascii data file if y=0
|
| xresid | (nr x 1) vector of residuals for selecting lags
of conditional volatility function; if not needed
set xresid = 0
|
| trueres | character variable that contains path and name
of residuals stored in ascii file if xresid=0;
needed if volat = resid
|
| xdataln | character variable: "yes" takes natural logs, "no" doesn't
|
| xdatadif | character variable: "yes" takes first differences of data, "no" doesn't
|
| xdatastand | character variable: "yes" standardizes data, "no" doesn't
|
| lagmax | scalar, largest lag to be considered
|
| volat | character variable: "no" conducts lag selection for conditional mean function;
"resid" conducts lag selection for conditional volatility function,
the residuals of fitting a conditional mean
function have to be contained in xresid
|
| searchmethod | character variable for determining search method
"full": full search over all possible input variable combinations;
"directed": directed search a la Tjostheim & Auestad (1994)
|
| dmax | scalar, maximal number of lags
|
| selcrit | character variable to select lag selection critierion:
"lqafpe": estimating the asymptotic Final Prediction Error (AFPE) using
local linear estimation and a plug-in bandwidth based on partial
local quadratic estimator
"lqcafpe": estimating the corrected asymptotic Final Prediction Error (CAFPE) using
local linear estimation and a plug-in bandwidth based on partial
local quadratic estimator
|
| robden | character variable for switching on/off robustification
of density estimation a la Tjostheim & Auestad (1994),
see also Section 5 in TY
"yes": on; "no": off
|
| perA | scalar, parameter used for screening off 0 <= perA <= 1 percent of the observations
with the lowest density for estimating A, see eq. (3.1) and Section 5 in TY
|
| perB | scalar, parameter like perA but for screening of perB observations
with lowest density for estimating B
|
| startval | character variable, to control treatment of starting values
"different": for each lag vector as few starting
values are used as necessary;
"same": for each lag vector the same starting value is used which
is determined by the largest lag used in the lag selection
quantlet xorigxe
|
| noutputf | character variable, name of output file
|
| outpath | character variable, path for output file
|
Output: |
| crmin | vector that stores for all considered lag combinations
in the first dmax rows the selected lag vector
in the dmax+1 row the estimated criterion
in the dmax+2 row the computed Ahat if (C)AFPE is
used
in the dmax+3 row the estimated variance of the white
noise process
|
| crpro | matrix that stores for each number of lags
in the first dmax rows the selected lag vector
in the dmax+1 row the estimated asymptotically
optimal bandwidth for estimating A and (C)AFPE
in the dmax+2 row the used bandwidth for estimating B
in the dmax+3 row the used bandwidth for estimating C
in the dmax+4 row the estimated criterion
in the dmax+5 row the computed Ahat if (C)AFPE is
used
in the dmax+6 row the estimated variance of the white
noise process
|
| crstore | matrix that stores lag vector and criterion value for
all lag combinations and bandwidth values considered
in the first dmax rows all considered lag vector are
stored
in the dmax+1 to dmax+number of bandwidths in grid
the estimated criterion for each lag vector and
bandwidth combination is stored
|
| crstoreadd | matrix that stores those criteria that
are evaluated in passing for all
lag combinations where all values for one lag
combination are stored in one column, see program
for details
|
| hstore | row vector that stores the bandwidths used in
computing (C)AFPE for each lag vector
|
| hstoretest | matrix that stores for each lag vector in one column
the estimated asymptotically optimal
bandwidth, hS(m+2) and hC (see section 5 in TY)
|