g13fa estimates the parameters of either a standard univariate regression GARCH process, or a univariate regression-type I process (see Engle and Ng (1993)).
Syntax
C# |
---|
public static void g13fa( string dist, double[] yt, double[,] x, int num, int ip, int iq, int nreg, int mn, int isym, int npar, double[] theta, double[] se, double[] sc, double[,] covr, ref double hp, double[] et, double[] ht, out double lgf, bool[] copts, int maxit, double tol, out int ifail ) |
Visual Basic |
---|
Public Shared Sub g13fa ( _ dist As String, _ yt As Double(), _ x As Double(,), _ num As Integer, _ ip As Integer, _ iq As Integer, _ nreg As Integer, _ mn As Integer, _ isym As Integer, _ npar As Integer, _ theta As Double(), _ se As Double(), _ sc As Double(), _ covr As Double(,), _ ByRef hp As Double, _ et As Double(), _ ht As Double(), _ <OutAttribute> ByRef lgf As Double, _ copts As Boolean(), _ maxit As Integer, _ tol As Double, _ <OutAttribute> ByRef ifail As Integer _ ) |
Visual C++ |
---|
public: static void g13fa( String^ dist, array<double>^ yt, array<double,2>^ x, int num, int ip, int iq, int nreg, int mn, int isym, int npar, array<double>^ theta, array<double>^ se, array<double>^ sc, array<double,2>^ covr, double% hp, array<double>^ et, array<double>^ ht, [OutAttribute] double% lgf, array<bool>^ copts, int maxit, double tol, [OutAttribute] int% ifail ) |
F# |
---|
static member g13fa : dist : string * yt : float[] * x : float[,] * num : int * ip : int * iq : int * nreg : int * mn : int * isym : int * npar : int * theta : float[] * se : float[] * sc : float[] * covr : float[,] * hp : float byref * et : float[] * ht : float[] * lgf : float byref * copts : bool[] * maxit : int * tol : float * ifail : int byref -> unit |
Parameters
- dist
- Type: System..::..StringOn entry: the type of distribution to use for .
- A Normal distribution is used.
- A Student's -distribution is used.
Constraint: or .
- yt
- Type: array<System..::..Double>[]()[][]An array of size [num]On entry: the sequence of observations, , for .
- x
- Type: array<System..::..Double,2>[,](,)[,][,]An array of size [dim1, dim2]Note: dim1 must satisfy the constraint: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 .
- num
- Type: System..::..Int32On entry: , the number of terms in the sequence.Constraints:
- ;
- .
- ip
- Type: System..::..Int32On entry: the number of coefficients, , for .Constraint: (see also npar).
- iq
- Type: System..::..Int32On entry: the number of coefficients, , for .Constraint: (see also npar).
- nreg
- Type: System..::..Int32On entry: , the number of regression coefficients.Constraint: (see also npar).
- mn
- Type: System..::..Int32On entry: if , the mean term will be included in the model.Constraint: or .
- isym
- Type: System..::..Int32On entry: if , the asymmetry term will be included in the model.Constraint: or .
- npar
- Type: System..::..Int32On entry: the number of parameters to be included in the model. when , and when .Constraint: .
- theta
- Type: array<System..::..Double>[]()[][]An array of size [npar]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 .If , 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 must contain 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 .If , 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 .
- se
- Type: array<System..::..Double>[]()[][]An array of size [npar]On exit: the standard errors for .The first element contains the standard error for . The next iq elements contain the standard errors for , for . The next ip elements are the standard errors for , for .If , 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 .
- sc
- Type: array<System..::..Double>[]()[][]An array of size [npar]On exit: the scores for .The first element contains the score for .The next iq elements contain the score for , for .The next ip elements are the scores for , for .If , 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 .
- covr
- Type: array<System..::..Double,2>[,](,)[,][,]An array of size [dim1, npar]Note: dim1 must satisfy the constraint:On exit: the covariance matrix of the parameter estimates , that is the inverse of the Fisher Information Matrix.
- hp
- Type: System..::..Double%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.
- et
- Type: array<System..::..Double>[]()[][]An array of size [num]On exit: the estimated residuals, , for .
- ht
- Type: array<System..::..Double>[]()[][]An array of size [num]On exit: the estimated conditional variances, , for .
- lgf
- Type: System..::..Double%On exit: the value of the log-likelihood function at .
- copts
- Type: array<System..::..Boolean>[]()[][]An array of size []On entry: the options to be used by g13fa.
- Stationary conditions are enforced, otherwise they are not.
- The method provides initial parameter estimates of the regression terms, otherwise these are to be provided by you.
- maxit
- Type: System..::..Int32On entry: the maximum number of iterations to be used by the optimization method 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: .
- tol
- Type: System..::..DoubleOn entry: the tolerance to be used by the optimization method when estimating the parameters.
- ifail
- Type: System..::..Int32%On exit: unless the method detects an error or a warning has been flagged (see [Error Indicators and Warnings]).
Description
A univariate regression-type I 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, the number of degrees of freedom of the Student's -distribution, and the set of all information up to time .
(1) |
(2) |
g13fa provides an estimate for , the parameter vector where , when and when .
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 g13fa) 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 .
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
Error Indicators and Warnings
Note: g13fa may return useful information for one or more of the following detected errors or warnings.
Errors or warnings detected by the method:
Some error messages may refer to parameters that are dropped from this interface
(LDX, LDCOVR) In these
cases, an error in another parameter has usually caused an incorrect value to be inferred.
On entry, , or , or , or , or , or , or , or , or npar has an invalid value, or , or , or , or , or .
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.
Accuracy
Not applicable.
Parallelism and Performance
None.
Further Comments
None.
Example
This example fits a model with Student's -distributed residuals to some simulated data.
Example program (C#): g13fae.cs