Object Reference : Object View and Procedure Reference : Group
  
 
clearcontents
Clear (i.e., replace with NAs) a contiguous block of observations in a group.
Syntax
group_name.clearcontents(start_point, col_range) n
where start_point specifies the first of n observations to clear. If n is negative, start_point specifies the last of |n| observations to clear. For dated workfiles, start_point should be entered as a date. For panels and undated workfiles, start_point should be an observation number.
The col_range option is used to specify the columns to be cleared in the group. It may take one of the following forms:
 
@all
Apply to all series in the group.
col
Column number or letter (e.g., “2”, “B”). Apply to the series corresponding to the column.
first_col[:]last_col
Colon-delimited range of columns (from low to high, e.g., “3:5”). Apply to all series corresponding to the column range.
first_series[:]last_series
Colon-delimited range of columns (from low to high, e.g., “series01:series05”) specified by series names. Apply to all series corresponding to the column range.
Examples
grp.clearcontents(1952Q2, 1) 10
clears 10 observations starting at 1952 quarter 2 in the first series in the group.
grp.clearcontents(10, gdp) -5
clears 5 observations ending at observation number 10 in the series GDP in the group.
grp.clearcontents(1990M2, @all) 8
clears 8 observations starting at February of 1990 in every series in the group.