vectorAR#
- swordfish.function.vectorAR()#
Analyze multivariate time series using the Vector Autoregression model (VAR model).
- Parameters:
ds (Constant) – An in-memory table or a vector consisting of DataSource objects, containing the multivariate time series to be analyzed. ds cannot be empty.
endogColNames (Constant) – A STRING vector indicating the column names of the endogenous variables in ds. The matrix formed by endogColNames extracted from ds is the multivariate time series to be analyzed.
exog (Constant, optional) – A numeric matrix representing exogenous variables except the endogenous time series, by default DFLT. Each column of the matrix represents the time series data of an exogenous variable, and the number of rows must equal the number of rows in ds.
trend (Constant, optional) –
Specify constants and trend orders used in the regression, by default DFLT. It can be
’c’ (default) - add constant
’ct’ - constant and treand
’ctt’ - constant, linear, and quadratic trend
’n’ - no constant or trend
maxLag (Constant, optional) – A non-negative integer representing the maximum number of lags to check for order selection, by default DFLT.
ic (Constant, optional) –
A STRING scalar indicating the information criterion to use for VAR order selection, by default DFLT. It can be:
’aic’: Akaike
’bic’: Bayesian/Schwarz
’fpe’: Final prediction error
’hqic’: Hannan-Quinn
- Returns:
A dictionary representing the analysis results of the VAR model with the following members:
params: A floating-point matrix representing the parameters obtained from fitting the VAR model.
kAr: An integer representing the order of the VAR process.
kTrend: An integer representing the number of trends in the VAR process.
nobs: An integer representing the number of observations in the VAR model analysis.
sigmaU: A floating-point matrix representing the estimated variance of the white noise process.
sigmaUMle: A floating-point matrix representing the biased maximum likelihood estimate of the noise process covariance.
aic: A floating-point scalar representing the Akaike Information Criterion.
bic: A floating-point scalar representing the Bayesian Information Criterion.
hqic: A floating-point scalar representing the Hannan-Quinn Information Criterion.
fpe: A floating-point scalar representing the Final Prediction Error Information Criterion.
llf: A floating-point scalar representing the log-likelihood value of the VAR model.
- Return type: