The 11 Basic G7 Commands¶
This is a quick introduction to these commands. Each is described in greater detail in the command reference of this User Guide and in the Reference Manual. Links to more detailed help are provided. In this basic reference, the full name of the command is given, and the abbreviated version, if available, is enclosed in quotes. Examples are highlighted in Courier fixed width font.
- (ti)tle <text>
Provides a title for regressions and graphs.
For exmple,
title Consumption Function
For example,
f x = gnp/(1 + unemp[1]*@exp(0.25*time)) f index = x/x{2005.1}Note:
- []:
denotes lags, where (t-1) is denoted [1]
- @:
introduces a function (see the list of functions)
- {<date>}:
on the right-hand side denotes a specific observation.
- {<date>}:
on the left-hand side assigns values over the given range of periods.
For example,
lim 1975.1 2011.4 2012.3The following example adjusts the limits setting. If limits previously were set to 1975.1 to 2011.4 to 2012.3, then the adjusted range spans 1975.2 to 2011.2 to 2013.2.
lim +1 -2 +3
- (r)egress <y> = <x1>, <x2>, <x3>, …, <xN>
Regresses y on x1, x2, etc.
The x’s may be simple expressions.
r gnp$ = g$, v$-vi$
- (gr)aph <y1> [y2] [y3] [y4] … [y7] [date1 [date2 [date3]]]
Graphs up to seven series from date1 to date2. Dates are retained from previous gr commands. (Note: the (pl)ot command is identical to the graph command.)
For example,
gr v$ c$ g$ 1979.1 2011.4
- gr *
This graphs actual and predicted values from the last regression.
- (ty)pe <y> [date1] [date2]
Displays the values of y from date1 to date2 on the screen. Dates need not be repeated if unchanged from previous ty commands. (Note: the (pr)int command is identical to the type command.)
For example,
ty gnp$ 1979.1 2011.4
For example,
data sales 2005.1 117 123 134 142 2006.1 137 143 145;
- (ba)nk <bankname>
Assigns a data bank. What this means is discussed more fully in the topic on assigned banks.
For example,
ba mybank
- (lis)tnames <w|a>
Displays the series names in the workspace (w) or the assigned bank (a).
For example,
lis a
This command also has a “wildcard” option, which allows you to list variable names matching a certain pattern.
For example:
lis a out*
will list all of the series in the assigned bank that start with out (such as out1 through out85).
- (ad)d <filename>
Execute commands from named file.
For example,
add invest.reg
- (q)uit
Quits and exits G7.
That is,
q