These reference sections have been taken from Volumes I-III.
PcGive is mostly menu-driven for ease of use. To add flexibility, certain functions can be accessed through entering commands. The syntax of these commands, which can be seen as little computer languages, is described in this chapter.
Algebra is described in the OxMetrics manuals. Algebra commands are executed in OxMetrics, via the Calculator, the Algebra editor, or as part of a batch run.
Restrictions have to be entered when testing for parameter restrictions and for imposing parameter constraints for estimation. The syntax is similar to that of algebra, albeit more simple.
Restrictions code may consist of the following components:
These are all identical to algebra. In addition there are:
Parameters are referenced by an ampersand followed by the parameter number. Counting starts at 0, so, for example, &2 is the third parameter of the model. What this parameter is depends on your model. Make sure that when you enter restrictions through the batch language, you use the right order for the coefficients. In case of IV estimation PcGive will reorder your model so that the endogenous variables come first.
Consider, for example, the following unconstrained model:
| CONSt = β0CONS_1t + β1 INCt + β2 INC_1t + β3 INFLATt + β4 +ut. |
Then &0 indicates the coefficient on CONS_1, etc.
Restrictions for testing are entered in the format: f(θ)=0;. The following restrictions test the significance of the long-run parameters in this unconstrained model:
(&1 + &2) / (1 - &0) = 0; &3 / (1 - &0) = 0;
A non-linear model is formulated in Algebra code. The following extensions are used:
Parameters are referenced by an ampersand followed by the parameter number. The numbering does not have to be consecutive, so your model can use for example &1, &3 and &4.
Consider, for example, the following specification of the fitted part:
fitted = &0*lag(CONS,1) + &1*INC + &3*INFLAT + &4;
Starting values are entered in the format: ¶meter=value;. For example:
&0 = 0; &1 = 1; &3 = -1; &4 = 1;
The following two variables must be defined for NLS to work:
Defines the actual values (the y variable).
Defines the fitted values (the ŷ variable).
Together, these formulate the whole non-linear model, as in the following example:
actual = CONS; fitted = &0 + &1*lag(CONS,1) + &2*INC - &1*&2*lag(INC,1);
Maximum likelihood models are defined using the three variables:
Both actual and fitted only define the variables being used in the graphic analysis and the residual based tests. The loglik variable defines the function to be maximized. Parameters and starting values are as for NLS.
PcGive allows models to be formulated, estimated and evaluated through batch commands. Such commands are entered in OxMetrics. Certain commands are intercepted by OxMetrics, such as those for loading and saving data, as well as blocks of algebra code. The remaining commands are then passed on to the active module, which is PcGive in this case. This section gives an alphabetical list of the PcGive batch language statements. There are two types of batch commands: function calls (with or without arguments) terminated by a semicolon, and commands, which are followed by statements between curly brackets.
| adftest("var", lag, deterministic=1, summary=1); |
| algebra { ...} |
| appenddata("filename", "group"); |
| appresults("filename"); |
| arorder(ar1, ar2); |
| autometrics(pvalue, "outlier"="none", prelag=1); |
| autometrics_set("option", value); |
| break; |
| chdir("path"); |
| command("command_line"); |
| database(year1, period1, year2, period2, frequency); |
| derived { ...} |
| dynamics; |
| encompassing; |
| estimate("method"=OLS, year1=-1, period1=0, year2=-1, period2=0, forc=0, init=0); |
| exit; |
| forecast(nforc, hstep=0, setype=1); |
| loadalgebra("filename"); |
| loadbatch("filename"); |
| loadcommand("filename"); |
| loaddata("filename"); |
| module("name"); |
| nonlinear { ...} |
| print("text"); |
| println("text"); |
| option("option", argument); |
| output("option"); |
| package("PcGive", "package"); |
| progress; |
| savedata("filename"); |
| saveresults("filename"); |
| setdraw("option", i1=0, i2=0, i3=0, i4=0, i5=0); |
| store("name", "rename"=""); |
| system { ...} |
| test("test", lag1=0, lag2=0); |
| testlinres { ...} |
| testgenres { ...} |
| testsummary; |
| usedata("databasename"); |
Anything between /* and */ is considered comment. Note that this comment cannot be nested. Everything following // up to the end of the line is also comment.
OxMetrics allows you to save the current model as a batch file, and to rerun saved batch files. If a model has been created interactively, it can be saved as a batch file for further editing or easy recall in a later session. This is also the most convenient way to create a batch file.
If an error occurs during processing, the batch run will be aborted and control returned to OxMetrics. A warning or out of memory message will have to be accepted by the user (press Enter), upon which the batch run will resume.
In the following list, function arguments are indicated by words, whereas the areas where statement blocks are expected are indicated by .... Examples follow the list of descriptions. For terms in double quotes, the desired term must be substituted and provided together with the quotes. A command summary is given in Table Table:2.2. For completeness, the Table Table:2.2 also contains the commands which are handled by OxMetrics. Consult the OxMetrics book for more information on those commands.
The var argument specifies the variable for the ADF test, lag is the lag length to be used. The det argument indicates the choice of deterministic variables:
| 0 | no deterministic variables, |
| 1 | constant, |
| 2 | constant and trend, |
| 3 | constant and seasonals, |
| 4 | constant, trend and seasonals. |
Specifies the starting and ending order for RALS estimation. Note that the estimation sample must allow for the specified choice.
Indicates that Autometrics should be run at significance level pvalue. All options are set to their default values. The optional second argument specifies the outlier choise, and is one of "none", "large", "dummy". The third argument specifies whether pre-search lag reduction should be run or not (1 or 0).
Changes an Autometrics option from its default value. The options are:
| "pre-lag" | 0, 1 |
| "pre-var" | 0, 1 |
| "effort" | 0, 1, 2, 3 |
| "backtesting" | "none", "GUM0" , "current GUM" |
| "tie-breaker" | "Union","AIC","HQ","SC","Min","Cp","Max" |
| "print" | 0,1,2,3 |
| "pvalue_tests" | p-value |
| "stderr" | "hcse", "hacse" |
| "give_rf" | 0,1 |
| "block_fraction" | fraction |
| "block_method" | 0,1,2,3 |
| "block_max" | size of largest block |
| "test_default" | 0,1 |
| "test_ar" | 0,1 |
| "test_arch" | 0,1 |
| "test_chow" | 0,1 |
| "test_hetero" | 0,1 |
| "test_heterox" | 0,1 |
| "test_normality" | 0,1 |
| "test_reset" | 0,1 |
| "test_portmanteau" | 0,1 |
| "arg_default" | 0,1 |
| "arg_ar" | lag length |
| "arg_arch" | lag length |
| "arg_chow" | fraction |
| "arg_portmanteau" | lag length |
Specify Algebra code for derived variables to be used in forecasting.
Does part of the dynamic analysis: the static long-run solution and the lag structure analysis.
Run encompassing test on current and previous model.
Estimate a system. The presence of default arguments implies that the shortest version is just: estimate(), which estimates by OLS using the maximum possible sample, and no forecasts. Similarly, a call to estimate("OLS", 1950, 1) corresponds to estimate("OLS", 1950, 1, -1, 0, 0, 0).
The method argument is one of:
| OLS-CS | ordinary least squares (cross-section regression), |
| IVE-CS | instrumental variables estimation (cross-section regression), |
| OLS | ordinary least squares, |
| IVE | instrumental variables estimation, |
| RALS | autoregressive least squares (also see arorder), |
| NLS | non-linear least squares (non-linear modelling), |
| ML | maximum likelihood (non-linear modelling). |
year1(period1) -- year2(period2) is the estimation sample. Setting year1 to -1 will result in the earliest possible year1(period1), setting year2 to -1 will result in the latest possible year2(period2).
forc is the number of observations to withhold from the estimation sample for forecasting.
init is the number of observations to use for initialization of recursive estimation (not if method is RALS); no recursive estimation is performed if init = 0.
Prints nforc dynamic forecasts (when hstep is zero) or hstep forecasts. The last argument is the standard error type: 0 to not compute; 1 for error variance only (the default); 2 to include parameter uncertainty. For example, forecast(8) produces eight dynamic forecasts with error-variance based standard errors; forecast(8,4) produces the 4-step forecasts (note that the first three will coincide with 1,2,3-step respectively). Use the store command next to store the forecasts if necessary.
Starts the PcGive module. If PcGive is already running, this batch command is not required.
Prints further output:
| option | |
| correlation | print correlation matrix of variables, |
| covariance | print covariance matrix of coefficients, |
| equation | print the model equation format, |
| forecasts | print the static forecasts, |
| HCSE | Heteroscedasticity-consistent standard errors |
| infcrit | report information criteria, |
| instability | report instability tests, |
| latex | print the model in latex format, |
| r2seasonals | report R2 about seasonals, |
| reducedform | print the reduced form, |
| sigpar | significant digits for parameters (second argument), |
| sigse | significant digits for standard errors (second argument). |
The first set relates to maximization:
| option | argument | value |
| maxit | maximum number of iterations | default: 1000, |
| print every #iteration | 0: do not print, | |
| compact | compact or extended output | 0 for off, 1 on, |
| strong | strong convergence tolerance | default: 0.005, |
| weak | set weak convergence tolerance | default: 0.0001, |
The second set of options adds further output automatically:
| option | argument | value |
| equation | add equation format | 0 for off, 1 on, |
| infcrit | report information criteria | 0 for off, 1 on. |
| instability | report instability tests | 0 for off, 1 on, |
| HCSE | Heteroscedasticity-consistent SEs | 0 for off, 1 on, |
| r2seasonals | report R2 about seasonals | 0 for off, 1 on, |
Use this command to select the correct component (package) from PcGive:
| package |
| "Cross-section" |
| "Multiple-equation" |
| "Non-linear" |
| "Single-equation" |
Reports the modelling progress.
Use this command to store residuals, etc. into the database, the default name is used. Note that if the variable already exists, it is overwritten without warning. The name must be one of: residuals, fitted, res1step, stdinn, rss, eqse, innov, loglik.
The optional second argument replaces the default name. For example store("residuals") stores the residuals under the name Residual; store("residuals", "xyz") stores them under the name xyz.
The variables listed are separated by commas, their base names (that is, name excluding lag length) must be in the database. If the variable names are not a valid token, the name must be enclosed in double quotes.
The following special variables are recognized: Constant, Trend, Seasonal and CSeason.
Note that when IVE/RIVE are used PcGive reorders the model as follows: the endogenous variables first and the additional instruments last. This reordering is relevant when specifying restrictions.
Performs a specific test using the specified lag lengths.
| "ar" | test for autocorrelated errors from lag1 to lag2; |
| "arch" | ARCH test up to order lag1; |
| "comfac" | test for common factor; |
| "encompassing" | tests the two most recent models for encompassing; |
| "hetero" | heteroscedasticity test (squares); |
| "heterox" | heteroscedasticity test (squares and cross products); |
| "instability" | instability tests; |
| "normal" | normality test; |
| "rescor" | residual correlogram up to lag lag1; |
| "reset" | Reset test using powers up to lag1. |
Do the test summary.
We finish with an annotated example using most commands. To run this file, we assume that OxMetrics is loaded with data.in7, and that PcGive has been started.
module("PcGive");
package("PcGive", "Single-equation");
usedata("data.in7");
system
{
Y = CONS, INC; // endogenous variables
Z = CONS_1, INC_1, // non-modelled variables
Constant;
A = OUTPUT, OUTPUT_1; // additional instruments, optional
}
estimate("IVE", 0, 0, 0, 0, 8);
// Estimate by IV over maximum sample:
// 1953(2)-1992(3), use 8 forecasts
testsummary; // Do the test summary.
dynamics; // Do dynamic analysis.
store("residuals"); // store the residuals
testgenres // Test for general restrictions.
{
&1 - &2 = 0; // coeff of CONS_1 - coeff of INC_1.
}
testlinres // Test for linear restrictions.
{ // same restriction
1 5
0 1 -1 0 0
}
testres // Test an exclusion restriction
{
CONS_1, INC_1
}
PcGive is mostly menu-driven for ease of use. To add flexibility, certain functions can be accessed through entering commands. The syntax of these commands is described in this chapter.
Algebra is described in the OxMetrics manuals. Algebra commands are executed in OxMetrics, via the Calculator, the Algebra editor, or as part of a batch run.
Restrictions have to be entered when testing for parameter restrictions and for imposing parameter constraints for estimation. The syntax is similar to that of algebra, albeit more simple.
Restrictions code may consist of the following components: (1) Comment, (2) Constants, (3) Arithmetic operators. These are all identical to algebra. In addition there are:
Parameters are referenced by an ampersand followed by the parameter number. Counting starts at 0, so, for example, &2 is the third parameter of the model. What this parameter is depends on your model. Make sure that when you enter restrictions through the batch language, you use the right order for the coefficients. In case of system estimation, PcGive will reorder your model so that the endogenous variables come first.
Consider, for example, the following unconstrained model:
| CONSt = β0CONS_1t + β1 INCt + β2 INC_1t + β3 INFLATt + β4 +ut. |
Then &0 indicates the coefficient on CONS_1, etc.
Table Table:2.1 lists the precedence of the operators available in restrictions code, with the highest precedence at the top of the table.
| Symbol | Description | Associativity |
| & | Parameter reference | |
| - | Unary minus | Right to left |
| + | Unary plus | |
| ^ | Power | Left to right |
| * | Multiply | Left to right |
| / | Divide | |
| + | Add | Left to right |
| - | Subtract |
Restrictions for testing are entered in the format: f(θ)=0;. The following restrictions test the significance of the long-run parameters in the unconstrained model given above:
(&1 + &2) / (1 - &0) = 0;
&3 / (1 - &0) = 0;
PcGive allows estimation of two types of non-linear models: FIML with parameter constraints (CFIML), and restrictions on a cointegrated VAR. Examples were given in the tutorial chapters.
Parameter constraints for estimation are written in the format: θ*=g(θ);. First consider an example which restricts parameter 0 as a function of three other parameters, creating a model which is non-linear in the parameters:
&0 = -(&1 - &2) * &3;
&4 = 0;
Tests for general restrictions on the α and β matrices from the cointegration analysis can be expressed directly in the elements of α and β'. Consider a system with three variables and cointegrating rank of 2. Then the elements are labelled as follows:
| α=( |
| ) , β=( |
| ) . |
To test the necessary conditions for weak exogeneity, for example, set:
&1 = 0; &2 = 0; &4 = 0;
Starting values may be supplied as follows:
&1 = 0; &2 = 0; &4 = 0;
start = 1 -1 1 -1 2 4 3 5 6;
A value is listed for each unrestricted parameter, so &0 starts with the value 1, &3 with -1, etc. here the starting values were picked randomly. Of course, it is only useful to specify starting values if these are better than the default values.
| adftest("var", lag, deterministic=1, summary=1); |
| algebra { ...} |
| appenddata("filename", "group"); |
| appresults("filename"); |
| arorder(ar1, ar2); |
| break; |
| chdir("path"); |
| command("command_line"); |
| cointcommon { ...} |
| cointknown { ...} |
| constraints { ...} |
| database(year1, period1, year2, period2, frequency); |
| dynamics; |
| estimate("method"=OLS, year1=-1, period1=0, year2=-1, period2=0, forc=0, init=0); |
| exit; |
| forecast(nforc, hstep=0, setype=1); |
| loadalgebra("filename"); |
| loadbatch("filename"); |
| loadcommand("filename"); |
| loaddata("filename"); |
| model {...} |
| module("name"); |
| nonlinear { ...} |
| option("option", argument); |
| output("option"); |
| package("PcGive", "package"); |
| print("text"); |
| println("text"); |
| progress; |
| rank(rank); |
| savedata("filename"); |
| saveresults("filename"); |
| setdraw("option", i1=0, i2=0, i3=0, i4=0, i5=0); |
| store("name", "rename"=""); |
| system { ...} |
| test("test", lag1=0, lag2=0); |
| testlinres { ...} |
| testgenres { ...} |
| testsummary; |
| usedata("databasename"); |
PcGive allows models to be formulated, estimated and evaluated through batch commands. Such commands are entered in OxMetrics. Certain commands are intercepted by OxMetrics, such as those for loading and saving data, as well as blocks of algebra code. The remaining commands are then passed on to the active module, which is PcGive in this case. This section gives an alphabetical list of the PcGive batch language statements. There are two types of batch commands: function calls (with or without arguments) terminated by a semicolon, and commands, which are followed by statements between curly brackets.
Anything between /* and */ is considered comment. Note that this comment cannot be nested. Everything following // up to the end of the line is also comment.
OxMetrics allows you to save the current model as a batch file, and to rerun saved batch files. If a model has been created interactively, it can be saved as a batch file for further editing or easy recall in a later session. This is also the most convenient way to create a batch file.
If an error occurs during processing, the batch run will be aborted and control returned to OxMetrics. A warning or out of memory message will have to be accepted by the user (press Enter), upon which the batch run will resume.
In the following list, function arguments are indicated by words, whereas the areas where statement blocks are expected are indicated by .... Examples follow the list of descriptions. For terms in double quotes, the desired term must be substituted and provided together with the quotes. A command summary is given in Table Table:2.2. For completeness, the Table Table:2.2 also contains the commands which are handled by OxMetrics. Consult the OxMetrics book for more information on those commands.
The var argument specifies the variable for the ADF test, lag is the lag length to be used. The det argument indicates the choice of deterministic variables:
| 0 | no deterministic variables, |
| 1 | constant, |
| 2 | constant and trend, |
| 3 | constant and seasonals, |
| 4 | constant, trend and seasonals. |
Specifies the starting and ending order for RALS estimation. Note that the estimation sample must allow for the specified choice.
Sets the constraints for cointegrated VAR -- use rank first to set the rank p. Two matrices are specified, first A then H. A is the matrix of restrictions on α, namely α=Aθ. H is the matrix of known β, to test β=[H:φ]. The A and H are specified in the same way as a matrix in a matrix file: first the dimensions are given, then the contents of the matrix. Note that 0 0 indicates a matrix of dimension 0×0, that is, absence of the matrix. This can be used to have either α or β unrestricted.
This command must appear before estimate.
Sets the constraints for cointegrated VAR -- use rank first to set the rank p. A and H are matrices of restrictions on α and β for cointegration tests: α=Aθ and/or β=Hφ. The matrices are specified as in cointcommon.
This command must appear before estimate.
Sets the constraints for cointegrated VAR (use rank first to set the rank p) or for constrained simultaneous equations (CFIML) estimation. This command must appear before estimate.
Does part of the dynamic analysis: the static long-run solution and the lag structure analysis.
Estimate a system. The presence of default arguments implies that the shortest version is just: estimate(), which estimates by OLS using the maximum possible sample, and no forecasts. Similarly, a call to estimate("OLS", 1950, 1) corresponds to estimate("OLS", 1950, 1, -1, 0, 0, 0).
The method argument is one of:
| OLS-CS | ordinary least squares (cross-section regression), |
| IVE-CS | instrumental variables estimation (cross-section regression), |
| OLS | ordinary least squares, |
| IVE | instrumental variables estimation, |
| RALS | autoregressive least squares (also see arorder), |
| NLS | non-linear least squares (non-linear modelling), |
| ML | maximum likelihood (non-linear modelling), |
| COINT | cointegrated VAR, |
| FIML | full information ML (simultaneous equations modelling), |
| 3SLS | three-stage LS (simultaneous equations modelling), |
| 2SLS | two-stage LS (simultaneous equations modelling), |
| 1SLS | single equation OLS (simultaneous equations modelling), |
| CFIML | constrained FIML (constrained simultaneous equations modelling). |
year1(period1) -- year2(period2) is the estimation sample. Setting year1 to -1 will result in the earliest possible year1(period1), setting year2 to -1 will result in the latest possible year2(period2).
forc is the number of observations to withhold from the estimation sample for forecasting.
init is the number of observations to use for initialization of recursive estimation (not if method is RALS); no recursive estimation is performed if init = 0.
Prints nforc dynamic forecasts (when hstep is zero) or hstep forecasts. The last argument is the standard error type: 0 to not compute; 1 for error variance only (the default); 2 to include parameter uncertainty. For example, forecast(8) produces eight dynamic forecasts with error-variance based standard errors; forecast(8,4) produces the 4-step forecasts (note that the first three will coincide with 1,2,3-step respectively). Use the store command next to store the forecasts if necessary.
Specify the model. There must be an equation for each endogenous and identity endogenous variable specified in the system statement. An example of an equation is: CONS=CONS_1,INC;. Note that PcGive reorders the equations of the model into the order they had in the system specification. Right-hand-side variables are not reordered.
Starts the PcGive module. If PcGive is already running, this batch command is not required.
The first set relates to maximization:
| option | argument | value |
| maxit | maximum number of iterations | default: 1000, |
| print every #iteration | 0: do not print, | |
| compact | compact or extended output | 0 for off, 1 on, |
| strong | strong convergence tolerance | default: 0.005, |
| weak | set weak convergence tolerance | default: 0.0001, |
The second set of options adds further output automatically:
| option | argument | value |
| equation | add equation format | 0 for off, 1 on, |
| infcrit | report information criteria | 0 for off, 1 on. |
| instability | report instability tests | 0 for off, 1 on, |
| HCSE | Heteroscedasticity-consistent SEs | 0 for off, 1 on, |
| r2seasonals | report R2 about seasonals | 0 for off, 1 on, |
The final option is for recursive estimation of cointegrated VARs:
| option | argument | value |
| shortrun | re-estimate shortrun | 1: re-estimate, 0: fixed. |
Prints further output:
| option | |
| correlation | print correlation matrix of variables, |
| covariance | print covariance matrix of coefficients, |
| equation | print the model equation format, |
| forecasts | print the static forecasts, |
| HCSE | Heteroscedasticity-consistent standard errors |
| infcrit | report information criteria, |
| instability | report instability tests, |
| latex | print the model in latex format, |
| r2seasonals | report R2 about seasonals, |
| reducedform | print the reduced form, |
| sigpar | significant digits for parameters (second argument), |
| sigse | significant digits for standard errors (second argument). |
Use this command to select the correct component (package) from PcGive:
| package |
| "Cross-section" |
| "Multiple-equation" |
| "Non-linear" |
| "Single-equation" |
Reports the modelling progress.
Sets the rank p of the long-run matrix for cointegrated VAR analysis. This command must appear before constraints and estimate.
Use this command to store residuals, etc. into the database, the default name is used. Note that if the variable already exists, it is overwritten without warning. The name must be one of:
| residuals | residuals |
| fitted | fitted values |
| structres | structural residuals (model only) |
| res1step | 1-step residual (after recursive estimation) |
| rss | RSS (after recursive estimation) |
| stdinn | stand. innovations (after single eqn recursive estimation) |
| eqse | equation standard errors (recursive estimation) |
| loglik | log-likelihood (after recursive estimation) |
| coieval | eigenvalues (after recursive cointegration analysis) |
The variables listed are separated by commas, their base names (that is, name excluding lag length) must be in the database. If the variable names are not a valid token, the name must be enclosed in double quotes.
The following special variables are recognized: Constant, Trend, Seasonal and CSeasonal.
Note that when IVE/RIVE are used PcGive reorders the model as follows: the endogenous variables first and the additional instruments last. This reordering is relevant when specifying restrictions.
Note that PcGive reorders a multiple-equation system as follows: first the endogenous variables and their lags: endogenous variables, identity endogenous variables, first lag of these (variables in the same order), second lag, etc. then each exogenous variable with its lags. For example, with y, c endogenous, i identity and w, z exogenous:
| yt ct it yt-1 ct-1 it-1 yt-2 ct-2 wt wt-1 zt zt-1 |
This reordering is relevant when specifying restrictions.
Performs a specific test using the specified lag lengths.
| "ar" | test for autocorrelated errors from lag1 to lag2; |
| "arch" | ARCH test up to order lag1; |
| "comfac" | test for common factor; |
| "encompassing" | tests the two most recent models for encompassing; |
| "hetero" | heteroscedasticity test (squares); |
| "heterox" | heteroscedasticity test (squares and cross products); |
| "I1" | I(1) cointegration test for VAR estimated in levels; |
| "I2" | I(2) cointegration test for VAR estimated in levels; |
| "instability" | instability tests; |
| "normal" | normality test; |
| "rescor" | residual correlogram up to lag lag1; |
| "reset" | Reset test using powers up to lag1. |
Do the test summary.
We finish with an annotated example using most commands.
chdir("#home"); // change to OxMetrics directory
loaddata("data.in7"); // Load the tutorial data set.
chdir("#batch"); // change to back to batch file dir.
module("PcGive"); // activate PcGive
package("PcGive", "Multi");// activate the PcGive package
usedata("data.in7"); // use data.in7 for modelling
algebra
{ // Create SAVINGSL in database.
SAVINGSL = lag(INC,1) - lag(CONS, 1);
}
system
{
Y = CONS, INC, INFLAT; // Three endogenous variables;
I = SAVINGSL; // one identity endogenous variable;
Z = CONS_1, CONS_2, // the non-endogenous variables; the
INC_1,INC_2, // lagged variables need not (better:
INFLAT_1, INFLAT_2;// should not) exist in the database.
U = Constant; // the constant enters unrestricted.
}
estimate("OLS", 1953, 3, 1992, 3, 8);
// Estimate the system by OLS over 1953(2)-
// 1992(3), withhold 8 forecasts,
rank(2); // Rank of cointegrating space.
constraints // Cointegration restrictions, expressed in
{ // terms of loadings (a 3 x 2 matrix) and
// eigenvectors (in rows, a 2 x 3 matrix).
// Elements 0-5 are the loadings.
&6 = -&7;
&9 = -&10;
}
estimate("COINT", 1953, 3, 1992, 3, 8);
rank(2); // Rank of cointegrating space.
constraints
{
&0 = 0;
&1 = 0;
&6 = 1; // Restrictions on ECMs;
&7 = -1; // elements 6-8 are coefficients of 1st ECM
&8 = 6; // elements 9-11 of second ECM.
}
estimate("COINT", 1953, 3, 1992, 3, 8);
estimate("OLS");
testsummary; // Do the test summary.
testgenres // Test for parameter restrictions.
{ // Restrictions are on the INFLAT equation:
&12 = 0; // coefficient of CONS_1
&13 = 0; // coefficient of CONS_2
&14 - &15 = 0; // coefficient of INC_1 - coeff. of INC_2.
}
model // Specify the equations in the model,
{ // including the identity.
CONS = INC, SAVINGSL, INFLAT_1;
INC = INC_1, INC_2, CONS;
INFLAT = INFLAT_1, INFLAT_2;
SAVINGSL = INC_1, CONS_1;
}
estimate("FIML"); // Estimate the model by FIML using default sample
dynamics; // Do dynamic analysis.
constraints // Impose constraints for constrained
{ // estimation.
&4 = 0; // Delete INC_2 from INC equation.
}
estimate("CFIML"); // Estimate the constrained model by CFIML;
// no observations required for
// initialization.
progress; // Report the modelling progress.
Estimate a system. Note that for panel data all sample arguments are ignored: only the estimation method is used.
The method argument is one of:
| "1-step" | 1-step estimation, |
| "2-step" | 1 and 2-step estimation, |
| "OLS" | OLS, |
| "LSDV" | Least-squares dummy variables, |
| "Within" | within-groups estimation, |
| "Between" | between-groups estimation, |
| "GLS(w/b)" | GLS (using within/between), |
| "GLS" | GLS (OLS based), |
| "ML" | Maximum likelihood. |
Specifies a GMM type instrument.
Specifies a level GMM type instrument for combined estimation. If the isdiff argument is 1 it is added in differences, if 0 in levels.
Starts the PcGive module. If PcGive is already running, this batch command is not required.
| option | argument | value |
| robust | Use robust standard errors | 0 for off, 1 on, |
| concentrate | Concentrate dummies | 0 for off, 1 on, |
| (not exact with instruments) | ||
| transformdummy | Transform dummies | 0 for off, 1 on, |
| (differences/deviations) | ||
| printgmm | Print contents of GMM instruments | 0 for off, 1 on, |
| maxit | maximum number of iterations | default: 1000, |
| print every #iteration | 0: do not print, | |
| compact | compact or extended output | 0 for off, 1 on, |
| strong | strong convergence tolerance | default: 0.005, |
| weak | set weak convergence tolerance | default: 0.0001, |
Use this command to select the correct Panel component (package) from PcGive:
| package |
| "Static" |
| "Dynamic" |
Lists the dummy variables to be added. The arguments are separated by a comma and can be: "constant", "time", "group", "timegroup", "individual".
Sets the test options. The first argument is 0 or 1, and determines whether specification tests are printed. The second argument sets the order for the AR test; the default is 2.
Lists the desired transformation. The argument can be: "differences", "deviations", "within", "between".
Use this command to store residuals, etc. into the database, the default name is used. Note that if the variable already exists, it is overwritten without warning. The name must be one of:
| residuals | residuals |
| resdiff | differenced residuals (after combined estimation) |
| reslevels | levels residuals (after combined estimation) |
The variables listed are separated by commas, their base names (that is, name excluding lag length) must be in the database. If the variable names are not a valid token, the name must be enclosed in double quotes.
Note that IV formulation is different here from the econometric modelling package:
| Econometric modelling | Panel data models | |
| dependent variable: | Y (first Y) | Y (just one) |
| endogenous regressors: | Y (remaining Y's) | X |
| regressors: | Z | X,L or X,I |
| additional instruments: | A | L or I |
Specifies the model to estimate, with the terms in [ ] optional. Some examples are: GARCH(1,1), TAGARCH(1,1), GARCHM(1,1), EGARCH_GED(1,1). For in mean, a third argument can be "sqrt", or "log", the default being ht when no third argument is present.
prints ctforc forecasts.
Estimate a system. The presence of default arguments implies that the shortest version is just: estimate(), which estimates by OLS using the maximum possible sample, and no forecasts. Similarly, a call to estimate("ML", 1950, 1) corresponds to estimate("ML", 1950, 1, -1, 0, 0, 0).
year1(period1) -- year2(period2) is the estimation sample. Setting year1 to -1 will result in the earliest possible year1(period1), setting year2 to -1 will result in the latest possible year2(period2).
init is the number of observations to use for initialization of recursive estimation; no recursive estimation is performed if init = 0.
If the database is dated, specify the start date in the year1 argument and end date in year2, with both periods set to zero. An example is estimate("ML", 1984-01-04, 0, 1992-01-02, 0).
Starts the PcGive module. If PcGive is already running, this batch command is not required.
| option | argument | value |
| maxit | maximum number of iterations | default: 1000, |
| print every #iteration | 0: do not print, | |
| compact | compact or extended output | 0 for off, 1 on, |
| strong | strong convergence tolerance | default: 0.005, |
| weak | set weak convergence tolerance | default: 0.0001, |
Use this command to select the GARCH package.
Reports the modelling progress.
Use this command to store residuals, etc. into the database, the default name is used. Note that if the variable already exists, it is overwritten without warning. The name must be one of:
| residuals | unscaled residuals |
| scaledres | scaled residuals |
| condvar | conditional variance |
| forecasts | forecasted values (after using forecast command) |
| forcse | forecast standard errors |
The variables listed are separated by commas, their base names (that is, name excluding lag length) must be in the database. If the variable names are not a valid token, the name must be enclosed in double quotes.
The following special variables are recognized: Constant, Trend, Seasonal and CSeasonal.
Performs a specific test using the specified lag lengths.
| "ar" | test for autocorrelated errors from lag1 to lag2; |
| "arch" | ARCH test up to order lag1; |
| "normal" | normality test; |
| "rescor" | residual correlogram up to lag lag1; |
| "rescorsqr" | residual correlogram of squares up to lag lag1; |
Do the test summary.
Specifies the model to estimate, for example ARFIMA(1,d,1) to estimate d with AR(1) and MA(1) components; ARFIMA(1,0.3,1) to fix d=0.3, or ARMA(1,1) to fix d=0.
Fixes the specified AR or MA parameters.
Fixes the mean at the specified value.
Estimates in deviation from sample mean.
prints ctforc forecasts.
Estimate a system. The presence of default arguments implies that the shortest version is just: estimate(), which estimates by OLS using the maximum possible sample, and no forecasts. Similarly, a call to estimate("EML", 1950, 1) corresponds to estimate("EML", 1950, 1, -1, 0).
The method argument is one of:
| EML | exact maximum likelihood, |
| NLS | non-linear least squares, |
| MPL | modified profile likelihood, |
| Init | Initialization (starting values) only, |
| NLS-STAT | non-linear least squares with stationarity imposed. |
year1(period1) -- year2(period2) is the estimation sample. Setting year1 to -1 will result in the earliest possible year1(period1), setting year2 to -1 will result in the latest possible year2(period2).
If the database is dated, specify the start date in the year1 argument and end date in year2, with both periods set to zero. An example is estimate("EML", 1984-01-04, 0, 1992-01-02, 0).
| option | argument | value |
| maxit | maximum number of iterations | default: 1000, |
| print every #iteration | 0: do not print, | |
| compact | compact or extended output | 0 for off, 1 on, |
| strong | strong convergence tolerance | default: 0.005, |
| weak | set weak convergence tolerance | default: 0.0001, |
Starts the PcGive module. If PcGive is already running, this batch command is not required.
Use this command to select the ARFIMA package.
Reports the modelling progress.
Use this command to store residuals, etc. into the database, the default name is used. Note that if the variable already exists, it is overwritten without warning. The name must be one of:
| residuals | residuals |
| forecasts | forecasted values (after using forecast command) |
| forcse | forecast standard errors |
| forclevel | level forecasts |
| forclevelse | level forecasts standard errors |
The variables listed are separated by commas, their base names (that is, name excluding lag length) must be in the database. If the variable names are not a valid token, the name must be enclosed in double quotes.
The following special variables are recognized: Constant, Trend, Seasonal and CSeasonal.
Performs a specific test using the specified lag lengths.
| "ar" | test for autocorrelated errors from lag1 to lag2; |
| "arch" | ARCH test up to order lag1; |
| "normal" | normality test; |
| "rescor" | residual correlogram up to lag lag1; |
Do the test summary.
prints the regime classification.
prints ctforc forecasts.
Specifies the model to estimate, either a Markov-switching dynamic regression, or a Markov-switching ARMA(p, q) model. S denotes the number of regimes. The optional fourth argument to MS_ARMA indicates whether the ARMA parameters are swirching or not.
Estimate a system. The presence of default arguments implies that the shortest version is just: estimate(), which estimates by OLS using the maximum possible sample, and no forecasts. Similarly, a call to estimate("ML", 1950, 1) corresponds to estimate("ML", 1950, 1, -1, 0, 0, 0).
year1(period1) -- year2(period2) is the estimation sample. Setting year1 to -1 will result in the earliest possible year1(period1), setting year2 to -1 will result in the latest possible year2(period2).
init is the number of observations to use for initialization of recursive estimation; no recursive estimation is performed if init = 0.
If the database is dated, specify the start date in the year1 argument and end date in year2, with both periods set to zero. An example is estimate("ML", 1984-01-04, 0, 1992-01-02, 0).
Starts the PcGive module. If PcGive is already running, this batch command is not required.
| option | argument | value |
| maxit | maximum number of iterations | default: 1000, |
| print every #iteration | 0: do not print, | |
| compact | compact or extended output | 0 for off, 1 on, |
| strong | strong convergence tolerance | default: 0.005, |
| weak | set weak convergence tolerance | default: 0.0001, |
Use this command to select the Regime Switching package.
Reports the modelling progress.
Use this command to store residuals, etc. into the database, the default name is used. Note that if the variable already exists, it is overwritten without warning. The name must be one of:
| fitted | fitted values |
| forcse | forecast standard errors |
| forecasts | forecasted values (after using forecast command) |
| prederr | prediction errors (1-step residuals) |
| probfil | filtered probabilities |
| probpred | predicted probabilities (1-step regime probabilities) |
| probsmo | smoothed probabilities |
| residuals | unscaled residuals |
| scaledres | scaled residuals |
Makes the variance regime dependent.
The variables listed are separated by commas, their base names (that is, name excluding lag length) must be in the database. If the variable names are not a valid token, the name must be enclosed in double quotes.
The following special variables are recognized: Constant, Trend, Seasonal and CSeasonal.
Performs a specific test using the specified lag lengths.
| "arch" | ARCH test up to order lag1; |
| "normal" | normality test; |
| "rescor" | residual correlogram up to lag lag1; |
| "rescorsqr" | residual correlogram of squares up to lag lag1; |
Do the test summary.