Object Reference : Object View and Procedure Reference : Group
Resample from observations in a group.
group_name.resample(options) [output_spec]
You should follow the resample keyword and options with and an output_spec containing a list of names or a wildcard expression identifying the series to hold the output. If a list is used to identify the targets, the number of target series must match the number of names implied by the keyword. If you do not provide an output_spec, the output names will be formed using the names of the original series combined with the string specified by the suffix option.
outsmpl= smpl_spec
Sample to fill the new series. Either provide the sample range in double quotes or specify a named sample object. The default is the current workfile sample.
name= group_name
Name of group to hold created series.
Draw from rows without replacement. Default is to draw with replacement.
weight= series_name
Name of series to be used as weights. The weight series must be non-missing and non-negative in the current workfile sample. The default is equal weights.
Block length for each draw. Must be a positive integer. The default block length is 1.
withna (default)
[Draw / Do not draw] from all rows in the current sample, including those with NAs.
Do not draw from rows that contain missing values in the current workfile sample.
Excludes NAs from draws but copies rows containing missing values to the output series.
suffix=arg (default=“_b”)
Suffix to be appended to the original series names when forming output series names.
Force the dialog to appear from within a program.
You may not use groups that contain auto-series unless you provide an output_spec. For example, resampling from a group containing the series X(–1) or LOG(X) without providing explicit output names will produce an error since we will attempt to append a suffix to the original name, producing invalid object names.
If the group name you provide already exists and is a group object, the group object will be overwritten. If the object already exists but is not a group object, EViews will error.
Block bootstrap (block length larger than 1) requires a continuous output sample. Therefore a block length larger than 1 cannot be used together with the “fixna” option, and the “outsmpl” should not contain any gaps.
The “fixna” option will have an effect only if there are missing values in the overlapping sample of the input sample (current workfile sample) and the output sample specified by “outsmpl”.
If you specify “fixna”, we first copy any missing values in the overlapping sample to the output series. Then the input sample is adjusted to drop rows containing missing values and the output sample is adjusted so as not to overwrite the copied values.
If you choose “dropna” and the block length is larger than 1, the input sample may shrink in order to ensure that there are no missing values in any of the drawn blocks.
If you choose “permute”, the block option will be reset to 1, the “dropna” and “fixna” options will be ignored (reset to the default “withna” option), and the “weight” option will be ignored (reset to default equal weights).
group g1 x y
creates new series X_B and Y_B by drawing with replacement from the rows of X and Y in the current workfile sample. If X_B or Y_B already exist in the workfile, they will be overwritten if they are series objects, otherwise EViews will error. Note that only values of X_B and Y_B in the output sample (in this case the current workfile sample) will be overwritten.
g1.resample(weight=wt,suffix=_2) g2
will append “_2” to the names for the new series, and will create a group objected named G2 containing these series. The rows in the sample will be drawn with probabilities proportional to the corresponding values in the series WT. WT must have non-missing non-negative values in the current workfile sample.
See “Resample” for a discussion of the resampling procedure. For additional discussion of wildcards, see Appendix A. “Wildcards”.
See also @resample and @permute for sampling from matrices.