NAG Library Routine Document
G13FCF
1 Purpose
G13FCF estimates the parameters of a univariate regression-type II process.
2 Specification
SUBROUTINE G13FCF ( |
DIST, YT, X, LDX, NUM, IP, IQ, NREG, MN, NPAR, THETA, SE, SC, COVR, LDCOVR, HP, ET, HT, LGF, COPTS, MAXIT, TOL, WORK, LWORK, IFAIL) |
INTEGER |
LDX, NUM, IP, IQ, NREG, MN, NPAR, LDCOVR, MAXIT, LWORK, IFAIL |
REAL (KIND=nag_wp) |
YT(NUM), X(LDX,*), THETA(NPAR), SE(NPAR), SC(NPAR), COVR(LDCOVR,NPAR), HP, ET(NUM), HT(NUM), LGF, TOL, WORK(LWORK) |
LOGICAL |
COPTS(2) |
CHARACTER(1) |
DIST |
|
3 Description
A univariate regression-type II
process, with
coefficients
, for
,
coefficients,
, for
, and
linear regression coefficients
, for
, can be represented by:
where
or
. Here
is a standardized Student's
-distribution with
degrees of freedom and variance
,
is the number of terms in the sequence,
denotes the endogenous variables,
the exogenous variables,
the regression mean,
the regression coefficients,
the residuals,
the conditional variance, and
the set of all information up to time
.
G13FCF provides an estimate for the parameter vector where , when and when .
MN and
NREG can be used to simplify the
expression in
(1) as follows:
No Regression and No Mean
- ,
- ,
- and
- is a
vector when and a vector when .
No Regression
- ,
- ,
- and
- is a
vector when and a vector when .
Note: if the
, where
is known (not to be estimated by G13FCF) then
(1) can be written as
, where
. This corresponds to the case
No Regression and No Mean, with
replaced by
.
No Mean
- ,
- ,
- and
- is a
vector when and a vector when .
4 References
Bollerslev T (1986) Generalised autoregressive conditional heteroskedasticity Journal of Econometrics 31 307–327
Engle R (1982) Autoregressive conditional heteroskedasticity with estimates of the variance of United Kingdom inflation Econometrica 50 987–1008
Engle R and Ng V (1993) Measuring and testing the impact of news on volatility Journal of Finance 48 1749–1777
Hamilton J (1994) Time Series Analysis Princeton University Press
5 Parameters
- 1: DIST – CHARACTER(1)Input
On entry: the type of distribution to use for
.
- A Normal distribution is used.
- A Student's -distribution is used.
Constraint:
or .
- 2: YT(NUM) – REAL (KIND=nag_wp) arrayInput
On entry: the sequence of observations,
, for .
- 3: X(LDX,) – REAL (KIND=nag_wp) arrayInput
-
Note: the second dimension of the array
X
must be at least
.
On entry: row
of
X must contain the time dependent exogenous vector
, where
, for
.
- 4: LDX – INTEGERInput
On entry: the first dimension of the array
X as declared in the (sub)program from which G13FCF is called.
Constraint:
.
- 5: NUM – INTEGERInput
On entry: , the number of terms in the sequence.
Constraints:
- ;
- .
- 6: IP – INTEGERInput
On entry: the number of coefficients,
, for .
Constraint:
(see also
NPAR).
- 7: IQ – INTEGERInput
On entry: the number of coefficients,
, for .
Constraint:
(see also
NPAR).
- 8: NREG – INTEGERInput
On entry: , the number of regression coefficients.
Constraint:
(see also
NPAR).
- 9: MN – INTEGERInput
On entry: if , the mean term will be included in the model.
Constraint:
or .
- 10: NPAR – INTEGERInput
On entry: the number of parameters to be included in the model. when and when .
Constraint:
.
- 11: THETA(NPAR) – REAL (KIND=nag_wp) arrayInput/Output
On entry: the initial parameter estimates for the vector
.
The first element must contain the coefficient
and the next
IQ elements must contain the coefficients
, for
.
The next
IP elements must contain the coefficients
, for
.
The next element must contain the asymmetry parameter .
If , the next element must contain , the number of degrees of freedom of the Student's -distribution.
If , the next element contains the mean term .
If
, the remaining
NREG elements are taken as initial estimates of the linear regression coefficients
, for
.
On exit: the estimated values
for the vector
.
The first element contains the coefficient
, the next
IQ elements contain the coefficients
, for
.
The next
IP elements are the coefficients
, for
.
The next element contains the estimate for the asymmetry parameter .
If , the next element contains an estimate for , the number of degrees of freedom of the Student's -distribution.
If , the next element contains an estimate for the mean term .
The final
NREG elements are the estimated linear regression coefficients
, for
.
- 12: SE(NPAR) – REAL (KIND=nag_wp) arrayOutput
On exit: the standard errors for
.
The first element contains the standard error for
and the next
IQ elements contain the standard errors for
, for
.
The next
IP elements are the standard errors for
, for
.
The next element contains the standard error for .
If , the next element contains the standard error for , the number of degrees of freedom of the Student's -distribution.
If , the next element contains the standard error for .
The final
NREG elements are the standard errors for
, for
.
- 13: SC(NPAR) – REAL (KIND=nag_wp) arrayOutput
On exit: the scores for
.
The first element contains the score for
and the next
IQ elements contain the score for
, for
.
The next
IP elements are the scores for
, for
.
The next element contains the score for .
If , the next element contains the score for , the number of degrees of freedom of the Student's -distribution.
If , the next element contains the score for .
The final
NREG elements are the scores for
, for
.
- 14: COVR(LDCOVR,NPAR) – REAL (KIND=nag_wp) arrayOutput
On exit: the covariance matrix of the parameter estimates , that is the inverse of the Fisher Information Matrix.
- 15: LDCOVR – INTEGERInput
On entry: the first dimension of the array
COVR as declared in the (sub)program from which G13FCF is called.
Constraint:
.
- 16: HP – REAL (KIND=nag_wp)Input/Output
On entry: if
,
HP is the value to be used for the pre-observed conditional variance; otherwise
HP is not referenced.
On exit: if
,
HP is the estimated value of the pre-observed conditional variance.
- 17: ET(NUM) – REAL (KIND=nag_wp) arrayOutput
On exit: the estimated residuals,
, for .
- 18: HT(NUM) – REAL (KIND=nag_wp) arrayOutput
On exit: the estimated conditional variances,
, for .
- 19: LGF – REAL (KIND=nag_wp)Output
On exit: the value of the log-likelihood function at .
- 20: COPTS() – LOGICAL arrayInput
On entry: the options to be used by G13FCF.
- Stationary conditions are enforced, otherwise they are not.
- The routine provides initial parameter estimates of the regression terms, otherwise these are to be provided by you.
- 21: MAXIT – INTEGERInput
On entry: the maximum number of iterations to be used by the optimization routine when estimating the
parameters. If
MAXIT is set to
, the standard errors, score vector and variance-covariance are calculated for the input value of
in
THETA; however the value of
is not updated.
Constraint:
.
- 22: TOL – REAL (KIND=nag_wp)Input
On entry: the tolerance to be used by the optimization routine when estimating the parameters.
- 23: WORK(LWORK) – REAL (KIND=nag_wp) arrayWorkspace
- 24: LWORK – INTEGERInput
On entry: the dimension of the array
WORK as declared in the (sub)program from which G13FCF is called.
Constraint:
.
- 25: IFAIL – INTEGERInput/Output
-
On entry:
IFAIL must be set to
,
. If you are unfamiliar with this parameter you should refer to
Section 3.3 in the Essential Introduction for details.
For environments where it might be inappropriate to halt program execution when an error is detected, the value
is recommended. If the output of error messages is undesirable, then the value
is recommended. Otherwise, because for this routine the values of the output parameters may be useful even if
on exit, the recommended value is
.
When the value is used it is essential to test the value of IFAIL on exit.
On exit:
unless the routine detects an error or a warning has been flagged (see
Section 6).
6 Error Indicators and Warnings
If on entry
or
, explanatory error messages are output on the current error message unit (as defined by
X04AAF).
Note: G13FCF may return useful information for one or more of the following detected errors or warnings.
Errors or warnings detected by the routine:
On entry, | , |
or | , |
or | , |
or | , |
or | , |
or | , |
or | , |
or | , |
or | , and , |
or | , |
or | , |
or | NPAR has an invalid value . |
On entry, .
The matrix is not full rank.
The information matrix is not positive definite.
-
The maximum number of iterations has been reached.
-
The log-likelihood cannot be optimized any further.
-
No feasible model parameters could be found.
7 Accuracy
Not applicable.
None.
9 Example
This example fits a model with Student's -distributed residuals to some simulated data.
The process parameter estimates,
, are obtained using G13FCF, and a four step ahead volatility estimate is computed using
G13FDF.
The data was simulated using
G05PEF.
9.1 Program Text
Program Text (g13fcfe.f90)
9.2 Program Data
Program Data (g13fcfe.d)
9.3 Program Results
Program Results (g13fcfe.r)