| Libgretl Reference Manual |
|---|
varvar — |
int var_max_order (const int *list, const DATAINFO *pdinfo); GRETL_VAR* gretl_VAR (int order, int *list, double ***pZ, DATAINFO *pdinfo, gretlopt opt, PRN *prn, int *err); GRETL_VAR* gretl_VECM (int order, int rank, int *list, double ***pZ, DATAINFO *pdinfo, gretlopt opt, PRN *prn, int *err); const gretl_matrix* gretl_VAR_get_forecast_matrix (GRETL_VAR *var, int t1, int t2, int pre_obs, const double **Z, DATAINFO *pdinfo, gretlopt opt); const gretl_matrix* gretl_VAR_get_residual_matrix (const GRETL_VAR *var); gretl_matrix* gretl_VAR_get_fcast_decomp (GRETL_VAR *var, int targ, int periods); const gretl_matrix* gretl_VAR_get_roots (GRETL_VAR *var); int gretl_VAR_autocorrelation_test (GRETL_VAR *var, int order, double ***pZ, DATAINFO *pdinfo, PRN *prn); int gretl_VAR_arch_test (GRETL_VAR *var, int order, DATAINFO *pdinfo, PRN *prn); int gretl_VAR_normality_test (const GRETL_VAR *var, PRN *prn); int* gretl_VAR_get_exo_list (const GRETL_VAR *var, int *err); GRETL_VAR* gretl_VAR_omit_test (const int *omitvars, const GRETL_VAR *orig, double ***pZ, DATAINFO *pdinfo, PRN *prn, int *err); void gretl_VAR_free (GRETL_VAR *var); int default_VAR_horizon (const DATAINFO *pdinfo); gretl_matrix* gretl_VAR_get_impulse_response (GRETL_VAR *var, int targ, int shock, int periods, const double **Z, const DATAINFO *pdinfo); void gretl_VAR_set_name (GRETL_VAR *var, const char *name); int gretl_VAR_attach_restrictions (GRETL_VAR *var, gretl_matrix *D); const char* gretl_VAR_get_name (const GRETL_VAR *var); int gretl_VAR_get_variable_number (const GRETL_VAR *var, int k); int gretl_VAR_get_n_equations (const GRETL_VAR *var); int gretl_VAR_get_t1 (const GRETL_VAR *var); int gretl_VAR_get_t2 (const GRETL_VAR *var); const MODEL* gretl_VAR_get_model (const GRETL_VAR *var, int i); int gretl_VAR_add_resids_to_dataset (GRETL_VAR *var, int eqnum, double ***pZ, DATAINFO *pdinfo); int gretl_VAR_do_irf (GRETL_VAR *var, const char *line, const double **Z, const DATAINFO *pdinfo); int gretl_VAR_get_highest_variable (const GRETL_VAR *var, const DATAINFO *pdinfo); int gretl_VECM_n_beta (const GRETL_VAR *vecm); int gretl_VECM_test_beta (GRETL_VAR *vecm, const DATAINFO *pdinfo, PRN *prn); int gretl_VECM_rank (const GRETL_VAR *vecm); const int* gretl_VECM_list (const GRETL_VAR *vecm); double* gretl_VAR_get_series (const GRETL_VAR *var, const DATAINFO *pdinfo, int idx, const char *key, int *err); gretl_matrix* gretl_VAR_get_matrix (const GRETL_VAR *var, int idx, int *err); int gretl_VAR_serialize (const GRETL_VAR *var, SavedObjectFlags flags, FILE *fp); GRETL_VAR* gretl_VAR_from_XML (xmlNodePtr node, xmlDocPtr doc, int *err);
int var_max_order (const int *list,
const DATAINFO *pdinfo);
list : |
|
pdinfo : |
|
| Returns : |
GRETL_VAR* gretl_VAR (int order, int *list, double ***pZ, DATAINFO *pdinfo, gretlopt opt, PRN *prn, int *err);
Estimate a vector auto-regression (VAR), print and save the results.
order : |
lag order for the VAR |
list : |
specification for the first model in the set. |
pZ : |
pointer to data matrix. |
pdinfo : |
data information struct. |
opt : |
if includes OPT_R, use robust VCV;
if includes OPT_I, print impulse responses;
if includes OPT_F, print forecast variance decompositions;
if includes OPT_D, add seasonal dummies;
if includes OPT_N, do not include a constant.
if includes OPT_Q, do not show individual regressions.
if includes OPT_T, include a linear trend.
if includes OPT_L, test for optimal lag length (only).
|
prn : |
gretl printing struct. |
err : |
location to receive error code. |
| Returns : | pointer to VAR struct, which may be NULL on error.
|
GRETL_VAR* gretl_VECM (int order, int rank, int *list, double ***pZ, DATAINFO *pdinfo, gretlopt opt, PRN *prn, int *err);
order : |
|
rank : |
|
list : |
|
pZ : |
|
pdinfo : |
|
opt : |
|
prn : |
|
err : |
|
| Returns : |
const gretl_matrix* gretl_VAR_get_forecast_matrix (GRETL_VAR *var, int t1, int t2, int pre_obs, const double **Z, DATAINFO *pdinfo, gretlopt opt);
var : |
|
t1 : |
|
t2 : |
|
pre_obs : |
|
Z : |
|
pdinfo : |
|
opt : |
|
| Returns : |
const gretl_matrix* gretl_VAR_get_residual_matrix (const GRETL_VAR *var);
var : |
|
| Returns : |
gretl_matrix* gretl_VAR_get_fcast_decomp (GRETL_VAR *var, int targ, int periods);
var : |
|
targ : |
|
periods : |
|
| Returns : |
int gretl_VAR_autocorrelation_test (GRETL_VAR *var, int order, double ***pZ, DATAINFO *pdinfo, PRN *prn);
var : |
|
order : |
|
pZ : |
|
pdinfo : |
|
prn : |
|
| Returns : |
int gretl_VAR_arch_test (GRETL_VAR *var, int order, DATAINFO *pdinfo, PRN *prn);
var : |
|
order : |
|
pdinfo : |
|
prn : |
|
| Returns : |
int gretl_VAR_normality_test (const GRETL_VAR *var, PRN *prn);
var : |
|
prn : |
|
| Returns : |
int* gretl_VAR_get_exo_list (const GRETL_VAR *var, int *err);
var : |
|
err : |
|
| Returns : |
GRETL_VAR* gretl_VAR_omit_test (const int *omitvars, const GRETL_VAR *orig, double ***pZ, DATAINFO *pdinfo, PRN *prn, int *err);
Re-estimates a given VAR after removing the variables
specified in omitvars, and reports per-equation F-tests
and system-wide LR tests for the null hypothesis that
the omitted variables have zero parameters.
omitvars : |
list of variables to omit from original model. |
orig : |
pointer to original VAR. |
pZ : |
pointer to data array. |
pdinfo : |
information on the data set. |
prn : |
gretl printing struct. |
err : |
location to receive error code. |
| Returns : | restricted VAR on sucess, NULL on error.
|
gretl_matrix* gretl_VAR_get_impulse_response (GRETL_VAR *var, int targ, int shock, int periods, const double **Z, const DATAINFO *pdinfo);
Computes the response of targ to a perturbation of shock
in the context of var: targ and shock are zero-based indices
relative to the structure of var. For example if targ = 0 and
shock = 1, we compute the response of the dependent variable in
the first VAR equation to a perturbation of the variable that
appears as dependent in the second VAR equation.
If Z is NULL, the response matrix returned is a column vector
of length periods, giving the point estimate of the response
function. If Z is not NULL, the response matrix returned
has three columns, containing the point estimate, the 0.025
and the 0.975 quantile, where the quantiles are based on 999
bootstrap replications, with resampling of the original
residuals with replacement.
var : |
pointer to VAR struct. |
targ : |
index of the target or response variable. |
shock : |
index of the source or shock variable. |
periods : |
number of periods over which to compute the response. |
Z : |
data array (or NULL).
|
pdinfo : |
dataset information. |
| Returns : | matrix containing the estimated impulse responses,
with or without a confidence interval depending on whether
or not Z is provided.
|
int gretl_VAR_attach_restrictions (GRETL_VAR *var, gretl_matrix *D);
var : |
|
D : |
|
| Returns : |
int gretl_VAR_get_variable_number (const GRETL_VAR *var, int k);
var : |
|
k : |
|
| Returns : |
const MODEL* gretl_VAR_get_model (const GRETL_VAR *var, int i);
var : |
|
i : |
|
| Returns : |
int gretl_VAR_add_resids_to_dataset (GRETL_VAR *var, int eqnum, double ***pZ, DATAINFO *pdinfo);
var : |
|
eqnum : |
|
pZ : |
|
pdinfo : |
|
| Returns : |
int gretl_VAR_do_irf (GRETL_VAR *var, const char *line, const double **Z, const DATAINFO *pdinfo);
var : |
|
line : |
|
Z : |
|
pdinfo : |
|
| Returns : |
int gretl_VAR_get_highest_variable (const GRETL_VAR *var, const DATAINFO *pdinfo);
var : |
|
pdinfo : |
|
| Returns : |
int gretl_VECM_test_beta (GRETL_VAR *vecm, const DATAINFO *pdinfo, PRN *prn);
vecm : |
|
pdinfo : |
|
prn : |
|
| Returns : |
double* gretl_VAR_get_series (const GRETL_VAR *var, const DATAINFO *pdinfo, int idx, const char *key, int *err);
var : |
|
pdinfo : |
|
idx : |
|
key : |
|
err : |
|
| Returns : |
gretl_matrix* gretl_VAR_get_matrix (const GRETL_VAR *var, int idx, int *err);
var : |
|
idx : |
|
err : |
|
| Returns : |
int gretl_VAR_serialize (const GRETL_VAR *var, SavedObjectFlags flags, FILE *fp);
var : |
|
flags : |
|
fp : |
|
| Returns : |
GRETL_VAR* gretl_VAR_from_XML (xmlNodePtr node, xmlDocPtr doc, int *err);
node : |
|
doc : |
|
err : |
|
| Returns : |
| << system | bhhh_max >> |