g13fg estimates the parameters of a univariate regression-exponential process (see Engle and Ng (1993)).
Syntax
C# |
---|
public static void g13fg( string dist, double[] yt, double[,] x, int num, int ip, int iq, int nreg, int mn, 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 g13fg ( _ dist As String, _ yt As Double(), _ x As Double(,), _ num As Integer, _ ip As Integer, _ iq As Integer, _ nreg As Integer, _ mn 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 g13fg( String^ dist, array<double>^ yt, array<double,2>^ x, int num, int ip, int iq, int nreg, int mn, 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, bool copts, int maxit, double tol, [OutAttribute] int% ifail ) |
F# |
---|
static member g13fg : dist : string * yt : float[] * x : float[,] * num : int * ip : int * iq : int * nreg : int * mn : 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 .
- 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 autoregressive coefficients , for .The next iq elements contain the coefficients , for .The next ip elements must contain the moving average coefficients , for .If , the next element must contain an estimate for , 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 and the next iq elements contain the coefficients , for .The next iq elements contain the coefficients , for .The next ip elements are the moving average coefficients , for .If , the next element contains an estimate for then 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 and the next iq elements contain the standard errors for , 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 , 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 scores for , the next iq elements contain the scores for , for , the next iq elements contain the scores for , for , the next ip elements are the scores for , for .If , the next element contains the scores 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 then hp is the value to be used for the pre-observed conditional variance, otherwise hp is not referenced.On exit: if then 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: System..::..BooleanOn entry: if , the method provides initial parameter estimates of the regression terms, otherwise these are provided by you.
- maxit
- Type: System..::..Int32On entry: the maximum number of iterations to be used by the optimization method when estimating the parameters.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-exponential process, with coefficients , for , coefficients , for , coefficients, , for , and linear regression coefficients , for , can be represented by:
where , denotes the expected value of and 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) |
g13fg provides an estimate , for the 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 g13fg) 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
Glosten L, Jagannathan R and Runkle D (1993) Relationship between the expected value and the volatility of nominal excess return on stocks Journal of Finance 48 1779–1801
Hamilton J (1994) Time Series Analysis Princeton University Press
Error Indicators and Warnings
Note: g13fg 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 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#): g13fge.cs