TREND

Options     Examples

TREND generates a series with a linear growth trend. The trend may be repeated under the control of several options.

TREND (FREQ, PERIOD=value, PSTART=value, START=<initial value>, STEP=increment)

                series;

or

TREND series [<initial value>] [increment] ;

Usage

TREND followed by a series name makes a simple time trend variable and stores it under that name. This variable is equal to one in the beginning observation of the current sample and increases by one in every period.

The starting value of the series may be changed by including the second argument and the increment may also be changed by including the third argument. If you want to change the increment, but not the starting value, you must include both arguments, but the first one will be 1.0.

Since the TREND command creates a series under control of SMPL, you must be careful to specify a SMPL which covers the whole period in which you are interested, so you don't have missing values or strange jumps due to gaps in the sample.

Output

TREND produces no printed output. A single series is stored.

Options

FREQ/NOFREQ causes the trend to be restarted every time there is a new year. This option is valid only when FREQ Q; or FREQ M; has been specified.

PERIOD= specifies the number of observations after which the trend starts repeating itself. For example, PERIOD=4 would have the same effect as FREQ Q.

PSTART= specifies the starting period (for the first observation in the sample), when PERIOD is used. The default is one. For example,

FREQ Q ; SMPL 70:2,79:4 ;

TREND(FREQ) QT ;

is equivalent to

SMPL 2,40 ;

TREND(PERIOD=4,PSTART=2) QT ;.

START= gives an initial value to the trend. The default is one.

STEP= supplies a value for the trend increment. The default is one.

Examples

FREQ A ; SMPL 46 75 ;

TREND TIME ;

The above example creates a time trend variable called TIME for the illustrative model. The variable is 1 in 1946, 2 in 1947, 3 in 1948, and so forth.

FREQ Q ; SMPL 70:2,79:4 ;

TREND (FREQ) QT;

This example makes a series QT equal to 2,3,4, 1,2,3,4, 1,2,3,4,...etc.

SMPL 1 400 ;

TREND (PERIOD=5) TIME ;

This example makes a series which is 1,2,3,4,5 starting in every fifth observation; this might be useful for panel data, where a trend was needed.

SMPL 1,400;

TREND (PERIOD=5,START=71) YEAR;

This example is the same as above, except the trend is equal to 71,72,73,74,75, 71,72,73,74,75, ... instead of 1,2,3,4,5, 1,2,3,4,5, ....

See the example in the description of the AR1 command of using TREND with INT() to create individual dummy variables for balanced panel data.