Fill a series object with specified values.
Syntax
series_name.fill(options) n1[, n2, n3 …]
Follow the keyword with a list of values to place in the specified object. Each value should be separated by a comma. By default, series fill ignores the current sample and fills the series from the beginning of the workfile range. You may provide sample information using options.
Running out of values before the object is completely filled is not an error; the remaining cells or observations will be unaffected, unless the “l” option is specified. If, however, you list more values than the object can hold, EViews will not modify any observations and will return an error message.
Options
l | Loop repeatedly over the list of values as many times as it takes to fill the series. |
o=[date, integer] | Set starting date or observation from which to start filling the series. Default is the beginning of the workfile range. |
s | Fill the series only for the current workfile sample. The “s” option overrides the “o” option. |
s=sample_name | Fill the series only for the specified subsample. The “s” option overrides the “o” option. |
Examples
To generate a series D70 that takes the value 1, 2, and 3 for all observations from 1970:1:
series d70=0
d70.fill(o=1970:1,l) 1,2,3
Note that the last argument in the fill command above is the letter “l”. The next three lines generate a dummy series D70S that takes the value one and two for observations from 1970:1 to 1979:4:
series d70s=0
smpl 1970:1 1979:4
d70s.fill(s,l) 1,2
smpl @all
Assuming a quarterly workfile, the following generates a dummy variable for observations in either the third and fourth quarter:
series d34
d34.fill(l) 0, 0, 1, 1
Note that this series could more easily be generated using
@seas or the special workfile functions (see
“Basic Date Functions”).