Usage: |
{ crmin,crpro } = cafpe(y,truedat,xdataln,xdatadif,xdatastand,lagmax,searchmethod,dmax)
|
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 matrix, the observed time series, set to zero if truedat is used
|
| truedat | character variable that contains path and name
of ascii data file if y=0
|
| 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
|
| lagmax | scalar variable with largest lag to be considered
|
| searchmethod | character variable: "full": consider all possible lag combinations,
"directed": do directed search (recommended if lagmax > 10)
|
| dmax | scalar variable with maximum number of possible lags
|
Output: |
| crmin | vector that stores for all considered lag combinations
in the first dmax columns the selected lag vector,
in the dmax+1 column the estimated CAFPE,
in the dmax+2 column the estimated true prediction error A,
in the dmax+3 column the bias corrected estimate of the true prediction error A
|
| crpro | matrix that stores for each number of lags (0,1,...,dmax):
in the first dmax colunms the selected lag vector,
in the dmax+1 column the estimated asymptotically
optimal bandwidth for estimating the true prediction error and CAFPE,
in the dmax+2 column the bandwidth for estimating
the constant B which is used for computing CAFPE and the plug-in bandwidth,
in the dmax+3 column the used bandwidth for estimating
the constant C which is used for computing the plug-in bandwidth,
in the dmax+4 column the estimated CAFPE,
in the dmax+5 column the estimated true prediction error A,
in the dmax+6 column the bias corrected estimated true prediction error A
|